From 8de2c6936ba28ef33cf4c62c0593d78c7e2ac5f5 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Sep 2024 00:49:30 +0800 Subject: [PATCH] Switch to Gunicorn --- requirements.txt | 1 + start.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ff29004..086cc26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -107,3 +107,4 @@ websockets==12.0; python_version >= '3.8' whitenoise==6.6.0 wsproto==1.2.0; python_full_version >= '3.7.0' zope-interface==6.3; python_version >= '3.7' +gunicorn==22.0.0 \ No newline at end of file diff --git a/start.sh b/start.sh index d53bf5d..ca30f44 100644 --- a/start.sh +++ b/start.sh @@ -13,7 +13,8 @@ if [ "$RUN_TYPE" = "web" ]; then if [ "$BACKEND_DEBUG" = 'True' ]; then python manage.py runserver "0.0.0.0:8000" else - python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application + gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application + # python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application fi elif [ "$RUN_TYPE" = "worker" ]; then celery -A config worker -l INFO -E --concurrency 1