From 5115c65691c4734c5fa2ad9e1ef5d5823bc9504e Mon Sep 17 00:00:00 2001 From: bunker-admin Date: Wed, 15 Apr 2026 10:05:20 -0600 Subject: [PATCH] Fix nginx/newt boot race by raising API healthcheck start_period to 120s On a fresh install, the api container's docker-entrypoint.sh does migrations + seed + MaxMind GeoLite2 download synchronously before binding port 4000, which routinely exceeds the previous 75s tolerance (start_period 30s + 3x15s retries). When the API flipped to unhealthy, nginx and newt (which depend on api: condition: service_healthy) aborted, leaving the tunnel offline and requiring a manual 'docker compose up -d nginx newt' second pass. Bumping start_period to 120s gives first-boot enough slack, matches convention (Rocket.Chat 90s, Gancio 60s), and leaves steady-state restarts unaffected. Change applied to both dev (docker-compose.yml) and prod (docker-compose.prod.yml) since the release tarball ships the latter. Bunker Admin --- docker-compose.prod.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 32058af3..41c00664 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -30,7 +30,7 @@ services: interval: 15s timeout: 5s retries: 3 - start_period: 30s + start_period: 120s environment: - NODE_ENV=${NODE_ENV:-production} - PORT=4000 diff --git a/docker-compose.yml b/docker-compose.yml index 8598d5ad..1c194511 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: interval: 15s timeout: 5s retries: 3 - start_period: 30s + start_period: 120s environment: - NODE_ENV=${NODE_ENV:-development} - PORT=4000