From 885a24cf160e8baf64b844fc20a91db99fea7826 Mon Sep 17 00:00:00 2001 From: ThePhaseless Date: Sat, 4 Jul 2026 18:06:31 +0200 Subject: [PATCH] fix(docker): use IPv4 loopback in HEALTHCHECK to support IPv6-enabled networks On IPv6-enabled Docker networks, 'localhost' resolves to ::1 first, but uvicorn binds to 0.0.0.0 by default, so the healthcheck can fail. Using 127.0.0.1 avoids the IPv6/IPv4 mismatch. Fixes #346 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 116db67..9b02061 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,5 +59,5 @@ RUN \ FROM app USER 1000 EXPOSE $PORT -HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://localhost:${PORT}/health" +HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://127.0.0.1:${PORT}/health" ENTRYPOINT ["tini", "--", "/app/.venv/bin/python", "main.py"]