From ec902049c10a0a2a90c4577cd0539e391beaabfe Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 17 Apr 2026 16:45:00 +0200 Subject: [PATCH] fix(docker): tighter healthcheck cadence with start-period MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traefik filters containers that are 'unhealthy' or still 'starting' (no health result yet). The old 30s interval meant kochwas stayed in 'starting' for 30+ seconds after boot, blocking Traefik from routing to it. New timing: --start-period=20s grace window — failures don't mark unhealthy yet --start-interval=2s fast probes during start-period --interval=15s steady-state cadence after first success --timeout=5s, retries=3 unchanged Container becomes 'healthy' within ~2-5s of the app coming up, so Traefik picks it up almost immediately after 'docker compose up'. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fcd5174..04e5b18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ ENV IMAGE_DIR=/data/images VOLUME ["/data"] EXPOSE 3000 -HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ +HEALTHCHECK --interval=15s --timeout=5s --retries=3 --start-period=20s --start-interval=2s \ CMD wget -qO- http://localhost:3000/api/health > /dev/null || exit 1 CMD ["node", "build/index.js"]