Skip to content

Commit

Permalink
Merge pull request #2 from OpenDataGIS/ckan-2.10.5
Browse files Browse the repository at this point in the history
Add BNE flavour
  • Loading branch information
mjanez authored Dec 4, 2024
2 parents 9424c53 + 00f2e88 commit fc25cf4
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 124 deletions.
61 changes: 40 additions & 21 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Base
APP_DIR=/srv/app
# Sets Docker Compose project name to avoid resource conflicts between projects. Defaults to the folder name "ckan-docker" if not set.
#COMPOSE_PROJECT_NAME=ckan-docker-mytheme
COMPOSE_PROJECT_NAME=ckan-bne

# Dev settings
USE_HTTPS_FOR_DEV=False
USE_HTTPS_FOR_DEV=True
CKAN_DEV_COMPOSE_SERVICE=ckan-dev
## ckan-pycsw unverified mode (True/False). SSL certificate from host will download if SSL_UNVERIFIED_MODE=True, to avoid SSL error when certificate was self-signed.
SSL_UNVERIFIED_MODE=False
Expand All @@ -14,7 +14,7 @@ CKAN_PORT_HOST=5000
PYCSW_PORT_HOST=8000
# Common proxy server for Apache or NGINX.
# Change all the PROXY_SERVER_URL_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_HTTP_PORT_HOST=81
PROXY_SERVER_HTTP_PORT_HOST=8080
PROXY_SERVER_HTTPS_PORT_HOST=8443
# Ports for NGINX (matches HTTP/HTTPS ports)
NGINX_PORT_HOST=${PROXY_SERVER_HTTP_PORT_HOST}
Expand All @@ -26,9 +26,9 @@ APACHE_PORT_HOST=${PROXY_SERVER_HTTP_PORT_HOST}
# (If needed for Development Mode) uncomment the following line:
# PROXY_SERVER_URL_PORT_HOST=${PROXY_SERVER_HTTP_PORT_HOST}
# (If needed for Development Mode) And comment the following line:
PROXY_SERVER_URL_PORT_HOST=${PROXY_SERVER_HTTPS_PORT_HOST}
PROXY_SERVER_URL_PORT_HOST=${PROXY_SERVER_HTTP_PORT_HOST}
# URL protocol. Change to http if you dont use SSL
PROXY_SERVER_PROTOCOL=https
PROXY_SERVER_PROTOCOL=http

# Solr
SOLR_IMAGE_VERSION=2.9-solr9-spatial
Expand Down Expand Up @@ -58,9 +58,11 @@ APACHE_LOG_DIR=/var/log/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_URL_PORT_HOST (e.g. is 80), edit the PROXY_SERVER_URL and remove :${PROXY_SERVER_URL_PORT_HOST}
PROXY_SERVER_NAME=localhost
PROXY_SERVER_URL=${PROXY_SERVER_PROTOCOL}://${PROXY_SERVER_NAME}:${PROXY_SERVER_URL_PORT_HOST}
PROXY_CKAN_LOCATION=/catalog
PROXY_CKAN_LOCATION=/catalogo
PROXY_PYCSW_LOCATION=/csw


## Unnecessary in BNE use
# pycsw
PYCSW_PORT=8000
CKAN_URL=${PROXY_SERVER_URL}${PROXY_CKAN_LOCATION}
Expand All @@ -74,7 +76,7 @@ PYCSW_CRON_DAYS_INTERVAL=2
# ckan2pycsw hour of start of the scheduler job (0-23)
PYCSW_CRON_HOUR_START=4
## Timezone
TZ=UTC
TZ=Europe/Madrid

