From 0b575a3e1f213bfac86d5d9bb2357db23fe4e2fd Mon Sep 17 00:00:00 2001 From: sirdave73 Date: Sun, 30 Aug 2026 15:44:19 -0400 Subject: [PATCH] Dockerfile: pure-python HEALTHCHECK (slim image has no curl/wget); Coolify honors it and skips its own check --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 82249ad..556e65e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,3 +35,8 @@ EXPOSE 8030 # Single worker: the in-memory JOBS registry must live in one process. # Threads give concurrency while conversions run in their own worker threads. CMD ["sh", "-c", "gunicorn app:app --bind 0.0.0.0:${PORT} --workers 1 --threads 8 --timeout 1200 --graceful-timeout 30 --access-logfile - --error-logfile -"] + +# Health probe: pure-python urllib (slim image has no curl/wget). +# Coolify detects this and skips its own curl/wget-based check. Kept as the final line +# because Coolify's parser appends the following line to the HEALTHCHECK command. +HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8030/health', timeout=5).status==200 else 1)"