fix: use 127.0.0.1 in web healthcheck to avoid IPv6 issues

wget resolves 'localhost' to IPv6 [::1] but nginx only listens on
IPv4 0.0.0.0:80, causing connection refused. Using 127.0.0.1 ensures
IPv4 connection and healthy container status.
This commit is contained in:
Fusion
2026-05-18 10:49:20 +02:00
parent ea9f2e3c98
commit d38f953dfc
+1 -1
View File
@@ -40,7 +40,7 @@ EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=10s --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;"]