Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CKAN deployment to CKAN 2.10 #149

Merged
merged 27 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
97dfed6
Update CKAN deployment to CKAN 2.10
mjanez Sep 16, 2024
7136656
Add docs about ckanet-schemingdcat harvesters.
mjanez Sep 16, 2024
ec0b2fa
Update plugins and remove who.ini
mjanez Sep 18, 2024
e082565
Refactor prerun.py.override to improve database connection checks and…
mjanez Sep 18, 2024
cb278d1
Refactor start_ckan_development.sh.override to update licenses group …
mjanez Sep 18, 2024
c126c24
Update licenses group URL in CKAN configuration and add a workaround …
mjanez Sep 18, 2024
5d2aaf1
Update ennvars
mjanez Sep 18, 2024
10e3db2
Update .gitignore to include .env.codespaces file
mjanez Sep 18, 2024
7a819c3
Update .gitignore to include docker-compose.local-*.yml file
mjanez Sep 18, 2024
d312797
Fix start_ckan.sh.override for clearer CSRF check and update PROXY_SE…
mjanez Sep 18, 2024
6adab9d
Remove unnecesary who.ini config
mjanez Sep 18, 2024
916d405
Update CSW catalog information with envvars
mjanez Sep 19, 2024
ae97c91
Remove unnecessary files related to updating who.ini
mjanez Sep 19, 2024
a7c2031
Update CKAN core settings and ckanext-schemingdcat settings
mjanez Sep 19, 2024
a646b49
Add patch to fix ckanext-pages
mjanez Sep 19, 2024
b1495c1
Merge branch 'ckan-2.10.5' of https://github.com/mjanez/ckan-docker i…
mjanez Sep 19, 2024
ad6977a
Update Scheming DCAT version to v4.0.0
mjanez Sep 20, 2024
05edcca
Fix CKAN xloader API token creation
mjanez Sep 20, 2024
09b8787
Update CKAN core and ckanext-schemingdcat settings
mjanez Sep 22, 2024
7f1e0b4
Merge branch 'master' into ckan-2.10.5
mjanez Sep 22, 2024
c4c58f6
Update CKAN preview and DCAT default profiles
mjanez Sep 23, 2024
3fdab45
Remove --plugins options from uWSGI configuration
mjanez Sep 23, 2024
4578814
Replace crond with debian-based cron in CKAN startup script for backg…
mjanez Sep 23, 2024
f415ab6
Update xloader log file paths to use /var/log/xloader for consistency
mjanez Sep 23, 2024
c0185a5
Update Dockerfile to install cron for scheduled tasks and upgrade CKA…
mjanez Sep 23, 2024
ee9bfa1
Optimize uWSGI configuration for improved performance and resource ma…
mjanez Sep 23, 2024
6a75fd0
Refactor uWSGI options in start_ckan.sh.override to using lower options
mjanez Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 62 additions & 20 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ APP_DIR=/srv/app
CKAN_PORT_HOST=5000
# Common proxy server for Apache or NGINX.
# Change all the PROXY_SERVER_PORT_HOST to PROXY_SERVER_HTTPS_PORT_HOST if you can use HTTPS instead of HTTP (Only for NGINX and not development compose)
PROXY_SERVER_PORT_HOST=81
PROXY_SERVER_BASE_PORT_HOST=81
PROXY_SERVER_HTTPS_PORT_HOST=8443
NGINX_PORT_HOST=${PROXY_SERVER_PORT_HOST}
# Server port for the proxy server. Better using the SSL port for production, in DEV or if using balancer: PROXY_SERVER_PORT_HOST=PROXY_SERVER_BASE_PORT_HOST
PROXY_SERVER_PORT_HOST=${PROXY_SERVER_HTTPS_PORT_HOST}
NGINX_PORT_HOST=${PROXY_SERVER_BASE_PORT_HOST}
NGINX_SSLPORT_HOST=${PROXY_SERVER_HTTPS_PORT_HOST}
APACHE_PORT_HOST=${PROXY_SERVER_PORT_HOST}
APACHE_PORT_HOST=${PROXY_SERVER_BASE_PORT_HOST}
PYCSW_PORT_HOST=8000

