A java docker file that waits with starting until a postgres db is available
3.0K
A java docker file that waits with starting until a postgres db is available. To be used with docker-compose.
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 compose.yml.
entrypoint: /wait-for-postgres.sh db01 bin/play-app-name
environment:
- PGPASSWORD=postgres
- PGUSER=postgres
The script wait-for-postgres.sh expects two arguments:
sbt-native to build a Play app as a docker image that will be bin/<play-app-name>.Content type
Image
Digest
Size
219 MB
Last updated
over 8 years ago
docker pull abcjava/java-waitfor-postgres