This is a very confusing title and project at first glance. It took me a minute to figure out what you’re doing… But just to be clear — the point of this is to migrate an existing Postgres DB from the original version to a newer version? This is about the data volume itself, not automatically upgrading the Postgres binary when a new version is released? So, you’d basically pass a flag that says --migrate-db when star…
The upgrade-of-your-data happens automatically when the container starts, prior to starting the database server.