A java docker file that waits with starting until a postgres db is available. To be used with
This fixes the problem with Play plus evolutions as described in this Play issue.
The docker file implements the solution from the docker-compose documentation.
It uses java 8 and Postgres client (v9.6). See the Dockerfile.
To use it add lines like the following to your
entrypoint: /wait-for-postgres.sh db01 bin/play-app-name environment: - PGPASSWORD=postgres - PGUSER=postgres
wait-for-postgres.sh expects two arguments:
- the name of the db host
- the command to run when the db host is available. If you're using
sbt-nativeto build a Play app as a docker image that will be