# CKAN databases
POSTGRES_USER=postgres
Expand Down Expand Up @@ -105,10 +107,11 @@ 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=${PROXY_CKAN_LOCATION}/images/default/ckan-logo.png
CKAN__FAVICON=https://bnelab.bne.es/wp-content/themes/bnelab-theme/images/icon/favicon.ico
CKAN__SITE_LOGO=${PROXY_CKAN_LOCATION}/images/default/logo_bnelab.png
CKAN__GRAVATAR_DEFAULT=identicon
# CKAN site info
CKAN__SITE_TITLE="CKAN Open Data"
CKAN__SITE_TITLE="BNE Open Data"
CKAN__SITE_DESCRIPTION="ckan-docker *spatial Open Data portal"
# Using [#en#], [#es#], etc. to define the language of the text as needed.
CKAN__SITE_INTRO_TEXT="[#en#][![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.[#es#][![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) es un entorno de desarrollo listo para usar para [CKAN](https://github.com/ckan/ckan), la plataforma de portales de datos de código abierto líder en el mundo."
Expand Down Expand Up @@ -149,7 +152,7 @@ CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field
CKAN__CORS__ORIGIN_ALLOW_ALL=False
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_DATASET_COLLABORATORS=True
CKAN__AUTH__ALLOW_ADMIN_COLLABORATORS=False
# Default number of facets shown in search results. Default 10.
CKAN___SEARCH__FACETS__DEFAULT=4
Expand All @@ -166,12 +169,12 @@ CKAN__RESOURCE_PROXY__TIMEOUT=10
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"
CKAN__LOCALE_DEFAULT="es"
CKAN__LOCALE_ORDER="es en 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="es en 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="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 schemingdcat_postgres_harvester schemingdcat_open_data_statistics harvest pdf_view pages fluent openapi 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 resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface bne schemingdcat schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat_ckan_harvester schemingdcat_xls_harvester schemingdcat_postgres_harvester schemingdcat_open_data_statistics harvest pdf_view pages contact fluent openapi envvars"

# ckanext-harvest
CKAN__HARVEST__MQ__TYPE=redis
Expand Down Expand Up @@ -208,17 +211,17 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMINGDCAT__GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKAN___SCHEMING__DATASET_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_full.yaml"
CKAN___SCHEMING__GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_group.json"
CKAN___SCHEMING__ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/eu_geodcat_ap_org.json"
CKAN___SCHEMING__DATASET_SCHEMAS="ckanext.bne:schemas/bne_dcat_ap_full.yml"
CKAN___SCHEMING__GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_group.json"
CKAN___SCHEMING__ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_org.json"
CKAN___SCHEMING__PRESETS="ckanext.schemingdcat:schemas/default_presets.json ckanext.fluent:presets.json"
## Facets: setup_scheming.sh
CKANEXT__SCHEMINGDCAT__FACET_LIST="dataset_scope hvd_category 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__DEFAULT_PACKAGE_ITEM_ICON="theme"
CKANEXT__SCHEMINGDCAT__FACET_LIST="dcat_type hvd_category groups theme_es language groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to"
CKANEXT__SCHEMINGDCAT__DEFAULT_PACKAGE_ITEM_ICON="theme_es"
CKANEXT__SCHEMINGDCAT__DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL=True
CKANEXT__SCHEMINGDCAT__SHOW_METADATA_TEMPLATES_TOOLBAR=False
CKANEXT__SCHEMINGDCAT__METADATA_TEMPLATES_SEARCH_IDENTIFIER="schemingdcat_xls-template"
CKANEXT__SCHEMINGDCAT__ENDPOINTS_YAML="endpoints.yaml"
CKANEXT__SCHEMINGDCAT__ENDPOINTS_YAML="ckanext.bne:codelists/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"
Expand All @@ -235,7 +238,18 @@ CKANEXT__PAGES__GROUP=True
CKANEXT__PAGES__ABOUT_MENU=False
CKANEXT__PAGES__GROUP_MENU=True
CKANEXT__PAGES__ORGANIZATION_MENU=True
CKANEXT__PAGES__EDITOR=ckeditor

# ckanext-contact
CKANEXT__CONTACT__EMAIL_TO=bne@${PROXY_SERVER_NAME}
#[email protected]
CKANEXT__CONTACT__RECIPIENT_NAME=Datos Abiertos de la Biblioteca Nacional
CKANEXT__CONTACT__SUBJECT=Sugerencia de Conjunto de datos
#CKANEXT__CONTACT__RECAPTCHA_V3_KEY=6LemnGgjAAAAADS6tWyFGBaWp04178Lbtb3t6AG3
#CKANEXT__CONTACT__RECAPTCHA_V3_SECRET=6LemnGgjAAAAAAvqZSMXsaNcqw80S_eQQSW8VL-0
#CKANEXT__CONTACT__RECAPTCHA_V3_ACTION=contact_form

