From 41bab7124dd8422b8537f3ed5c399ebf71ca0e11 Mon Sep 17 00:00:00 2001 From: pedro Date: Tue, 26 Mar 2024 18:35:36 +0100 Subject: [PATCH] enable gunicorn only when EXPERIMENTAL flag move the gunicorn experimentation to a later stage https://gitea.pangea.org/trustchain-oc1-orchestral/IdHub/issues/203 --- docker/idhub.entrypoint.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/idhub.entrypoint.sh b/docker/idhub.entrypoint.sh index cc0e2e7..512b783 100755 --- a/docker/idhub.entrypoint.sh +++ b/docker/idhub.entrypoint.sh @@ -102,10 +102,14 @@ config_oidc4vp() { runserver() { if [ ! "${DEBUG:-}" = "true" ]; then ./manage.py collectstatic - # reloading on source code changing is a debugging future, maybe better then use debug - # src https://stackoverflow.com/questions/12773763/gunicorn-autoreload-on-source-change/24893069#24893069 - # gunicorn with 1 worker, with more than 1 worker this is not expected to work - gunicorn --access-logfile - --error-logfile - -b :${PORT} trustchain_idhub.wsgi:application + if [ "${EXPERIMENTAL:-}" = "true" ]; then + # reloading on source code changing is a debugging future, maybe better then use debug + # src https://stackoverflow.com/questions/12773763/gunicorn-autoreload-on-source-change/24893069#24893069 + # gunicorn with 1 worker, with more than 1 worker this is not expected to work + gunicorn --access-logfile - --error-logfile - -b :${PORT} trustchain_idhub.wsgi:application + else + ./manage.py runserver 0.0.0.0:${PORT} + fi else ./manage.py runserver 0.0.0.0:${PORT} fi