From e5447ef32b2bd6a9ce420c74ba357f6ca213b6b4 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:00:39 +0200 Subject: [PATCH] Add CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT ennvar Allow to set the default catalog endpoint of the portal. --- .env.example | 2 ++ ckan/docker-entrypoint.d/03_setup_dcat.sh | 1 + samples/.env.apache.example | 2 ++ samples/.env.localhost | 2 ++ samples/.env.nginx.example | 2 ++ samples/custom/.env.es.example | 2 ++ 6 files changed, 11 insertions(+) diff --git a/.env.example b/.env.example index b22dbce..eafd94b 100644 --- a/.env.example +++ b/.env.example @@ -139,6 +139,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan CKANEXT__DCAT__BASE_URI=${CKAN_URL} # Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2' +# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf +CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}' # ckanext-spatial (Solr Backend - solr8-spatial) CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox diff --git a/ckan/docker-entrypoint.d/03_setup_dcat.sh b/ckan/docker-entrypoint.d/03_setup_dcat.sh index 9c8f5ae..2a1efb9 100644 --- a/ckan/docker-entrypoint.d/03_setup_dcat.sh +++ b/ckan/docker-entrypoint.d/03_setup_dcat.sh @@ -4,4 +4,5 @@ echo "Loading ckanext-dcat settings in the CKAN config file" ckan config-tool $CKAN_INI \ "ckanext.dcat.base_uri = $CKANEXT__DCAT__BASE_URI" \ + "ckanext.dcat.catalog_endpoint = $CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT" \ "ckanext.dcat.rdf.profiles = $CKANEXT__DCAT__RDF_PROFILES" \ No newline at end of file diff --git a/samples/.env.apache.example b/samples/.env.apache.example index 1c5c705..95c59e2 100644 --- a/samples/.env.apache.example +++ b/samples/.env.apache.example @@ -131,6 +131,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog # Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2' +# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf +CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}' # ckanext-spatial (Solr Backend - solr8-spatial) CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox diff --git a/samples/.env.localhost b/samples/.env.localhost index a9e626a..5b70930 100644 --- a/samples/.env.localhost +++ b/samples/.env.localhost @@ -139,6 +139,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog # Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2' +# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf +CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}' # ckanext-spatial (Solr Backend - solr8-spatial) CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox diff --git a/samples/.env.nginx.example b/samples/.env.nginx.example index 15be727..d124b5d 100644 --- a/samples/.env.nginx.example +++ b/samples/.env.nginx.example @@ -131,6 +131,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog # Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2' +# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf +CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}' # ckanext-spatial (Solr Backend - solr8-spatial) CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox diff --git a/samples/custom/.env.es.example b/samples/custom/.env.es.example index 2ce76ce..8e3f271 100644 --- a/samples/custom/.env.es.example +++ b/samples/custom/.env.es.example @@ -139,6 +139,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog # Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2' +# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf +CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}' # ckanext-spatial (Solr Backend - solr8-spatial) CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox