diff --git a/docker/images/ckan/Dockerfile b/docker/images/ckan/Dockerfile index e758350..2f3dcc4 100644 --- a/docker/images/ckan/Dockerfile +++ b/docker/images/ckan/Dockerfile @@ -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 diff --git a/docker/images/ckan/ckan-entrypoint.sh b/docker/images/ckan/ckan-entrypoint.sh index b54c7db..b5e8514 100644 --- a/docker/images/ckan/ckan-entrypoint.sh +++ b/docker/images/ckan/ckan-entrypoint.sh @@ -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