Merge pull request #559 from peperunas/patch-2

fix: use exec the uvicorn process to handle Docker's SIGTERM correctly
This commit is contained in:
Timothy Jaeryang Baek 2024-01-25 00:47:45 -08:00 committed by GitHub
commit d6b139cfe9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,4 +4,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR" || exit
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 '*'