allow configuring gunicorn configs in boot_server_in_docker w/ burnettk

This commit is contained in:
jasquat 2023-02-07 15:38:29 -05:00
parent 559d9a78d8
commit 0162821b4c
1 changed files with 16 additions and 1 deletions

View File

@ -25,6 +25,14 @@ if [[ "${SPIFFWORKFLOW_BACKEND_UPGRADE_DB:-}" == "true" ]]; then
poetry run flask db upgrade poetry run flask db upgrade
fi fi
if [[ -z "${GUNICORN_LOG_LEVEL:-}" ]]; then
GUNICORN_LOG_LEVEL=debug
fi
if [[ -z "${GUNICORN_TIMEOUT_SECONDS:-}" ]]; then
GUNICORN_TIMEOUT_SECONDS=90
fi
port="${SPIFFWORKFLOW_BACKEND_PORT:-}" port="${SPIFFWORKFLOW_BACKEND_PORT:-}"
if [[ -z "$port" ]]; then if [[ -z "$port" ]]; then
port=7000 port=7000
@ -53,4 +61,11 @@ git config --global --add safe.directory "${BPMN_SPEC_ABSOLUTE_DIR}"
export IS_GUNICORN="true" export IS_GUNICORN="true"
# THIS MUST BE THE LAST COMMAND! # THIS MUST BE THE LAST COMMAND!
exec poetry run gunicorn ${additional_args} --bind "0.0.0.0:$port" --workers="$workers" --limit-request-line 8192 --timeout 90 --capture-output --access-logfile '-' --log-level debug wsgi:app exec poetry run gunicorn ${additional_args} \
--bind "0.0.0.0:$port" \
--workers="$workers" \
--limit-request-line 8192 \
--timeout "$GUNICORN_TIMEOUT_SECONDS" \
--capture-output \
--access-logfile '-' \
--log-level "$GUNICORN_LOG_LEVEL" wsgi:app