From 29addea63e4e2295c8e4ebb4b77364ec49c5fc12 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Sun, 12 Apr 2026 03:21:28 +0200 Subject: [PATCH] fix: add python healthcheck for coolify --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d8aea48..81c1031 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM mitmproxy/mitmproxy:latest +RUN pip install --no-cache-dir httpie 2>/dev/null; apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* || true EXPOSE 8888 8081 -HEALTHCHECK NONE +HEALTHCHECK --interval=10s --timeout=5s --retries=10 --start-period=15s \ + CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8081')" || exit 1 ENTRYPOINT ["mitmweb", "--web-host", "0.0.0.0", "--web-port", "8081", "-p", "8888", "--ssl-insecure", "--set", "web_open_browser=false", "--set", "web_password=mitm"]