diff --git a/images/ckan/2.7/setup/app/start_ckan.sh b/images/ckan/2.7/setup/app/start_ckan.sh index b0227c7..a7bf12a 100755 --- a/images/ckan/2.7/setup/app/start_ckan.sh +++ b/images/ckan/2.7/setup/app/start_ckan.sh @@ -12,10 +12,10 @@ then done fi -if grep -E "beaker.session.secret ?= ?$" production.ini +if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini then echo "Setting beaker.session.secret in ini file" - paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" + paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" fi # Set the common uwsgi options diff --git a/images/ckan/2.8/setup/app/start_ckan.sh b/images/ckan/2.8/setup/app/start_ckan.sh index b0227c7..a7bf12a 100755 --- a/images/ckan/2.8/setup/app/start_ckan.sh +++ b/images/ckan/2.8/setup/app/start_ckan.sh @@ -12,10 +12,10 @@ then done fi -if grep -E "beaker.session.secret ?= ?$" production.ini +if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini then echo "Setting beaker.session.secret in ini file" - paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" + paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" fi # Set the common uwsgi options diff --git a/images/ckan/2.9/setup/app/start_ckan.sh b/images/ckan/2.9/setup/app/start_ckan.sh index 17ec157..f1b5986 100755 --- a/images/ckan/2.9/setup/app/start_ckan.sh +++ b/images/ckan/2.9/setup/app/start_ckan.sh @@ -12,12 +12,12 @@ then done fi -if grep -E "beaker.session.secret ?= ?$" production.ini +if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini then echo "Setting secrets in ini file" - ckan config-tool $APP_DIR "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')" - ckan config-tool $APP_DIR "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" - ckan config-tool $APP_DIR "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" + ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')" + ckan config-tool $APP_DIR/production.ini "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" + ckan config-tool $APP_DIR/production.ini "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" fi echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"