Add HEALTHCHECK to Dockerfile using python3 urllib
Coolify requires curl/wget for HTTP healthchecks on Dockerfile deployments, but the python:3.12-slim image doesn't include them. Use python3 urllib instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,4 +23,7 @@ ENV DOTENV_PATH=/home/chaim/.env
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=10 \
|
||||
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/')" || exit 1
|
||||
|
||||
CMD ["uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
|
||||
Reference in New Issue
Block a user