From 9e5e828c8dbe10611a315b4ed7bbc7ff5bc62edd Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Thu, 11 Jun 2026 11:43:01 -0400 Subject: [PATCH] =?UTF-8?q?fix(docker):=20nginx=20healthcheck=20uses=20127?= =?UTF-8?q?.0.0.1=20not=20localhost=20=E2=80=94=20IPv4-only=20listener?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit corrosion-nginx reported (unhealthy) despite serving the panel fine: nginx listens 0.0.0.0:80 (IPv4 only, no listen [::]:80), but 'localhost' resolves to ::1 first inside the container, so the probe got connection-refused. Verified: 127.0.0.1:80 serves the SPA. Probe now targets IPv4 explicitly. No nginx config change — the panel was never broken, only the healthcheck's hostname resolution. Co-Authored-By: Claude Fable 5 --- docker/docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 088d98d..9752fb7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -87,7 +87,10 @@ services: api: condition: service_started healthcheck: - test: ["CMD-SHELL", "wget -q --spider http://localhost:80/ || exit 1"] + # 127.0.0.1, not localhost: nginx listens IPv4-only (0.0.0.0:80) but + # `localhost` resolves to ::1 first inside the container → the probe hit + # nothing and reported unhealthy while the panel served fine on IPv4. + test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:80/ || exit 1"] interval: 10s timeout: 5s retries: 3