changed CKAN_INI to APP_DIR

This commit is contained in:
stojanovskis1@icloud.com 2023-01-23 12:39:57 +01:00
parent 4a9854e3b5
commit 24d7858815
6 changed files with 11 additions and 11 deletions

View File

@ -158,7 +158,7 @@ RUN pip install -e /srv/app/src/ckan && \
echo "UTC" > /etc/timezone && \ echo "UTC" > /etc/timezone && \
# Generate CKAN config # Generate CKAN config
paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \ 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}" && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
# Set the default level for extensions to INFO # Set the default level for extensions to INFO
paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \

View File

@ -12,10 +12,10 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" ckan.ini if grep -E "beaker.session.secret ?= ?$" production.ini
then then
echo "Setting beaker.session.secret in ini file" 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 fi
# Set the common uwsgi options # Set the common uwsgi options

View File

@ -151,7 +151,7 @@ RUN pip install -e /srv/app/src/ckan && \
echo "UTC" > /etc/timezone && \ echo "UTC" > /etc/timezone && \
# Generate CKAN config # Generate CKAN config
paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \ 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}" && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
# Set the default level for extensions to INFO # Set the default level for extensions to INFO
paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \ paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \

View File

@ -12,10 +12,10 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" ckan.ini if grep -E "beaker.session.secret ?= ?$" production.ini
then then
echo "Setting beaker.session.secret in ini file" 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 fi
# Set the common uwsgi options # Set the common uwsgi options

View File

@ -162,7 +162,7 @@ RUN pip install -e /srv/app/src/ckan && \
echo "UTC" > /etc/timezone && \ echo "UTC" > /etc/timezone && \
# Generate CKAN config # Generate CKAN config
ckan generate config ${APP_DIR}/production.ini && \ 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 # Configure plugins
ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \ ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
# Create the data directory # Create the data directory

View File

@ -12,12 +12,12 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" ckan.ini if grep -E "beaker.session.secret ?= ?$" production.ini
then then
echo "Setting secrets in ini file" 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 $APP_DIR "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 $APP_DIR "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 "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')"
fi fi
echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers" echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"