Skip to content

Commit

Permalink
Update test container to depend upon fastapi being _healthy_
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Mar 1, 2025
1 parent b915e2c commit 478b712
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ services:
condition: service_completed_successfully
volumes:
- .:/code
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/version"]
interval: 60s
timeout: 5s
retries: 3
start_period: 60s

# This is an "init container," which sets up a MongoDB replica set on the `mongo` container, then shuts off.
mongo-init:
Expand Down Expand Up @@ -125,10 +131,10 @@ services:
env_file:
- .env.test
depends_on:
- mongo
- fastapi
- dagster-daemon
- dagster-dagit
mongo: { condition: service_started }
fastapi: { condition: service_healthy }
dagster-daemon: { condition: service_started }
dagster-dagit: { condition: service_started }
volumes:
- .:/code

Expand Down

0 comments on commit 478b712

Please sign in to comment.