From 811c14ee73ad82acd0cd68bdee970500f0ce5e36 Mon Sep 17 00:00:00 2001 From: Devil Date: Tue, 11 Aug 2026 15:53:06 +0200 Subject: [PATCH] fix(infrastructure): don't let a slow/unhealthy api block deploy Portainer's compose up blocks on frontend's api: condition: service_healthy dependency and, on timeout, tears down everything it just created - so an unhealthy api container never stuck around long enough to pull logs from. Relaxed to service_started (frontend doesn't need api ready at container-start), and gave the api healthcheck more runway (60s start_period, 10 retries @ 10s) in case it's just slow to boot rather than crashing. --- infrastructure/docker-compose.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/infrastructure/docker-compose.yml b/infrastructure/docker-compose.yml index ae26310..30e455c 100644 --- a/infrastructure/docker-compose.yml +++ b/infrastructure/docker-compose.yml @@ -46,10 +46,10 @@ services: condition: service_completed_successfully healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:3001/api/v1/health || exit 1"] - interval: 15s + interval: 10s timeout: 5s - retries: 3 - start_period: 30s + retries: 10 + start_period: 60s networks: - app-network - proxy @@ -95,8 +95,11 @@ services: - "traefik.http.routers.studioflow-frontend.priority=1" - "traefik.http.services.studioflow-frontend.loadbalancer.server.port=3000" depends_on: + # service_started, not service_healthy: a slow/unhealthy api shouldn't block the + # whole `compose up` (and Portainer tearing down what it created) - the frontend + # itself doesn't need api to be ready at container-start time. api: - condition: service_healthy + condition: service_started networks: - app-network - proxy