## Unnecessary in BNE use
# ckan-pycsw
CSW_IDENTIFICATION_TITLE="Sample Geospatial Catalogue"
CSW_IDENTIFICATION_ABSTRACT="OGC CSW server powered by pycsw"
Expand All @@ -260,3 +274,8 @@ 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"

# ckanext-bne
CKANEXT__BNE__BNE_API_BASE_URL="http://example.org/api/"
CKANEXT__BNE__BNE_API_ENTRIES=20
CKANEXT__BNE__BNE_API_MAPPING='{"Geográfico": {"table": "geo", "icon": "fas fa-atlas", "color": "#01472e"}, "Persona": {"table": "per", "icon": "fas fa-user", "color": "#370278"}, "Monografías modernas": {"table": "mon", "icon": "fas fa-book", "color": "#19653e"}, "Monografías antiguas": {"table": "moa", "icon": "fas fa-scroll", "color": "#5e2b46"}, "Entidades": {"table": "ent", "icon": "fas fa-building", "color": "#597d6d"}, "Manuscritos": {"table": "mss", "icon": "fas fa-pen-nib", "color": "#746b2c"}, "Prensa y Revista": {"table": "ser", "icon": "fas fa-newspaper", "color": "#0d1a37"}, "Partituras": {"table": "par", "icon": "fas fa-music", "color": "#3e7c1b"}, "Recursos electrónicos": {"table": "ele", "icon": "fas fa-floppy-disk", "color": "#7c3c73"}, "Materiales mixtos": {"table": "mam", "icon": "fas fa-file", "color": "#041e6a"}, "Mapas": {"table": "map", "icon": "fas fa-location-dot", "color": "#602703"}, "Filminas y Transparencias": {"table": "grp", "icon": "fas fa-photo-film", "color": "#7a6d7c"}, "Dibujos, Carteles y Fotografias": {"table": "gra", "icon": "fas fa-paintbrush", "color": "#046126"}, "Grabaciones sonoras": {"table": "son", "icon": "fas fa-solid fa-record-vinyl", "color": "#633050"}, "Videograbaciones": {"table": "vid", "icon": "fas fa-video", "color": "#2e302e"}, "Kit multimedia": {"table": "kit", "icon": "fas fa-play", "color": "#5c2545"}, "Congresos": {"table": "con", "icon": "fas fa-landmark", "color": "#772a0e"}, "Genero y Forma": {"table": "gen", "icon": "fas fa-folder-tree", "color": "#4a442f"}, "Materia": {"table": "mat", "icon": "fas fa-building-columns", "color": "#200559"}, "Titulos": {"table": "tit", "icon": "fas fa-graduation-cap", "color": "#75393f"}}'
10 changes: 7 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Convert repo name to lowercase
id: github_repo_lowercase
run: INPUT=${{ env.IMAGE_NAME }}; echo "IMAGE_LOWERCASE=${INPUT,,}">>${GITHUB_OUTPUT}

- name: Extract tag version from branch name
id: extract_tag_version
run: |
Expand All @@ -56,7 +60,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}
labels: |
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md
org.opencontainers.image.version=${{ env.VERSION }}
Expand All @@ -68,7 +72,7 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
tags: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}
Expand All @@ -86,7 +90,7 @@ jobs:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
image-ref: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}:${{ env.VERSION }}
format: sarif
output: trivy-results.sarif

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docker-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Convert to lowercase
id: github_repo_lowercase
run: INPUT=${{ env.IMAGE_NAME }}; echo "IMAGE_LOWERCASE=${INPUT,,}">>${GITHUB_OUTPUT}

- name: Extract tag version from branch name
id: extract_tag_version
run: |
Expand All @@ -46,7 +50,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}
labels: |
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md
org.opencontainers.image.version=${{ env.VERSION }}
Expand All @@ -58,7 +62,7 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
tags: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}
Expand All @@ -76,7 +80,7 @@ jobs:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
image-ref: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}:${{ env.VERSION }}
format: sarif
output: trivy-results.sarif

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docker-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Convert repo name to lowercase
id: github_repo_lowercase
run: INPUT=${{ env.IMAGE_NAME }}; echo "IMAGE_LOWERCASE=${INPUT,,}">>${GITHUB_OUTPUT}

