From fbe2bbfb340e11b695feaa74fe2bdecf10a6e879 Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 7 Feb 2023 15:38:29 -0500 Subject: [PATCH] allow configuring gunicorn configs in boot_server_in_docker w/ burnettk --- spiffworkflow-backend/bin/boot_server_in_docker | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-backend/bin/boot_server_in_docker b/spiffworkflow-backend/bin/boot_server_in_docker index cddba787..c0b233a8 100755 --- a/spiffworkflow-backend/bin/boot_server_in_docker +++ b/spiffworkflow-backend/bin/boot_server_in_docker @@ -25,6 +25,14 @@ if [[ "${SPIFFWORKFLOW_BACKEND_UPGRADE_DB:-}" == "true" ]]; then poetry run flask db upgrade 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:-}" if [[ -z "$port" ]]; then port=7000 @@ -53,4 +61,11 @@ git config --global --add safe.directory "${BPMN_SPEC_ABSOLUTE_DIR}" export IS_GUNICORN="true" # 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