Skip to content

Commit

Permalink
Merge pull request #12 from fga-eps-mds/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
italovinicius18 authored Jul 20, 2023
2 parents 24c07f8 + 98c073e commit 72dcca3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ services:
- DATABASE_DB=schedula_tutorial
- DATABASE_PORT=5432
depends_on:
- postgres
- pgadmin

postgres:
image: postgres:alpine
image: postgres:12-alpine
container_name: schedula_tutorial_db
ports:
- "5106:5432"
Expand All @@ -34,6 +34,12 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=schedula_tutorial
healthcheck:
# Run command inside the container to check if postgres is ready AND alter DATABASE_DB
test: ["CMD-SHELL", "sh -c 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB'"]
interval: 5s
timeout: 5s
retries: 5

pgadmin:
image: dpage/pgadmin4
Expand All @@ -43,4 +49,5 @@ services:
ports:
- "16546:80"
depends_on:
- postgres
postgres:
condition: service_healthy

0 comments on commit 72dcca3

Please sign in to comment.