# Solr
Expand Down Expand Up @@ -41,7 +43,9 @@ APACHE_LOG_DIR=/var/log/apache
#NGINX/APACHE
## Check CKAN__ROOT_PATH and CKANEXT__DCAT__BASE_URI and CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI. If you don't need to use domain locations, it is better to use the nginx configuration. Leave blank or use the root `/`. If you dont need PROXY_SERVER_PORT_HOST (e.g. is 80), edit the PROXY_SERVER_URL and remove :${PROXY_SERVER_PORT_HOST}
PROXY_SERVER_NAME=localhost
PROXY_SERVER_URL=http://${PROXY_SERVER_NAME}:${PROXY_SERVER_PORT_HOST}
# URL protocol. Change to https if you use SSL
PROXY_SERVER_PROTOCOL=http
PROXY_SERVER_URL=${PROXY_SERVER_PROTOCOL}://${PROXY_SERVER_NAME}:${PROXY_SERVER_PORT_HOST}
PROXY_CKAN_LOCATION=/catalog
PROXY_PYCSW_LOCATION=/csw

Expand Down Expand Up @@ -88,15 +92,20 @@ CKAN_DEV_COMPOSE_SERVICE=ckan-dev

# CKAN core
## If use docker-compose.ghcr.yml only "*.*.*" versions available in: https://github.com/mjanez/ckan-docker/pkgs/container/ckan-docker
CKAN_VERSION=2.9.11
CKAN_VERSION=2.10.5
CKAN_SITE_ID=default
# CKAN_SITE_URL = http:/ or https:/ + PROXY_SERVER_NAME. Optionally the APACHE_HOST_PORT if different from 80
CKAN_SITE_URL=${PROXY_SERVER_URL}
CKAN__ROOT_PATH=${PROXY_CKAN_LOCATION}/{{LANG}}
CKAN__FAVICON=${PROXY_CKAN_LOCATION}/base/images/ckan.ico
CKAN__SITE_LOGO=/images/default/ckan-logo.png
# Custom licenses that are aligned with DCAT-AP
CKAN___LICENSES_GROUP_URL=https://raw.githubusercontent.com/mjanez/ckanext-schemingdcat/main/ckanext/schemingdcat/public/static/licenses.json
CKAN__SITE_LOGO=${PROXY_CKAN_LOCATION}/images/default/ckan-logo.png
# CKAN site info
CKAN__SITE_TITLE="CKAN Open Data"
CKAN__SITE_DESCRIPTION="ckan-docker *spatial Open Data portal"
CKAN__SITE_INTRO_TEXT="[![ckan-docker-spatial](https://img.shields.io/badge/ckan_docker_spatial-CKAN_${CKAN_VERSION}-brightgreen?style=social&logo=github#center)](https://github.com/mjanez/ckan-docker)\n[`ckan-docker *spatial`](https://github.com/mjanez/ckan-docker) is a ready-to-use development environment for [CKAN](https://github.com/ckan/ckan), the world’s leading open-source data portal platform."
CKAN__SITE_ABOUT=${CKAN__SITE_INTRO_TEXT}
# Custom licenses that are aligned with DCAT-AP (Also works with DEV Mode)
LICENSES_GROUP_URL=file://${APP_DIR}/src/ckanext-schemingdcat/ckanext/schemingdcat/public/static/licenses.json
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME
# See https://docs.ckan.org/en/latest/maintaining/configuration.html#api-token-settings
CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME
Expand All @@ -106,6 +115,8 @@ CKAN_SYSADMIN_PASSWORD=test1234
[email protected]
CKAN_STORAGE_PATH=/var/lib/ckan
CKAN_LOGS_PATH=/var/log
# SMTP settings
CKAN__SMTP_ENABLED=False
CKAN_SMTP_SERVER=smtp.corporateict.domain:25
CKAN_SMTP_STARTTLS=True
CKAN_SMTP_USER=user
Expand All @@ -115,7 +126,7 @@ CKAN_SMTP_MAIL_FROM=ckan@${PROXY_SERVER_NAME}
CKAN__PREVIEW__JSON_FORMATS="json jsonld"
# html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json
CKAN__PREVIEW__XML_FORMATS="xml rdf rdf+xml owl+xml atom rss turtle ttl n3 n-triples"
CKAN__PREVIEW__TEXT_FORMATS="text plain text/plain text/turtle csv tsv rss txt json"
CKAN__PREVIEW__TEXT_FORMATS="text plain text/plain text/turtle rss txt"
CKAN__PREVIEW__LOADABLE="html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json arcgis_rest"
# ckanext-spatial: Allow Solr local params: https://github.com/ckan/ckanext-spatial/issues/328
CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field
Expand All @@ -125,6 +136,10 @@ CKAN__CORS__ORIGIN_WHITELIST=""
# Enables or disable collaborators in individual datasets (https://docs.ckan.org/en/2.9/maintaining/authorization.html#dataset-collaborators)
CKAN__AUTH__ALLOW_DATASET_COLLABORATORS=False
CKAN__AUTH__ALLOW_ADMIN_COLLABORATORS=False
# Default number of facets shown in search results. Default 10.
SEARCH__FACETS__DEFAULT=4
# Enable or disable the DataStore SQL search backend. Default is False.
CKAN__DATASTORE__SQLSEARCH__ENABLED=True

