Fix health check to use IPv4 address

- 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 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2025-12-18 04:58:13 +01:00
parent e8f8a6a4ef
commit 1e5f4f35cd
2 changed files with 2 additions and 2 deletions

View File

@@ -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;"]

View File

@@ -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