diff --git a/images/ckan/2.7/Dockerfile b/images/ckan/2.7/Dockerfile index 2464781..4f2fc2d 100644 --- a/images/ckan/2.7/Dockerfile +++ b/images/ckan/2.7/Dockerfile @@ -158,7 +158,7 @@ RUN pip install -e /srv/app/src/ckan && \ echo "UTC" > /etc/timezone && \ # Generate CKAN config paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \ - paster --plugin=ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ + paster --plugin=ckan config-tool ${APP_DIR} "beaker.session.secret = " && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \ # Set the default level for extensions to INFO paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \ diff --git a/images/ckan/2.7/setup/app/start_ckan.sh b/images/ckan/2.7/setup/app/start_ckan.sh index e8584bd..b0227c7 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 ?= ?$" ckan.ini +if grep -E "beaker.session.secret ?= ?$" production.ini then echo "Setting beaker.session.secret in ini file" - paster --plugin=ckan config-tool $CKAN_INI "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" + paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" fi # Set the common uwsgi options diff --git a/images/ckan/2.8/Dockerfile b/images/ckan/2.8/Dockerfile index 332939e..061173d 100644 --- a/images/ckan/2.8/Dockerfile +++ b/images/ckan/2.8/Dockerfile @@ -151,7 +151,7 @@ RUN pip install -e /srv/app/src/ckan && \ echo "UTC" > /etc/timezone && \ # Generate CKAN config paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \ - paster --plugin=ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ + paster --plugin=ckan config-tool ${APP_DIR} "beaker.session.secret = " && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \ # Set the default level for extensions to INFO paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \ diff --git a/images/ckan/2.8/setup/app/start_ckan.sh b/images/ckan/2.8/setup/app/start_ckan.sh index e8584bd..b0227c7 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 ?= ?$" ckan.ini +if grep -E "beaker.session.secret ?= ?$" production.ini then echo "Setting beaker.session.secret in ini file" - paster --plugin=ckan config-tool $CKAN_INI "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" + paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" fi # Set the common uwsgi options diff --git a/images/ckan/2.9/Dockerfile b/images/ckan/2.9/Dockerfile index 8a22e6c..7a3679b 100644 --- a/images/ckan/2.9/Dockerfile +++ b/images/ckan/2.9/Dockerfile @@ -162,7 +162,7 @@ RUN pip install -e /srv/app/src/ckan && \ echo "UTC" > /etc/timezone && \ # Generate CKAN config ckan generate config ${APP_DIR}/production.ini && \ - ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ + ckan config-tool ${APP_DIR} "beaker.session.secret = " && \ # Configure plugins ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \ # Create the data directory diff --git a/images/ckan/2.9/setup/app/start_ckan.sh b/images/ckan/2.9/setup/app/start_ckan.sh index 2210987..17ec157 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 ?= ?$" ckan.ini +if grep -E "beaker.session.secret ?= ?$" production.ini then echo "Setting secrets in ini file" - ckan config-tool $CKAN_INI "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')" - ckan config-tool $CKAN_INI "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" - ckan config-tool $CKAN_INI "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" + 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())')" fi echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"