diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 94811b2aa..3408a80c0 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -92,6 +92,12 @@ services: condition: service_healthy redis: condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/health"] + interval: 15s + timeout: 5s + retries: 30 + start_period: 200s celery_worker: build: ../surfsense_backend @@ -116,7 +122,7 @@ services: redis: condition: service_healthy backend: - condition: service_started + condition: service_healthy celery_beat: build: ../surfsense_backend @@ -184,8 +190,10 @@ services: env_file: - ../surfsense_web/.env depends_on: - - backend - - electric + backend: + condition: service_healthy + electric: + condition: service_healthy volumes: postgres_data: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b4108ef65..7d7606938 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -76,6 +76,12 @@ services: redis: condition: service_healthy restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/health"] + interval: 15s + timeout: 5s + retries: 30 + start_period: 200s celery_worker: image: ghcr.io/modsetter/surfsense-backend:${SURFSENSE_VERSION:-latest} @@ -99,7 +105,7 @@ services: redis: condition: service_healthy backend: - condition: service_started + condition: service_healthy labels: - "com.centurylinklabs.watchtower.enable=true" restart: unless-stopped @@ -174,8 +180,10 @@ services: labels: - "com.centurylinklabs.watchtower.enable=true" depends_on: - - backend - - electric + backend: + condition: service_healthy + electric: + condition: service_healthy restart: unless-stopped volumes: