Update CKAN configuration to include custom licenses aligned with DCAT-AP

This commit is contained in:
mjanez 2024-08-01 02:32:26 +02:00
parent 797a4095e0
commit d686d245d6
No known key found for this signature in database
GPG Key ID: 7A62FDE17C5A4929
3 changed files with 12 additions and 0 deletions

View File

@ -94,6 +94,8 @@ CKAN__ROOT_PATH=${PROXY_CKAN_LOCATION}/{{LANG}}
CKAN_PORT=5000
CKAN__FAVICON=${PROXY_CKAN_LOCATION}/base/images/ckan.ico
CKAN__SITE_LOGO=/images/default/ckan-logo.png
# Custom licenses that are aligned with DCAT-AP
CKAN___LICENSES_GROUP_URL=https://raw.githubusercontent.com/mjanez/ckanext-schemingdcat/main/ckanext/schemingdcat/public/static/licenses.json
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME
# See https://docs.ckan.org/en/latest/maintaining/configuration.html#api-token-settings
CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME

View File

@ -9,6 +9,11 @@ then
JWT_SECRET=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')
ckan config-tool $CKAN_INI "api_token.jwt.encode.secret=${JWT_SECRET}"
ckan config-tool $CKAN_INI "api_token.jwt.decode.secret=${JWT_SECRET}"
echo "Update licenses in CKAN"
if [ -n "$CKAN___LICENSES_GROUP_URL" ]; then
ckan config-tool $CKAN_INI "licenses_group_url=${CKAN___LICENSES_GROUP_URL}"
fi
fi
# Run the prerun script to init CKAN and create the default admin user

View File

@ -54,6 +54,11 @@ then
JWT_SECRET=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')
ckan config-tool $CKAN_INI "api_token.jwt.encode.secret=${JWT_SECRET}"
ckan config-tool $CKAN_INI "api_token.jwt.decode.secret=${JWT_SECRET}"
echo "Update licenses in CKAN"
if [ -n "$CKAN___LICENSES_GROUP_URL" ]; then
ckan config-tool $CKAN_INI "licenses_group_url=${CKAN___LICENSES_GROUP_URL}"
fi
fi
# Update the plugins setting in the ini file with the values defined in the env var