Skip to content

Commit

Permalink
Docker setup: fix CKAN storage dir permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
stsnel committed Jan 6, 2025
1 parent fc99079 commit 66ce375
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/images/ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ ENV CKAN_MSL_CORE_VERSION=development
ENV CKAN_MSL_UTIL_VERSION=development

# Create storage path
RUN mkdir -p $CKAN_STORAGE_PATH/webassets $CKAN_STORAGE_PATH/storage
RUN mkdir -p $CKAN_STORAGE_PATH/webassets $CKAN_STORAGE_PATH/storage && \
chown -R www-data:www-data $CKAN_STORAGE_PATH

# Build-time variables specified by docker-compose.yml / .env
ARG CKAN_SITE_URL
Expand Down
1 change: 1 addition & 0 deletions docker/images/ckan/ckan-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ else echo "Initializing configuration ..."
/usr/lib/ckan/default/bin/ckan -c "$CKAN_CONFIG_FILE" sysadmin add mslapi
sudo chown ckan /ckan_api_key
/usr/lib/ckan/default/bin/ckan -c "$CKAN_CONFIG_FILE" user token add mslapi mslapi | tail -1 | sed 's/^\t//' > /ckan_api_key/api.key
chown -R www-data:www-data "$CKAN_STORAGE_PATH"
touch "$CKAN_INIT_STATUS_FILE"
echo "Configuration and database initialization finished."
fi
Expand Down

0 comments on commit 66ce375

Please sign in to comment.