Skip to content

Commit

Permalink
Merge pull request #436 from range-of-motion/wait-until-database-cont…
Browse files Browse the repository at this point in the history
…ainer-has-booted-before-starting-app-container

Wait until database container has booted before starting app container
  • Loading branch information
range-of-motion authored Oct 30, 2023
2 parents 3f26037 + 5b00526 commit a37d285
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ services:
ports:
- "33061:3306"
command: --default-authentication-plugin=mysql_native_password
healthcheck:
test: ["CMD", "mysql", "-ubudget", "-ptest", "--execute", "SHOW DATABASES;"]
interval: 3s
timeout: 3s
retries: 5

app:
build: ./
depends_on:
database:
condition: service_healthy
ports:
- "8080:80"

0 comments on commit a37d285

Please sign in to comment.