fix: improve entrypoint script to capture and log exit code of the main Gunicorn process

This commit is contained in:
Théophile Diot 2024-12-09 12:00:12 +01:00
parent 6e2f54e6a2
commit 12beb00e17
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -75,9 +75,11 @@ fi
python3 -m gunicorn --logger-class utils.logger.TmpUiLogger --config utils/tmp-gunicorn.conf.py
# Start the main Gunicorn process with the standard logger configuration.
python3 -m gunicorn --logger-class utils.logger.UiLogger --config utils/gunicorn.conf.py
python3 -m gunicorn --logger-class utils.logger.UiLogger --config utils/gunicorn.conf.py &
pid="$!"
# Capture the exit code of the main Gunicorn process.
# Wait for the main web UI process to exit and capture its exit code.
wait "$pid"
exit_code=$?
# Log the exit status of the main web UI process for debugging purposes.