diff --git a/docker-compose.yml.example b/docker-compose.yml.example index c52699f0..51b279e7 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -21,6 +21,18 @@ services: condition: service_healthy ports: - "127.0.0.1:8000:8000" + healthcheck: + test: + [ + "CMD", + "/app/.venv/bin/python", + "-c", + "import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=2).read()", + ] + interval: 5s + timeout: 5s + retries: 5 + start_period: 10s # -- Development: mount source for live reload -- # volumes: # - .:/app @@ -40,6 +52,8 @@ services: dockerfile: Dockerfile entrypoint: ["/app/.venv/bin/python", "-m", "src.deriver"] depends_on: + api: + condition: service_healthy database: condition: service_healthy redis: