"src/vscode:/vscode.git/clone" did not exist on "930859980fb2c8f367fc142f2690cd37b781270e"
Unverified Commit 1cbbfc7c authored by Giulio De Pasquale's avatar Giulio De Pasquale Committed by GitHub
Browse files

fix: use exec the uvicorn process to handle Docker's SIGTERM correctly

Replace the shell with the uvicorn process, so it becomes PID 1 and receives the signals directly
parent b6d9cf3b
...@@ -4,4 +4,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) ...@@ -4,4 +4,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR" || exit cd "$SCRIPT_DIR" || exit
PORT="${PORT:-8080}" PORT="${PORT:-8080}"
uvicorn main:app --host 0.0.0.0 --port "$PORT" --forwarded-allow-ips '*' exec uvicorn main:app --host 0.0.0.0 --port "$PORT" --forwarded-allow-ips '*'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment