From eb80cde2a818fa902d6c9f3a4120d90955bb3de7 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Mon, 30 Sep 2024 20:04:59 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9B=A0=EF=B8=8F=20update=20CKAN?= =?UTF-8?q?=20plugins=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add new CKAN plugins to the configuration and remove duplicated plugin assignment in Dockerfile. This change ensures that all required plugins are correctly listed and managed through environment variables. --- compose/2.11/.ckan-env | 2 +- compose/2.11/Dockerfile | 6 +----- .../2.11/docker-entrypoint.d/01_set_extensions_config.sh | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/compose/2.11/.ckan-env b/compose/2.11/.ckan-env index 87ae4cc..991f415 100644 --- a/compose/2.11/.ckan-env +++ b/compose/2.11/.ckan-env @@ -17,7 +17,7 @@ CKAN___BEAKER__SESSION__SECRET=CHANGE_ME CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME CKAN___API_TOKEN__JWT__DECODE__SECRET=string:CHANGE_ME # CKAN Plugins -#CKAN__PLUGINS="envvars image_view text_view datatables_view datastore datapusher spatial_metadata spatial_query d4science d4science_theme" +CKAN__PLUGINS="envvars tracking image_view text_view datatables_view datastore datapusher spatial_metadata spatial_query harvest ckan_harvester googleanalytics dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface structured_data d4science d4science_theme" # CKAN requires storage path to be set in order for filestore to be enabled CKAN__STORAGE_PATH=/srv/app/data CKAN__WEBASSETS__PATH=/srv/app/data/webassets diff --git a/compose/2.11/Dockerfile b/compose/2.11/Dockerfile index b4ea116..9695da1 100644 --- a/compose/2.11/Dockerfile +++ b/compose/2.11/Dockerfile @@ -15,9 +15,6 @@ USER root ############ FROM d4science/ckan:2.11.0-focal -# Add the custom extensions to the plugins list -ENV CKAN__PLUGINS="envvars tracking image_view text_view datatables_view datastore datapusher spatial_metadata spatial_query harvest ckan_harvester googleanalytics dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface structured_data d4science d4science_theme" - # Switch to the root user USER root @@ -30,8 +27,7 @@ COPY extensions-requirements.txt /srv/app/extensions-requirements.txt RUN pip install -r /srv/app/extensions-requirements.txt -RUN ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \ - chown -R ckan:ckan /srv/app +RUN chown -R ckan:ckan /srv/app # Remove wheels RUN rm -rf /srv/app/ext_wheels diff --git a/compose/2.11/docker-entrypoint.d/01_set_extensions_config.sh b/compose/2.11/docker-entrypoint.d/01_set_extensions_config.sh index 7b822fa..39da557 100644 --- a/compose/2.11/docker-entrypoint.d/01_set_extensions_config.sh +++ b/compose/2.11/docker-entrypoint.d/01_set_extensions_config.sh @@ -1,6 +1,7 @@ #!/bin/bash declare -A config_values=( + ["ckan.plugins"]="${CKAN__PLUGINS}" ["ckanext.spatial.common_map.type"]="Stadia.StamenTerrain" ["ckanext.spatial.common_map.max_zoom"]="18" ["ckanext.spatial.search_backend"]="solr-spatial-field"