From 0a4ff1e6aec06d0173b7650009f940a57a392e30 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Thu, 24 Sep 2026 19:47:47 +0200 Subject: [PATCH] fix: compose healthchecks use 127.0.0.1, not localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inside the frontend and nginx containers, localhost resolves to ::1 only while their nginx binds IPv4 — the wget healthcheck was refused and both containers reported unhealthy despite serving fine. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- docker-compose.dev.yml | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b4e8244..759556b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -6,7 +6,7 @@ services: ports: - "${MAILPIT_HTTP_PORT}:8025" healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:8025/ >/dev/null 2>&1 || exit 1"] + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8025/ >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10 diff --git a/docker-compose.yml b/docker-compose.yml index eb3123a..48fb91b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -100,7 +100,7 @@ services: auth: condition: service_started healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost/ >/dev/null 2>&1 || exit 1"] + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10 @@ -120,7 +120,7 @@ services: volumes: - ./infra/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost/nginx-health >/dev/null 2>&1 || exit 1"] + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/nginx-health >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10