## Resource Proxy settings
### Preview size limit, default: 1MB
Expand All @@ -133,15 +148,15 @@ CKAN__RESOURCE_PROXY__MAX_FILE_SIZE=50048576
CKAN__RESOURCE_PROXY__CHUNK_SIZE=4096
## Default timeout for fetching proxied items
CKAN__RESOURCE_PROXY__TIMEOUT=10
CKAN__VIEWS__DEFAULT_VIEWS="image_view webpage_view text_view recline_view wmts_view geojson_view geo_view shp_view pdf_view"
CKAN__VIEWS__DEFAULT_VIEWS="image_view video_view audio_view webpage_view datatables_view text_view wmts_view geojson_view geo_view shp_view pdf_view"

# Localization
CKAN__LOCALE_DEFAULT="en"
CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv"
CKAN__LOCALES_OFFERED="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv"

# Extensions
CKAN__PLUGINS="stats image_view text_view recline_view webpage_view resourcedictionary datastore xloader spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester harvest pdf_view pages fluent envvars"
CKAN__PLUGINS="activity stats image_view video_view audio_view webpage_view text_view datatables_view resourcedictionary datastore xloader spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat_ckan_harvester schemingdcat_xls_harvester harvest pdf_view pages fluent envvars"

# ckanext-harvest
CKAN__HARVEST__MQ__TYPE=redis
Expand All @@ -152,13 +167,12 @@ CKAN__HARVEST__MQ__REDIS_DB=${REDIS_CKAN_DATABASE}
CKAN__HARVEST__LOG_TIMEFRAME=40

# ckanext-xloader
CKANEXT__XLOADER__API_TOKEN=api_token
CKANEXT__XLOADER__JOBS__DB_URI=postgresql://${CKAN_DB_USER}:${CKAN_DB_PASSWORD}@${POSTGRES_HOST}/${CKAN_DB}

# ckanext-dcat
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'
# 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=eu_dcat_ap_2,es_dcat
CKANEXT__DCAT__RDF_PROFILES='eu_dcat_ap_2 eu_dcat_ap_scheming'
# 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}'

Expand All @@ -179,24 +193,52 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap_eu/geodcatap_eu_dataset.yaml"
CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_eu/geodcatap_eu_group.json"
CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_eu/geodcatap_eu_org.json"
CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/default_presets.json ckanext.fluent:presets.json ckanext.iepnb:schemas/presets.json"
CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_full.yaml"
CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_group.json"
CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_org.json"
CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/default_presets.json ckanext.fluent:presets.json"
## Facets: setup_scheming.sh
CKANEXT__SCHEMINGDCAT_FACET_LIST="dataset_scope theme groups theme_eu dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to"
CKANEXT__SCHEMINGDCAT_FACET_LIST="dataset_scope theme groups theme_eu language dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to"
CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True
CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON="theme"
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL=True
CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR=False
CKANEXT__METADATA_TEMPLATES_SEARCH_IDENTIFIER="schemingdcat_xls-template"
CKANEXT__SCHEMINGDCAT_ENDPOINTS_YAML="endpoints.yaml"
CKANEXT__SCHEMINGDCAT__SOCIAL_GITHUB="https://github.com/mjanez/ckanext-schemingdcat"
CKANEXT__SCHEMINGDCAT__SOCIAL_X="https://x.com/ckanproject"
CKANEXT__SCHEMINGDCAT__SOCIAL_LINKEDIN="https://www.linkedin.com/company/ckanproject"

