From b63f61d41a98366317ad77f7fb2b2603c56c09f7 Mon Sep 17 00:00:00 2001 From: "filip.mihajlovski" Date: Wed, 6 Jul 2022 14:44:05 +0200 Subject: [PATCH] added var for uswgi workers and if emtpy statment --- images/ckan/2.7/setup/app/start_ckan.sh | 7 ++++++- images/ckan/2.8/setup/app/start_ckan.sh | 7 ++++++- images/ckan/2.9/setup/app/start_ckan.sh | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/images/ckan/2.7/setup/app/start_ckan.sh b/images/ckan/2.7/setup/app/start_ckan.sh index a0bc80d..8dcc548 100755 --- a/images/ckan/2.7/setup/app/start_ckan.sh +++ b/images/ckan/2.7/setup/app/start_ckan.sh @@ -13,7 +13,12 @@ then fi # Set the common uwsgi options -UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch" +if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ]; + then + echo setting USWGI proc to 2 + ${UWSGI_PROC_NO}=2 +fi +UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO} -L --gevent-early-monkey-patch" # Run the prerun script to init CKAN and create the default admin user python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; } diff --git a/images/ckan/2.8/setup/app/start_ckan.sh b/images/ckan/2.8/setup/app/start_ckan.sh index a0bc80d..8dcc548 100755 --- a/images/ckan/2.8/setup/app/start_ckan.sh +++ b/images/ckan/2.8/setup/app/start_ckan.sh @@ -13,7 +13,12 @@ then fi # Set the common uwsgi options -UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch" +if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ]; + then + echo setting USWGI proc to 2 + ${UWSGI_PROC_NO}=2 +fi +UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO} -L --gevent-early-monkey-patch" # Run the prerun script to init CKAN and create the default admin user python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; } diff --git a/images/ckan/2.9/setup/app/start_ckan.sh b/images/ckan/2.9/setup/app/start_ckan.sh index f5d1b87..c55474a 100755 --- a/images/ckan/2.9/setup/app/start_ckan.sh +++ b/images/ckan/2.9/setup/app/start_ckan.sh @@ -13,7 +13,7 @@ then fi # Set the common uwsgi options -if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "null" ] || [ ${UWSGI_PROC_NO} == "" ]; +if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ]; then echo setting USWGI proc to 2 ${UWSGI_PROC_NO}=2