chore(docker): add HEALTHCHECK probe
All checks were successful
Deploy / deploy (push) Successful in 17s
All checks were successful
Deploy / deploy (push) Successful in 17s
Python urllib GET / on 127.0.0.1:8000. start_period=30s gives gunicorn workers time to boot. Lets Docker mark container unhealthy if Flask app wedges, and feeds Portainer + diagnose.sh signal that the app is alive. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -11,4 +11,7 @@ COPY templates/ templates/
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
EXPOSE 8000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=30s \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/').close()" || exit 1
|
||||
|
||||
CMD ["gunicorn", "-b", "0.0.0.0:8000", "-w", "2", "--access-logfile", "-", "app:app"]
|
||||
|
||||
Reference in New Issue
Block a user