From 5f3529439a5dd715e334556ea37f277613c2c499 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 11 May 2026 18:49:32 +0200 Subject: [PATCH] fix(infra): frontend healthcheck on 127.0.0.1, not localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new alpine-based frontend production image (`node:20.19.0-alpine3.21`) resolves `localhost` only to `::1` in /etc/hosts. SvelteKit's adapter-node binds to 0.0.0.0 (IPv4 only), so `wget http://localhost:3000/login` from inside the container connects to ::1 and gets "Connection refused" every 15s. Container goes unhealthy → `docker compose up --wait` fails → nightly staging deploy fails. The app itself is fine. Switching to 127.0.0.1 bypasses /etc/hosts and matches what Node actually listens on. Co-Authored-By: Claude Opus 4.7 --- docker-compose.prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index fa9c0829..e56ac956 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -224,7 +224,7 @@ services: networks: - archiv-net healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:3000/login >/dev/null 2>&1 || exit 1"] + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/login >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10 -- 2.49.1