From b2994504ceec4a12f8b286acbd91755de0d1a036 Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Thu, 21 Sep 2023 12:49:54 +0200
Subject: [PATCH 01/11] Update base profile to euro_dcat_ap_2
- Update map attribution to SCNE (Spain).
---
.env.example | 5 +++--
samples/.env.apache.example | 5 +++--
samples/.env.localhost | 5 +++--
samples/.env.nginx.example | 5 +++--
samples/custom/.env.es.example | 5 +++--
5 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/.env.example b/.env.example
index 08c86cc2..69f07bad 100644
--- a/.env.example
+++ b/.env.example
@@ -137,14 +137,15 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
-CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
+# 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'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. CNIG, bajo CC BY 4.0.'
+CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo CNIG, bajo CC BY 4.0.'
+CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo CNIG, bajo CC BY 4.0.'
+CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo CNIG, bajo CC BY 4.0.'
+CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo CNIG, bajo CC BY 4.0.'
+CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo
Date: Fri, 22 Sep 2023 09:02:40 +0000
Subject: [PATCH 03/11] Update .envs catalog/csw base uris for scheming_dcat
---
.env.example | 4 ++--
samples/.env.apache.example | 2 +-
samples/.env.localhost | 2 +-
samples/.env.nginx.example | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.env.example b/.env.example
index 69f07bad..bb771540 100644
--- a/.env.example
+++ b/.env.example
@@ -136,7 +136,7 @@ CKANEXT__XLOADER__API_TOKEN=api_token
CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
-CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
+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'
@@ -155,7 +155,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
-CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
+CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"
diff --git a/samples/.env.apache.example b/samples/.env.apache.example
index 0abf68cc..ff0789b3 100644
--- a/samples/.env.apache.example
+++ b/samples/.env.apache.example
@@ -147,7 +147,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
-CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
+CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"
diff --git a/samples/.env.localhost b/samples/.env.localhost
index 3f266c4f..5346e05d 100644
--- a/samples/.env.localhost
+++ b/samples/.env.localhost
@@ -155,7 +155,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
-CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
+CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"
diff --git a/samples/.env.nginx.example b/samples/.env.nginx.example
index 297a1c69..0b22171a 100644
--- a/samples/.env.nginx.example
+++ b/samples/.env.nginx.example
@@ -147,7 +147,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
-CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
+CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"
From 48082c544b5c572e2cb3c6aefc44b156f29f187c Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 09:03:00 +0000
Subject: [PATCH 04/11] Update mjanez/ckanext-dcat to v1.2.0
---
ckan/Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ckan/Dockerfile b/ckan/Dockerfile
index 70ccd9a9..f1095d29 100644
--- a/ckan/Dockerfile
+++ b/ckan/Dockerfile
@@ -12,7 +12,7 @@ COPY req_fixes ${APP_DIR}/req_fixes
### Harvester - v1.5.1 ###
### Geoview - v0.0.20 ###
### Spatial - v2.0.0 ### fixed requirements.txt
-### DCAT - v1.1.0-geodcatap (GeoDCAT-AP extended version) ###
+### DCAT - v1.2.0-geodcatap (GeoDCAT-AP extended version) ###
### Scheming - release-3.0.0 ###
### Resource dictionary - v1.0.1 ###
### Pages - v0.5.2 ###
@@ -35,7 +35,7 @@ RUN echo ${TZ} > /etc/timezone && \
pip3 install -e git+https://github.com/ckan/ckanext-spatial.git@v2.0.0#egg=ckanext-spatial && \
pip3 install -r ${APP_DIR}/req_fixes/ckanext-spatial_requirements.txt && \
echo "mjanez/ckanext-dcat (GeoDCAT-AP extended version)" && \
- pip3 install -e git+https://github.com/mjanez/ckanext-dcat.git@v1.1.0-geodcatap#egg=ckanext-dcat && \
+ pip3 install -e git+https://github.com/mjanez/ckanext-dcat.git@v1.2.0-geodcatap#egg=ckanext-dcat && \
pip3 install -r ${APP_DIR}/src/ckanext-dcat/requirements.txt && \
echo "ckan/ckanext-scheming" && \
pip3 install -e git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming && \
From 58423f1a495ec5f043c9efd87b9179b3cd2f9b2e Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 09:28:56 +0000
Subject: [PATCH 05/11] Update default .env.example with not ES info
---
.env.example | 4 ++--
samples/custom/.env.es.example | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.env.example b/.env.example
index bb771540..b22dbce2 100644
--- a/.env.example
+++ b/.env.example
@@ -144,8 +144,8 @@ CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
-CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo Stamen Design (CC BY 3.0). Data by OpenStreetMap (CC BY SA)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
diff --git a/samples/custom/.env.es.example b/samples/custom/.env.es.example
index 98551169..3d79b4b6 100644
--- a/samples/custom/.env.es.example
+++ b/samples/custom/.env.es.example
@@ -154,6 +154,8 @@ CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857
CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
+## CSW Endpoint for spatial metadata
+CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_group.json"
From c302fdc79efc07144efc8c1326cf36e3d5ff332f Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 09:38:10 +0000
Subject: [PATCH 06/11] Update attribution for .env /samples/*
---
samples/.env.apache.example | 4 ++--
samples/.env.localhost | 4 ++--
samples/.env.nginx.example | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/samples/.env.apache.example b/samples/.env.apache.example
index ff0789b3..1c5c7056 100644
--- a/samples/.env.apache.example
+++ b/samples/.env.apache.example
@@ -136,8 +136,8 @@ CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
-CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo Stamen Design (CC BY 3.0). Data by OpenStreetMap (CC BY SA)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
diff --git a/samples/.env.localhost b/samples/.env.localhost
index 5346e05d..a9e626a3 100644
--- a/samples/.env.localhost
+++ b/samples/.env.localhost
@@ -144,8 +144,8 @@ CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
-CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo Stamen Design (CC BY 3.0). Data by OpenStreetMap (CC BY SA)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
diff --git a/samples/.env.nginx.example b/samples/.env.nginx.example
index 0b22171a..15be727e 100644
--- a/samples/.env.nginx.example
+++ b/samples/.env.nginx.example
@@ -136,8 +136,8 @@ CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
-CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo Stamen Design (CC BY 3.0). Data by OpenStreetMap (CC BY SA)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
From eea2a8b4aad91595aed130ee93fac0dc7661fe00 Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 10:37:54 +0000
Subject: [PATCH 07/11] Fix map attribution
---
samples/custom/.env.es.example | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/custom/.env.es.example b/samples/custom/.env.es.example
index 3d79b4b6..2ce76ce4 100644
--- a/samples/custom/.env.es.example
+++ b/samples/custom/.env.es.example
@@ -145,7 +145,7 @@ CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
-CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='SCNE, bajo SCNE, bajo CC BY 4.0'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
From f86e1be5a5ed4433272c51a4fc1c29be91a4e67d Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 12:08:24 +0000
Subject: [PATCH 08/11] Fix non-root user execution of ckan-pycsw
- Also add pycsw.conf INSPIRE extended info.
---
ckan-pycsw/Dockerfile | 2 +-
ckan-pycsw/docker-entrypoint.d/entrypoint.sh | 7 +++++++
ckan-pycsw/pycsw/conf/pycsw.conf.template | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ckan-pycsw/Dockerfile b/ckan-pycsw/Dockerfile
index 92f473a7..3d2c7ebe 100644
--- a/ckan-pycsw/Dockerfile
+++ b/ckan-pycsw/Dockerfile
@@ -19,6 +19,6 @@ WORKDIR ${APP_DIR}
# Update files if needed
COPY pycsw/conf/pycsw.conf.template docker-entrypoint.d/entrypoint.sh ./
-USER $USERNAME
+USER root
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
\ No newline at end of file
diff --git a/ckan-pycsw/docker-entrypoint.d/entrypoint.sh b/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
index 9e24c2e2..c7a0e608 100644
--- a/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
+++ b/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
@@ -2,6 +2,13 @@
set -xeuo pipefail
+# Change ownership of log and metadata directories
+chown -R $USERNAME:$USERNAME ${APP_DIR}/log
+chown -R $USERNAME:$USERNAME ${APP_DIR}/metadata
+
+# Switch to the non-root user
+su - $USERNAME
+
envsubst < pycsw.conf.template > pycsw.conf
#TODO: -Xfrozen_modules=off from: https://bugs.python.org/issue1666807
diff --git a/ckan-pycsw/pycsw/conf/pycsw.conf.template b/ckan-pycsw/pycsw/conf/pycsw.conf.template
index 607c3f3d..87826a3e 100644
--- a/ckan-pycsw/pycsw/conf/pycsw.conf.template
+++ b/ckan-pycsw/pycsw/conf/pycsw.conf.template
@@ -57,7 +57,7 @@ database=sqlite:///${PWD}/cite.db
table=records
#filter=type='http://purl.org/dc/dcmitype/Dataset'
-#[metadata:inspire]
+[metadata:inspire]
enabled=true
languages_supported=eng,spa
default_language=eng
From 94573c4290b57877735bdfc470b83d6834fa8e2b Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Fri, 22 Sep 2023 16:07:57 +0000
Subject: [PATCH 09/11] Fix ckan-pycsw service
---
ckan-pycsw/Dockerfile | 3 +--
ckan-pycsw/docker-entrypoint.d/entrypoint.sh | 7 -------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/ckan-pycsw/Dockerfile b/ckan-pycsw/Dockerfile
index 3d2c7ebe..4fa1f0e9 100644
--- a/ckan-pycsw/Dockerfile
+++ b/ckan-pycsw/Dockerfile
@@ -1,5 +1,6 @@
# Base image
FROM ghcr.io/mjanez/ckan-pycsw:main AS base
+LABEL maintainer="mnl.janez@gmail.com"
# ckan-pycsw envvars
ENV APP_DIR=/app
@@ -19,6 +20,4 @@ WORKDIR ${APP_DIR}
# Update files if needed
COPY pycsw/conf/pycsw.conf.template docker-entrypoint.d/entrypoint.sh ./
-USER root
-
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
\ No newline at end of file
diff --git a/ckan-pycsw/docker-entrypoint.d/entrypoint.sh b/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
index c7a0e608..9e24c2e2 100644
--- a/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
+++ b/ckan-pycsw/docker-entrypoint.d/entrypoint.sh
@@ -2,13 +2,6 @@
set -xeuo pipefail
-# Change ownership of log and metadata directories
-chown -R $USERNAME:$USERNAME ${APP_DIR}/log
-chown -R $USERNAME:$USERNAME ${APP_DIR}/metadata
-
-# Switch to the non-root user
-su - $USERNAME
-
envsubst < pycsw.conf.template > pycsw.conf
#TODO: -Xfrozen_modules=off from: https://bugs.python.org/issue1666807
From 54a807a23d299a42bd89d5cd46866a9144489b02 Mon Sep 17 00:00:00 2001
From: mjanez <96422458+mjanez@users.noreply.github.com>
Date: Mon, 25 Sep 2023 07:53:45 +0000
Subject: [PATCH 10/11] Update plugins
- scheming_dcat to v2.0.0
---
ckan/Dockerfile | 8 ++++----
ckan/req_fixes/ckanext-spatial_requirements.txt | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ckan/Dockerfile b/ckan/Dockerfile
index f1095d29..66e9b08b 100644
--- a/ckan/Dockerfile
+++ b/ckan/Dockerfile
@@ -12,12 +12,12 @@ COPY req_fixes ${APP_DIR}/req_fixes
### Harvester - v1.5.1 ###
### Geoview - v0.0.20 ###
### Spatial - v2.0.0 ### fixed requirements.txt
-### DCAT - v1.2.0-geodcatap (GeoDCAT-AP extended version) ###
+### DCAT - v1.2.0-geodcatap (GeoDCAT-AP/NTI-RISP extended version) ###
### Scheming - release-3.0.0 ###
### Resource dictionary - v1.0.1 ###
### Pages - v0.5.2 ###
### PDFView - 0.0.8 ###
-### Scheming DCAT - v1.2.0 (GeoDCAT-AP extended version) ###
+### Scheming DCAT - v2.0.0 (GeoDCAT-AP/NTI-RISP extended version) ###
### SPARQL Interface - 2.0.1 ###
RUN echo ${TZ} > /etc/timezone && \
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime ; fi && \
@@ -46,8 +46,8 @@ RUN echo ${TZ} > /etc/timezone && \
echo "ckan/ckanext-pdfview" && \
pip3 install -e git+https://github.com/ckan/ckanext-pdfview.git@0.0.8#egg=ckanext-pdfview && \
echo "mjanez/ckanext-scheming_dcat" && \
- pip3 install -e git+https://github.com/mjanez/ckanext-scheming_dcat.git@v1.2.0#egg=ckanext_scheming_dcat && \
- pip3 install -r https://raw.githubusercontent.com/mjanez/ckanext-scheming_dcat/v1.2.0/requirements.txt
+ pip3 install -e git+https://github.com/mjanez/ckanext-scheming_dcat.git@v2.0.0#egg=ckanext_scheming_dcat && \
+ pip3 install -r https://raw.githubusercontent.com/mjanez/ckanext-scheming_dcat/v2.0.0/requirements.txt
# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
COPY docker-entrypoint.d/* /docker-entrypoint.d/
diff --git a/ckan/req_fixes/ckanext-spatial_requirements.txt b/ckan/req_fixes/ckanext-spatial_requirements.txt
index 49be23ef..0c15f3c0 100644
--- a/ckan/req_fixes/ckanext-spatial_requirements.txt
+++ b/ckan/req_fixes/ckanext-spatial_requirements.txt
@@ -5,9 +5,9 @@ pyparsing>=2.1.10
requests>=1.1.0
six
-# requirements pyproj tempfix: https://github.com/pyproj4/pyproj/issues/1321
+# requirements pyproj fix: https://github.com/pyproj4/pyproj/issues/1321
pyproj==2.6.1; python_version < '3.9'
-pyproj @ git+https://github.com/pyproj4/pyproj.git@main; python_version >= '3.9'
+pyproj==3.6.1; python_version >= '3.9'
Shapely==2.0.1
OWSLib==0.28.1
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 11/11] 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 b22dbce2..eafd94b5 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 9c8f5ae4..2a1efb9a 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 1c5c7056..95c59e29 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 a9e626a3..5b70930e 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 15be727e..d124b5df 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 2ce76ce4..8e3f271a 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