try to stop more gracefully

This commit is contained in:
Gamosoft 2026-02-02 18:33:53 +01:00
parent 23a1ef579f
commit bbe62941dd
1 changed files with 2 additions and 1 deletions

View File

@ -45,5 +45,6 @@ HEALTHCHECK --interval=60s --timeout=3s --start-period=5s --retries=3 \
CMD python -c "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.getenv(\"PORT\", \"8000\")}/health')"
# Run the application (shell form to allow environment variable expansion)
CMD uvicorn backend.main:app --host 0.0.0.0 --port $PORT --timeout-graceful-shutdown 2
# Use exec to replace shell with uvicorn (receives SIGTERM directly for graceful shutdown)
CMD exec uvicorn backend.main:app --host 0.0.0.0 --port $PORT --timeout-graceful-shutdown 2