From bbe62941ddd4799068cc745e7f39b98daaf3c29c Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Mon, 2 Feb 2026 18:33:53 +0100 Subject: [PATCH] try to stop more gracefully --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 12b388c..814d663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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