# ckanext-pages
CKANEXT__PAGES__ALOW_HTML=False
CKANEXT__PAGES__ORGANIZATION=True
CKANEXT__PAGES__GROUP=True
CKANEXT__PAGES__ABOUT_MENU=False
CKANEXT__PAGES__GROUP_MENU=True
CKANEXT__PAGES__ORGANIZATION_MENU=True
CKANEXT__PAGES__ORGANIZATION_MENU=True

# ckan-pycsw
CSW_IDENTIFICATION_TITLE="Sample Geospatial Catalogue"
CSW_IDENTIFICATION_ABSTRACT="OGC CSW server powered by pycsw"
CSW_PROVIDER_NAME="ckan-docker development team"
CSW_PROVIDER_URL="https://github.com/mjanez/ckan-docker"
CSW_CONTACT_NAME="ckan-docker development team"
CSW_CONTACT_POSITION="Site Administrator"
CSW_CONTACT_ADDRESS="ckan-docker development team"
CSW_CONTACT_CITY="Madrid"
CSW_CONTACT_STATE_OR_PROVINCE="Madrid"
CSW_CONTACT_POSTAL_CODE="28001"
CSW_CONTACT_COUNTRY="Spain"
CSW_CONTACT_EMAIL=${CKAN_SYSADMIN_EMAIL}
CSW_CONTACT_URL=${CKAN_URL}
## Date of the last update of the metadata. ISO 8601 format): YYYY-MM-DD
CSW_INSPIRE_DATE="2024-01-01"
## Keywords separated by commas based on the GEMET Thesaurus keywordValue: https://inspire.ec.europa.eu/schemas/common/1.0/enums/enum_eng.xsd
CSW_INSPIRE_GEMET_KEYWORDS="Utility and governmental services"
# The level of INSPIRE conformance for spatial data sets and services (conformant, notConformant, notEvaluated)
CSW_INSPIRE_CONFORMITY="notEvaluated"
CSW_INSPIRE_CONTACT_NAME=${CSW_CONTACT_NAME}
CSW_INSPIRE_CONTACT_EMAIL=${CKAN_SYSADMIN_EMAIL}
# Temporal extent of the service (in ISO 8601 format). Either a single date (i.e. YYYY-MM-DD), or an extent (i.e. YYYY-MM-DD/YYYY-MM-DD)
CSW_INSPIRE_TEMP_EXTENT="2024-01-01"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ index.html.*

