diff --git a/.env.example b/.env.example index 1eb42b5bb..6aa32c9ee 100644 --- a/.env.example +++ b/.env.example @@ -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} +#CKANEXT__CONTACT__EMAIL_TO_CC=mjanez@tragsa.es +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"}}' diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index f13c5410e..1c67a3cec 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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: | @@ -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 }} @@ -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 }} @@ -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 diff --git a/.github/workflows/docker-manual.yml b/.github/workflows/docker-manual.yml index 40e1bdbeb..a3bb38e8f 100644 --- a/.github/workflows/docker-manual.yml +++ b/.github/workflows/docker-manual.yml @@ -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: | @@ -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 }} @@ -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 }} @@ -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 diff --git a/.github/workflows/docker-master.yml b/.github/workflows/docker-master.yml index 496874286..333bd463c 100644 --- a/.github/workflows/docker-master.yml +++ b/.github/workflows/docker-master.yml @@ -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 @@ -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 }} @@ -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 }} diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml index ccd46a790..fc84bb170 100644 --- a/.github/workflows/docker-pr.yml +++ b/.github/workflows/docker-pr.yml @@ -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 diff --git a/README.md b/README.md index 49985682e..f5ffcff18 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/ckan/Dockerfile b/ckan/Dockerfile index d4c0650a9..2d8827419 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -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 && \ 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/ckanext-schemingdcat.git@v4.2.3#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/ckanext-contact.git@v2.4.1#egg=ckanext-contact && \ + echo "OpenDataGIS/ckanext-bne" && \ + pip3 install --no-cache-dir -e git+https://github.com/OpenDataGIS/ckanext-bne.git@v1.0.0#egg=ckanext-bne && \ # Remove system cache apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/ckan/docker-entrypoint.d/03_setup_bne.sh b/ckan/docker-entrypoint.d/03_setup_bne.sh new file mode 100644 index 000000000..3ef1df8c8 --- /dev/null +++ b/ckan/docker-entrypoint.d/03_setup_bne.sh @@ -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" \ No newline at end of file diff --git a/ckan/req_fixes/ckanext-contact/old.requirements.txt b/ckan/req_fixes/ckanext-contact/old.requirements.txt new file mode 100644 index 000000000..adcfe142c --- /dev/null +++ b/ckan/req_fixes/ckanext-contact/old.requirements.txt @@ -0,0 +1,2 @@ +ckantools>=0.3.0 +pyisemail==2.0.1 \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8e09d2880..5cda19da6 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -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: diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml index 0988e2feb..75165ddc8 100644 --- a/docker-compose.ghcr.yml +++ b/docker-compose.ghcr.yml @@ -63,28 +63,29 @@ services: healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"] - pycsw: - build: - context: ckan-pycsw/ - dockerfile: Dockerfile - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - webnet - - ckannet - depends_on: - - ckan - 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 + # logging: + # driver: "json-file" + # options: + # max-size: "100m" + # max-file: "10" + # networks: + # - webnet + # - ckannet + # depends_on: + # - ckan + # 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: diff --git a/docker-compose.yml b/docker-compose.yml index 49cac765e..c3967e115 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,28 +63,29 @@ services: healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"] - pycsw: - build: - context: ckan-pycsw/ - dockerfile: Dockerfile - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - webnet - - ckannet - depends_on: - - ckan - 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 + # logging: + # driver: "json-file" + # options: + # max-size: "100m" + # max-file: "10" + # networks: + # - webnet + # - ckannet + # depends_on: + # - ckan + # 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: diff --git a/nginx/setup/default.conf.template b/nginx/setup/default.conf.template index 51c7b22e1..27b147db7 100644 --- a/nginx/setup/default.conf.template +++ b/nginx/setup/default.conf.template @@ -47,28 +47,28 @@ server { proxy_cache_key $host$scheme$proxy_host$request_uri; } - # PYCSW location with and without the slash appended - location ${PROXY_PYCSW_LOCATION}/ { - proxy_pass ${PROXY_PYCSW_PROXY_PASS}/; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - #proxy_cache cache; - proxy_cache_bypass $cookie_auth_tkt; - proxy_no_cache $cookie_auth_tkt; - proxy_cache_valid 30m; - proxy_cache_key $host$scheme$proxy_host$request_uri; - } + # # PYCSW location with and without the slash appended + # location ${PROXY_PYCSW_LOCATION}/ { + # proxy_pass ${PROXY_PYCSW_PROXY_PASS}/; + # proxy_set_header X-Forwarded-For $remote_addr; + # proxy_set_header Host $host; + # #proxy_cache cache; + # proxy_cache_bypass $cookie_auth_tkt; + # proxy_no_cache $cookie_auth_tkt; + # proxy_cache_valid 30m; + # proxy_cache_key $host$scheme$proxy_host$request_uri; + # } - location = ${PROXY_PYCSW_LOCATION} { - proxy_pass ${PROXY_PYCSW_PROXY_PASS}/; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - #proxy_cache cache; - proxy_cache_bypass $cookie_auth_tkt; - proxy_no_cache $cookie_auth_tkt; - proxy_cache_valid 30m; - proxy_cache_key $host$scheme$proxy_host$request_uri; - } + # location = ${PROXY_PYCSW_LOCATION} { + # proxy_pass ${PROXY_PYCSW_PROXY_PASS}/; + # proxy_set_header X-Forwarded-For $remote_addr; + # proxy_set_header Host $host; + # #proxy_cache cache; + # proxy_cache_bypass $cookie_auth_tkt; + # proxy_no_cache $cookie_auth_tkt; + # proxy_cache_valid 30m; + # proxy_cache_key $host$scheme$proxy_host$request_uri; + # } error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 500 501 502 503 504 505 506 507 508 510 511 /error.html; diff --git a/nginx/setup/html/index.html b/nginx/setup/html/index.html index c5308a4eb..279c1966c 100644 --- a/nginx/setup/html/index.html +++ b/nginx/setup/html/index.html @@ -138,12 +138,6 @@

CKAN Docker Landing Page

Open Data portal

- -
  • - CSW Endpoint -

    CSW Endpoint

    -
  • -