From 1e5f4f35cde19aae4549d22edbe532cfb66092bf Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Thu, 18 Dec 2025 04:58:13 +0100 Subject: [PATCH] Fix health check to use IPv4 address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change health check from localhost to 127.0.0.1 - Fixes connection refused error (localhost resolves to IPv6) - Both Dockerfile and docker-compose.yml updated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf7ee1c..93fa134 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ EXPOSE 80 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1 + CMD wget --quiet --tries=1 --spider http://127.0.0.1/ || exit 1 # Start nginx CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 82ba997..aa3234e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - "8880:80" restart: unless-stopped healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"] + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"] interval: 30s timeout: 3s retries: 3