Skip to content

Commit

Permalink
make docker-compose test depends_on db healthcheck not start
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Aug 30, 2024
1 parent 1adb776 commit c9de130
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
test: ["CMD-SHELL", "pg_isready -U ${PGUSER}"]
interval: 1s
timeout: 5s
retries: 10
Expand All @@ -32,7 +32,8 @@ services:
MIX_ENV: $MIX_ENV
tty: true
depends_on:
- db
db:
condition: service_healthy
networks:
- backend_network
command: ["/bin/sh", "./setup-database.sh"]
Expand Down

0 comments on commit c9de130

Please sign in to comment.