forked from mjanez/ckan-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from OpenDataGIS/ckan-2.10.5
Add BNE flavour
- Loading branch information
Showing
14 changed files
with
168 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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} | ||
|
@@ -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 | ||
|
@@ -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} | ||
|
@@ -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 | ||
|
@@ -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." | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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" | ||
|
@@ -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" | ||
|
@@ -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"}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 GitHub Actions / runner/build-docker-push:master
Check failure on line 28 in ckan/Dockerfile GitHub Actions / runner/build-docker-push:master
Check failure on line 28 in ckan/Dockerfile GitHub Actions / runner/build-docker-push:master
|
||
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \ | ||
# Install patch utility | ||
|
@@ -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/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ckantools>=0.3.0 | ||
pyisemail==2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.