- name: Get highest ckan branch excluding -dev
id: getbranch
run: echo "VERSION=$(git branch -r | grep -o 'ckan-[0-9]*\.[0-9]*\.[0-9]*[^-dev]$' | sort -V | tail -n 1)" >> $GITHUB_ENV
Expand All @@ -46,7 +50,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}
labels: |
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md
org.opencontainers.image.version=${{ env.VERSION }}
Expand All @@ -58,7 +62,7 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
tags: ${{ env.REGISTRY }}/${{ steps.github_repo_lowercase.outputs.IMAGE_LOWERCASE }}:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ckan-docker
IMAGE_NAME: ckan-docker-bne
CONTEXT: .
BRANCH: ${{ github.head_ref }}
DOCKERFILE_PATH: /ckan
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ more information.
### Install docker-engine
Follow the [installation instructions](https://docs.docker.com/get-docker/) for your environment to install Docker Engine.

- [RHEL 8/9](https://docs.docker.com/engine/install/rhel/)

To verify a successful Docker installation, run `docker run hello-world` and `docker version`. These commands should output
versions for client and server.

Expand Down
5 changes: 5 additions & 0 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ COPY req_fixes req_fixes
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
## OpenAPI - v1.0.0 (mjanez stable version) ##
## Scheming DCAT - v4.2.3 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
## BNE - v1.0.0 (OpenDataGIS/API datos.abiertos) ##
RUN echo ${TZ} > /etc/timezone && \

Check failure on line 28 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:master

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

Check failure on line 28 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:master

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

Check failure on line 28 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:master

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

Check failure on line 28 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:master

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 && \
# Install patch utility
Expand Down Expand Up @@ -62,6 +63,10 @@ RUN echo ${TZ} > /etc/timezone && \
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 && \
echo "NaturalHistoryMuseum/ckanext-contact" && \
pip3 install --no-cache-dir -e git+https://github.com/NaturalHistoryMuseum/[email protected]#egg=ckanext-contact && \
echo "OpenDataGIS/ckanext-bne" && \
pip3 install --no-cache-dir -e git+https://github.com/OpenDataGIS/[email protected]#egg=ckanext-bne && \
# Remove system cache
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down
7 changes: 7 additions & 0 deletions ckan/docker-entrypoint.d/03_setup_bne.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Add pages CKAN config file (https://github.com/ckan/ckanext-bne)
echo "[docker-entrypoint.03_setup_bne] Loading BNE config in the CKAN config file"
ckan config-tool $CKAN_INI \
"googleanalytics.id = $CKANEXT__GOOGLEANALYTICS__ID" \
"ckanext.contact.mail_to = $CKANEXT__CONTACT__EMAIL_TO"
2 changes: 2 additions & 0 deletions ckan/req_fixes/ckanext-contact/old.requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ckantools>=0.3.0
pyisemail==2.0.1
47 changes: 24 additions & 23 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,30 @@ services:
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]

pycsw:
build:
context: ckan-pycsw/
dockerfile: Dockerfile
env_file:
- .env
environment:
- SSL_UNVERIFIED_MODE=True
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
- ${CKAN_DEV_COMPOSE_SERVICE}
ports:
- "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}"
volumes:
- ./log:${APP_DIR}/log
- ./metadata:${APP_DIR}/metadata
restart: on-failure:3
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"]
# Unnecesary for BNE deployment
# pycsw:
# build:
# context: ckan-pycsw/
# dockerfile: Dockerfile
# env_file:
# - .env
# environment:
# - SSL_UNVERIFIED_MODE=True
# logging:
# driver: "json-file"
# options:
# max-size: "100m"
# max-file: "10"
# depends_on:
# - ${CKAN_DEV_COMPOSE_SERVICE}
# ports:
# - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}"
# volumes:
# - ./log:${APP_DIR}/log
# - ./metadata:${APP_DIR}/metadata
# restart: on-failure:3
# healthcheck:
# test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"]

db:
build:
Expand Down
Loading

0 comments on commit fc25cf4

Please sign in to comment.