From c2980693e36e5d6ebd6d7cadc131e0046a065bed Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 16 Sep 2022 15:34:33 +0900 Subject: [PATCH] Update script to capture stdout/stderr --- tools/prod-django.sh | 8 +++++++- tools/run.sh | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/prod-django.sh b/tools/prod-django.sh index 976075ea..7218944c 100755 --- a/tools/prod-django.sh +++ b/tools/prod-django.sh @@ -31,4 +31,10 @@ if [[ -n "${ADMIN_USERNAME}" ]] && [[ -n "${ADMIN_PASSWORD}" ]] && [[ -n "${ADMI fi echo "Starting django" -gunicorn --bind="${HOST:-0.0.0.0}:${PORT:-8000}" --workers="${WORKERS:-4}" config.wsgi --timeout 300 +gunicorn \ + --bind="${HOST:-0.0.0.0}:${PORT:-8000}" \ + --workers="${WORKERS:-4}" \ + --timeout=300 \ + --capture-output \ + --log-level info \ + config.wsgi diff --git a/tools/run.sh b/tools/run.sh index 9f52cd45..81a9d715 100755 --- a/tools/run.sh +++ b/tools/run.sh @@ -35,8 +35,13 @@ if [[ -n "${ADMIN_USERNAME}" ]] && [[ -n "${ADMIN_PASSWORD}" ]] && [[ -n "${ADMI fi echo "Starting django" -# gunicorn --bind="0.0.0.0:${PORT:-8000}" --workers="${WORKERS:-4}" app.wsgi --timeout 300 -gunicorn --bind="0.0.0.0:${PORT:-8000}" --workers="${WORKERS:-1}" config.wsgi --timeout=300 & +gunicorn \ + --bind="0.0.0.0:${PORT:-8000}" \ + --workers="${WORKERS:-1}" \ + --timeout=300 \ + --capture-output \ + --log-level info \ + config.wsgi & gunicorn_pid="$!" echo "Starting celery"