Skip to content

Commit

Permalink
added ckan.datapusher.api_token in 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
stojanovskis1 committed Jan 17, 2024
1 parent ee259e1 commit 8e78f7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions images/ckan/2.10/setup/app/start_ckan.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

# Add ckan.datapusher.api_token to the CKAN config file (updated with corrected value later)
ckan config-tool $APP_DIR/production.ini ckan.datapusher.api_token=xxx

# Run any startup scripts provided by images extending this one
if [[ -d "${APP_DIR}/docker-entrypoint.d" ]]
then
Expand Down Expand Up @@ -38,6 +42,9 @@ UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master
# Run the prerun script to init CKAN and create the default admin user
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }

echo "Set up ckan.datapusher.api_token in the CKAN config file"
ckan config-tool $APP_DIR/production.ini "ckan.datapusher.api_token=$(ckan -c $APP_DIR/production.ini user token add ckan_admin datapusher | tail -n 1 | tr -d '\t')"

# Check if we are in maintenance mode and if yes serve the maintenance pages
if [ "$MAINTENANCE_MODE" = true ]; then PYTHONUNBUFFERED=1 python maintenance/serve.py; fi

Expand Down

0 comments on commit 8e78f7c

Please sign in to comment.