# environment allowlist
!.env.example
!.env.codespaces
!.env.es.example
!.env.localhost
samples/api/*

# docker compose files
docker-compose.local-*.yml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Available components:
| 2.9.x | custom spatial image | `alpine:3.15` | `ghcr.io/mjanez/ckan-spatial:ckan-2.9.8`, `ghcr.io/mjanez/ckan-spatial:ckan-2.9.8`, `ghcr.io/mjanez/ckan-docker:ckan-2.9.9`, `ghcr.io/mjanez/ckan-docker:ckan-2.9.10`, `ghcr.io/mjanez/ckan-docker:ckan-2.9.11` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11` |
| 2.10.x | custom spatial image | `python:3.10-slim-bookworm` | `ghcr.io/mjanez/ckan-docker:2.10.5` | From `2.10` images only [Debian-based official Python images](https://hub.docker.com/_/python) rather than Alpine-based images will be provided. |
| 2.11.x | custom spatial image | `python:3.10-slim-bookworm` | `ghcr.io/mjanez/ckan-docker:2.11.0` | CKAN's latest official version. Only [Debian-based official Python images](https://hub.docker.com/_/python). |
| master | custom spatial image | `python:3.10-slim-bookworm` | `ghcr.io/mjanez/ckan-docker:master` | Latest image available. Not for use in production. |

The non-CKAN images are as follows:
* PostgreSQL: [Custom image](/postgresql/Dockerfile) based on official PostgreSQL image. Database files are stored in a named volume.
Expand Down
21 changes: 21 additions & 0 deletions ckan-pycsw/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@
ENV PYCSW_CRON_DAYS_INTERVAL=2
ENV PYCSW_CRON_HOUR_START=4

# PYCSW Catalog configuration
ENV CSW_IDENTIFICATION_TITLE="Sample Geospatial Catalogue" \

Check warning on line 19 in ckan-pycsw/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CKAN_SYSADMIN_EMAIL' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 19 in ckan-pycsw/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CSW_CONTACT_NAME' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
CSW_IDENTIFICATION_ABSTRACT="OGC CSW server powered by pycsw" \
CSW_PROVIDER_NAME="ckan-docker development team" \
CSW_PROVIDER_URL="https://github.com/mjanez/ckan-docker" \
CSW_CONTACT_NAME="ckan-docker development team" \
CSW_CONTACT_POSITION="Site Administrator" \
CSW_CONTACT_ADDRESS="ckan-docker development team" \
CSW_CONTACT_CITY="Madrid" \
CSW_CONTACT_STATE_OR_PROVINCE="Madrid" \
CSW_CONTACT_POSTAL_CODE="28001" \
CSW_CONTACT_COUNTRY="Spain" \
CSW_CONTACT_EMAIL=${CKAN_SYSADMIN_EMAIL} \
CSW_CONTACT_URL=${CKAN_URL} \
CSW_INSPIRE_DATE="2024-01-01" \
CSW_INSPIRE_GEMET_KEYWORDS="Utility and governmental services" \
CSW_INSPIRE_CONFORMITY="notEvaluated" \
CSW_INSPIRE_CONTACT_NAME=${CSW_CONTACT_NAME} \
CSW_INSPIRE_CONTACT_EMAIL=${CKAN_SYSADMIN_EMAIL} \
CSW_INSPIRE_TEMP_EXTENT="2024-01-01/2024-12-31"

WORKDIR ${APP_DIR}

# Update files if needed
Expand Down
42 changes: 21 additions & 21 deletions ckan-pycsw/pycsw/conf/pycsw.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ allowed_ips=127.0.0.1
#csw_harvest_pagesize=10

[metadata:main]
identification_title=Sample Geospatial Catalogue
identification_abstract=OGC CSW server powered by pycsw
identification_title=${CSW_IDENTIFICATION_TITLE}
identification_abstract=${CSW_IDENTIFICATION_ABSTRACT}
identification_keywords=catalogue,discovery,metadata,spatial
identification_keywords_type=theme
identification_fees=None
identification_accessconstraints=None
provider_name=Sample
provider_url=https://example.org/
#contact_name=admin
#contact_position=Position Title
#contact_address=Mailing Address
#contact_city=Madrid
#contact_stateorprovince=Administrative Area
#contact_postalcode=Zip or Postal Code
contact_country=Spain
provider_name=${CSW_PROVIDER_NAME}
provider_url=${CSW_PROVIDER_URL}
contact_name=${CSW_CONTACT_NAME}
contact_position=${CSW_CONTACT_POSITION}
contact_address=${CSW_CONTACT_ADDRESS}
contact_city=${CSW_CONTACT_CITY}
contact_stateorprovince=${CSW_CONTACT_STATE_OR_PROVINCE}
contact_postalcode=${CSW_CONTACT_POSTAL_CODE}
contact_country=${CSW_CONTACT_COUNTRY}
#contact_phone=+xx-xxx-xxx-xxxx
#contact_fax=+xx-xxx-xxx-xxxx
contact_email=[email protected]
#contact_url=https://example.org/members/admin
#contact_hours=Hours of Service
#contact_instructions=During hours of service. Off on weekends.
contact_email=${CSW_CONTACT_EMAIL}
contact_url=${CSW_CONTACT_URL}
contact_hours=Hours of Service
contact_instructions=During hours of service. Off on weekends.
contact_role=pointOfContact

[repository]
Expand All @@ -61,9 +61,9 @@ table=records
enabled=true
languages_supported=eng,spa
default_language=eng
date=YYYY-MM-DD
gemet_keywords=Utility and governmental services
conformity_service=notEvaluated
contact_name=Organization Name
contact_email=Email Address
temp_extent=YYYY-MM-DD/YYYY-MM-DD
date=${CSW_INSPIRE_DATE}
gemet_keywords=${CSW_INSPIRE_GEMET_KEYWORDS}
conformity_service=${CSW_INSPIRE_CONFORMITY}
contact_name=${CSW_INSPIRE_CONTACT_NAME}
contact_email=${CSW_INSPIRE_CONTACT_EMAIL}
temp_extent=${CSW_INSPIRE_TEMP_EXTENT}
29 changes: 16 additions & 13 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/mjanez/ckan-base-spatial:ckan-2.9.11
FROM ghcr.io/mjanez/ckan-spatial-base:2.10.5-py3.10
LABEL maintainer="[email protected]"

# Set up environment variables
Expand All @@ -12,31 +12,34 @@
COPY req_fixes req_fixes

# CKAN configuration & extensions
## XLoader - 1.0.1 ##
## XLoader - 1.0.1-stable (mjanez/Forked fixed version) ##
## Harvest - v1.5.6 (Worker with supervisor) ##
## Geoview - v0.1.0 ##
## Geoview - v0.2.0 ##
## Spatial - v2.1.1 ##
## DCAT - v1.8.0 (Latest stable version of ckanext-dcat with minor fixes) ##
## Scheming - release-3.0.0 ##
## Resource dictionary - v1.0.1 (mjanez/Fixed version) ##
## Pages - v0.5.2 ##
## PDFView - 0.0.8 ##
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
## Scheming DCAT - v3.2.2 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
## Scheming DCAT - v4.0.0 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
RUN echo ${TZ} > /etc/timezone && \

Check warning on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check notice on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Avoid additional packages by specifying `--no-install-recommends`

Check warning on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

SC3013 warning: In POSIX sh, -ef is undefined.

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \
# Remove apk cache
rm -rf /var/cache/apk/* && \
# Install patch utility
apt-get update && \
apt-get install -y patch \
# Install cron for scheduled tasks
cron && \
# Install CKAN extensions
echo "ckan/ckanext-xloader" && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/[email protected]#egg=ckanext-xloader && \
pip3 install --no-cache-dir -e git+https://github.com/mjanez/[email protected]-stable#egg=ckanext-xloader && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-xloader/requirements.txt && \
pip3 install --no-cache-dir -U requests[security] && \
echo "ckan/ckanext-harvest" && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/[email protected]#egg=ckanext-harvest && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-harvest/requirements.txt && \
echo "ckan/ckanext-geoview" && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-geoview.git@v0.1.0#egg=ckanext-geoview && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-geoview.git@v0.2.0#egg=ckanext-geoview && \
echo "ckan/ckanext-spatial" && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/[email protected]#egg=ckanext-spatial && \
pip3 install --no-cache-dir -r ${APP_DIR}/req_fixes/ckanext-spatial/requirements.txt && \
Expand All @@ -54,19 +57,19 @@
echo "mjanez/ckanext-fluent" && \
pip3 install --no-cache-dir -e git+https://github.com/mjanez/[email protected]#egg=ckanext-fluent && \
echo "mjanez/ckanext-schemingdcat" && \
pip3 install --no-cache-dir -e git+https://github.com/mjanez/[email protected]#egg=ckanext_schemingdcat && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-schemingdcat/requirements.txt
pip3 install --no-cache-dir -e git+https://github.com/mjanez/[email protected]#egg=ckanext_schemingdcat && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-schemingdcat/requirements.txt && \
# Remove system cache
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
COPY docker-entrypoint.d/* /docker-entrypoint.d/

# Update who.ini with PROXY_CKAN_LOCATION
COPY setup/who.ini ./

# Apply any patches needed to CKAN core
COPY patches patches

RUN for d in $APP_DIR/patches/*; do \

Check warning on line 72 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Use WORKDIR to switch to a directory

Check warning on line 72 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.10.5

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 72 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 72 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 72 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.10.5

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && \
Expand Down
Loading