From 3c9c3dd41fbb218f5001fdfba0c13978a722f9b7 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 3 Jul 2024 16:38:45 +0200 Subject: [PATCH 1/9] Update README Add section: "Updating the .env file for development mode" --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 7e4fde87..ad0d6634 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,16 @@ In VS Code: You can now set breakpoints and remote debug your CKAN development instance. +#### Updating the .env file for development mode + +The Docker Compose .env file by default is set up for production mode. There are a few changes needed if you would +like to run in Development mode: + +1. Change the `CKAN_SITE_URL` variable to be: http://localhost:5000 +2. Update the `CKAN__DATAPUSHER__CALLBACK_URL_BASE` variable to use the `ckan-dev` container name: http://ckan-dev:5000 +3. Update the `DATAPUSHER_REWRITE_URL` variable to also use the `ckan-dev` container name http://ckan-dev:5000 + + ## 5. CKAN images ![ckan images](https://user-images.githubusercontent.com/54408245/207079416-a01235af-2dea-4425-b6fd-f8c3687dd993.png) From 020b1b8259d36c4fd05e074b5429028536bd8eff Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 4 Jul 2024 09:30:17 +0200 Subject: [PATCH 2/9] Update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad0d6634..6021a4d1 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ * [Create an extension](#create-an-extension) * [Running HTTPS on development mode](#running-https-on-development-mode) * [Remote Debugging with VS Code](#remote-debugging-with-vs-code) + * [Updating the environment file for development mode](#updating-the-environment-file-for-development-mode) * [5. CKAN images](#5-ckan-images) * [Extending the base images](#extending-the-base-images) * [Applying patches](#applying-patches) @@ -152,10 +153,9 @@ In VS Code: You can now set breakpoints and remote debug your CKAN development instance. -#### Updating the .env file for development mode +#### Updating the environment file for development mode -The Docker Compose .env file by default is set up for production mode. There are a few changes needed if you would -like to run in Development mode: +The Docker Compose environment `.env` file by default is set up for production mode. There are a few changes needed if you would like to run in Development mode: 1. Change the `CKAN_SITE_URL` variable to be: http://localhost:5000 2. Update the `CKAN__DATAPUSHER__CALLBACK_URL_BASE` variable to use the `ckan-dev` container name: http://ckan-dev:5000 From 38d1a11265291d24bd6a8ea82420adf8d7e73701 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Wed, 10 Jul 2024 13:45:32 -0400 Subject: [PATCH 3/9] envvars last plugin in .env.example envvars should be last in the list of plugins so that other plugins can read/update the values it sets --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 830cf949..74ba958c 100644 --- a/.env.example +++ b/.env.example @@ -69,7 +69,7 @@ NGINX_PORT=80 NGINX_SSLPORT=443 # Extensions -CKAN__PLUGINS="envvars image_view text_view datatables_view datastore datapusher" +CKAN__PLUGINS="image_view text_view datatables_view datastore datapusher envvars" CKAN__HARVEST__MQ__TYPE=redis CKAN__HARVEST__MQ__HOSTNAME=redis CKAN__HARVEST__MQ__PORT=6379 From 18fbe445c1782d887f6ac77813e507d529246b53 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Wed, 10 Jul 2024 14:46:00 -0400 Subject: [PATCH 4/9] remove broken, confusing CKAN_PORT setting --- .env.example | 2 -- README.md | 3 --- docker-compose.dev.yml | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 830cf949..3e556ea1 100644 --- a/.env.example +++ b/.env.example @@ -30,8 +30,6 @@ USE_HTTPS_FOR_DEV=false CKAN_VERSION=2.10.0 CKAN_SITE_ID=default CKAN_SITE_URL=https://localhost:8443 -CKAN_PORT=5000 -CKAN_PORT_HOST=5000 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 diff --git a/README.md b/README.md index 6021a4d1..4756a9c5 100644 --- a/README.md +++ b/README.md @@ -248,9 +248,6 @@ ckan Add these lines to the `ckan-dev` service in the docker-compose.dev.yml file ```yaml -ports: - - "0.0.0.0:${CKAN_PORT}:5000" - stdin_open: true tty: true ``` diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b1a56a49..72cd4a85 100755 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -21,7 +21,7 @@ services: - solr - redis ports: - - "0.0.0.0:${CKAN_PORT_HOST}:${CKAN_PORT}" + - "0.0.0.0:${CKAN_PORT_HOST}:5000" volumes: - ckan_storage:/var/lib/ckan - ./src:/srv/app/src_extensions From 0cb87296d80c554a3f20e2008d1f3fbe1362ad6f Mon Sep 17 00:00:00 2001 From: amercader Date: Wed, 21 Aug 2024 13:14:28 +0200 Subject: [PATCH 5/9] Update project images to latest ckan release --- README.md | 3 +-- ckan/Dockerfile | 2 +- ckan/Dockerfile.dev | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4756a9c5..e209e3b6 100644 --- a/README.md +++ b/README.md @@ -314,8 +314,7 @@ For convenience the CKAN_SITE_URL parameter should be set in the .env file. For ## 12. Changing the base image -The base image used in the CKAN Dockerfile and Dockerfile.dev can be changed so a different DockerHub image is used eg: ckan/ckan-base:2.9.9 -could be used instead of ckan/ckan-base:2.10.1 +The base image used in the CKAN Dockerfile and Dockerfile.dev can be changed so a different DockerHub image is used eg: ckan/ckan-base:2.10.5 can be used instead of ckan/ckan-base:2.11.0 ## 13. Replacing DataPusher with XLoader diff --git a/ckan/Dockerfile b/ckan/Dockerfile index f9dae59a..67a431ea 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -1,4 +1,4 @@ -FROM ckan/ckan-base:2.10.4 +FROM ckan/ckan-base:2.11.0 # Install any extensions needed by your CKAN instance # See Dockerfile.dev for more details and examples diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index 1f70363b..a8155071 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ckan/ckan-dev:2.10.4 +FROM ckan/ckan-dev:2.11.0 # Install any extensions needed by your CKAN instance # - Make sure to add the plugins to CKAN__PLUGINS in the .env file From 1e2f6cfe6f55a68e1ffa89c2842cebe5ef03095c Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:18:30 +0200 Subject: [PATCH 6/9] Update CKAN Dockerfile versions to 2.9.12 - Update workflows to generate a tag as: `2.9.12` instead of `ckan-2.9.12`. Align with the [`ckan-docker-spatial`(https://github.com/mjanez/ckan-docker-spatial#pre-configured-ckan-docker-images) and [`ckan-docker-base`(https://github.com/ckan/ckan-docker-base#pre-configured-ckan-docker-images)` tags. --- .github/workflows/docker-build.yml | 22 +++++++++++++++------- .github/workflows/docker-manual.yml | 22 +++++++++++++++------- .github/workflows/docker-master.yml | 22 ++++++++++++++-------- .github/workflows/docker-pr.yml | 12 ++++++------ README.md | 11 ++++++++++- ckan/Dockerfile | 2 +- ckan/Dockerfile.dev | 2 +- ckan/Dockerfile.ghcr | 2 +- 8 files changed, 63 insertions(+), 32 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 07ed077b..eead1f3a 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -14,9 +14,9 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - TAG: ghcr.io/${{ github.repository }}:${{ github.head_ref }} CONTEXT: . BRANCH: ${{ github.head_ref }} + VERSION: ${{ github.head_ref }} DOCKERFILE_PATH: /ckan DOCKERFILE: Dockerfile @@ -43,6 +43,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract tag version from branch name + id: extract_tag_version + run: echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5 @@ -50,14 +54,18 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: | org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md - org.opencontainers.image.version=${{ env.BRANCH }} + org.opencontainers.image.version=${{ env.VERSION }} + annotations: | + org.opencontainers.image.description=This image contains CKAN based on a Docker Compose deployment. The container includes CKAN along with its dependencies and configurations for spatial data support. + org.opencontainers.image.source=https://github.com/${{ github.repository }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true - tags: ${{ env.TAG }} + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }} file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} @@ -68,14 +76,14 @@ jobs: no-fail: true - name: Run Trivy container image vulnerability scanner - uses: aquasecurity/trivy-action@0.18.0 + uses: aquasecurity/trivy-action@0.24.0 with: - image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH }} + image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} format: sarif output: trivy-results.sarif - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: trivy-results.sarif \ No newline at end of file diff --git a/.github/workflows/docker-manual.yml b/.github/workflows/docker-manual.yml index 9acbb462..44e25534 100644 --- a/.github/workflows/docker-manual.yml +++ b/.github/workflows/docker-manual.yml @@ -5,9 +5,9 @@ on: workflow_dispatch env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - TAG: ghcr.io/${{ github.repository }}:${{ github.ref_name }} CONTEXT: . BRANCH: ${{ github.ref_name }} + VERSION: ${{ github.ref_name }} DOCKERFILE_PATH: /ckan DOCKERFILE: Dockerfile @@ -33,6 +33,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract tag version from branch name + id: extract_tag_version + run: echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5 @@ -40,14 +44,18 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: | org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md - org.opencontainers.image.version=${{ env.BRANCH }} + org.opencontainers.image.version=${{ env.VERSION }} + annotations: | + org.opencontainers.image.description=This image contains CKAN based on a Docker Compose deployment. The container includes CKAN along with its dependencies and configurations for spatial data support. + org.opencontainers.image.source=https://github.com/${{ github.repository }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true - tags: ${{ env.TAG }} + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }} file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} @@ -58,14 +66,14 @@ jobs: no-fail: true - name: Run Trivy container image vulnerability scanner - uses: aquasecurity/trivy-action@0.18.0 + uses: aquasecurity/trivy-action@0.24.0 with: - image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH }} + image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} format: sarif output: trivy-results.sarif - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: trivy-results.sarif \ No newline at end of file diff --git a/.github/workflows/docker-master.yml b/.github/workflows/docker-master.yml index f798eafd..b0eab55a 100644 --- a/.github/workflows/docker-master.yml +++ b/.github/workflows/docker-master.yml @@ -9,6 +9,8 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} CONTEXT: . + BRANCH: master + VERSION: master DOCKERFILE_PATH: /ckan DOCKERFILE: Dockerfile @@ -29,10 +31,6 @@ jobs: with: fetch-depth: 0 - - 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 - - name: Login to registry uses: docker/login-action@v3 with: @@ -40,21 +38,29 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - 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 + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: | - org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/master/README.md + org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ env.BRANCH }}/README.md org.opencontainers.image.version=${{ env.VERSION }} + annotations: | + org.opencontainers.image.description=This image contains CKAN based on a Docker Compose deployment. The container includes CKAN along with its dependencies and configurations for spatial data support. + org.opencontainers.image.source=https://github.com/${{ github.repository }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }} file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} @@ -65,14 +71,14 @@ jobs: no-fail: true - name: Run Trivy container image vulnerability scanner - uses: aquasecurity/trivy-action@0.18.0 + uses: aquasecurity/trivy-action@0.24.0 with: image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} format: sarif output: trivy-results.sarif - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: trivy-results.sarif \ No newline at end of file diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml index fea16e48..ccd46a79 100644 --- a/.github/workflows/docker-pr.yml +++ b/.github/workflows/docker-pr.yml @@ -30,11 +30,11 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Checkout + - name: Check out code uses: actions/checkout@v4 - name: NGINX build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./nginx file: ./nginx/Dockerfile @@ -42,7 +42,7 @@ jobs: tags: mjanez/ckan-docker-nginx:test-build-only - name: Apache HTTP Server build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./apache file: ./apache/Dockerfile @@ -50,7 +50,7 @@ jobs: tags: mjanez/ckan-docker-apache:test-build-only - name: PostgreSQL build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./postgresql file: ./postgresql/Dockerfile @@ -58,7 +58,7 @@ jobs: tags: mjanez/ckan-docker-postgresql:test-build-only - name: Solr build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./solr file: ./solr/Dockerfile @@ -66,7 +66,7 @@ jobs: tags: mjanez/ckan-docker-solr:test-build-only - name: ckan-pycsw build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ./ckan-pycsw file: ./ckan-pycsw/Dockerfile diff --git a/README.md b/README.md index 3af86f26..01be220c 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,18 @@ Available components: | CKAN Version | Type | Docker tag | Notes | | --- | --- | --- | --- | -| 2.9.8 | custom image | `ghcr.io/mjanez/ckan-spatial:ckan-2.9.8` | Stable version with CKAN 2.9.8 | +| 2.9.8 | custom image | `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`, `ghcr.io/mjanez/ckan-docker:2.9.12` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11`, also includes a security backport: `2.9.12` | | 2.9.9 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.9` | Stable version with CKAN 2.9.9 | | 2.9.10 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.10` | Stable version with CKAN 2.9.10 | | 2.9.11 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.11` | Stable version with CKAN 2.9.11 | | 2.9.11 | latest custom image | `ghcr.io/mjanez/ckan-docker:master` | Latest `ckan-docker` image. | +| CKAN Version | Type | Base image | Docker tag | Notes | +| --- | --- | --- | --- | --- | +| 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`, `ghcr.io/mjanez/ckan-docker:2.9.12` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11`, including a security backport: `2.9.12`. As of `2.9.12`, repo images are aligned with the [`ckan-docker-spatial`](https://github.com/mjanez/ckan-docker-spatial#pre-configured-ckan-docker-images) and [`ckan-docker-base](https://github.com/ckan/ckan-docker-base#pre-configured-ckan-docker-images)` tags. | +| 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. | + + 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. * Solr: [Custom image](/solr/Dockerfile.spatial) based on official CKAN [pre-configured Solr image](https://github.com/ckan/ckan-solr). The index data is stored in a named volume and has a custom spatial schema upgrades. [^2] @@ -435,6 +441,9 @@ You can now set breakpoints and remote debug your CKAN development instance usin Add these lines to the `ckan-dev` service in the docker compose.dev.yml file ```yaml +ports: + - "0.0.0.0:${CKAN_PORT}:5000" + stdin_open: true tty: true ``` diff --git a/ckan/Dockerfile b/ckan/Dockerfile index eec6ed80..9b96915d 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-base-spatial:ckan-2.9.11 +FROM ghcr.io/mjanez/ckan-spatial-base:2.9.12 LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index 21f3a8a4..228902ef 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-base-spatial:ckan-2.9.11-dev +FROM ghcr.io/mjanez/ckan-spatial-dev:2.9.12 LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables diff --git a/ckan/Dockerfile.ghcr b/ckan/Dockerfile.ghcr index 03dc78a3..4e1e5a05 100644 --- a/ckan/Dockerfile.ghcr +++ b/ckan/Dockerfile.ghcr @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-docker:ckan-2.9.11 +FROM ghcr.io/mjanez/ckan-docker:2.9.12 LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables From beefbf5d0d3e2ae519f291d2c47acff077b861ca Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:29:23 +0200 Subject: [PATCH 7/9] Update README for CKAN Dockerfile versions to 2.11.0 --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index 01be220c..337c0f97 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,11 @@ Contains Docker images for the different components of CKAN Cloud and a Docker c Available components: * CKAN custom multi-stage build with spatial capabilities from [ckan-docker-spatial](https://github.com/mjanez/ckan-docker-spatial)[^1], an image used as a base and built from the official CKAN repo. The following versions of CKAN are available: -| CKAN Version | Type | Docker tag | Notes | -| --- | --- | --- | --- | -| 2.9.8 | custom image | `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`, `ghcr.io/mjanez/ckan-docker:2.9.12` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11`, also includes a security backport: `2.9.12` | -| 2.9.9 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.9` | Stable version with CKAN 2.9.9 | -| 2.9.10 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.10` | Stable version with CKAN 2.9.10 | -| 2.9.11 | custom image | `ghcr.io/mjanez/ckan-docker:ckan-2.9.11` | Stable version with CKAN 2.9.11 | -| 2.9.11 | latest custom image | `ghcr.io/mjanez/ckan-docker:master` | Latest `ckan-docker` image. | - | CKAN Version | Type | Base image | Docker tag | Notes | | --- | --- | --- | --- | --- | | 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`, `ghcr.io/mjanez/ckan-docker:2.9.12` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11`, including a security backport: `2.9.12`. As of `2.9.12`, repo images are aligned with the [`ckan-docker-spatial`](https://github.com/mjanez/ckan-docker-spatial#pre-configured-ckan-docker-images) and [`ckan-docker-base](https://github.com/ckan/ckan-docker-base#pre-configured-ckan-docker-images)` tags. | | 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` | Latest CKAN version. | 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. @@ -441,9 +433,6 @@ You can now set breakpoints and remote debug your CKAN development instance usin Add these lines to the `ckan-dev` service in the docker compose.dev.yml file ```yaml -ports: - - "0.0.0.0:${CKAN_PORT}:5000" - stdin_open: true tty: true ``` From b6e82c72f2846269435f8db7ab524ba0e50ec847 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:45:41 +0200 Subject: [PATCH 8/9] Using latest stable 2.9.11 to master --- README.md | 2 +- ckan/Dockerfile | 2 +- ckan/Dockerfile.dev | 2 +- ckan/Dockerfile.ghcr | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac853f21..d864e173 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Available components: | CKAN Version | Type | Base image | Docker tag | Notes | | --- | --- | --- | --- | --- | -| 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`, `ghcr.io/mjanez/ckan-docker:2.9.12` | Stable official versions of CKAN `2.9.8`, `2.9.10` and `2.9.11`, including a security backport: `2.9.12`. As of `2.9.12`, repo images are aligned with the [`ckan-docker-spatial`](https://github.com/mjanez/ckan-docker-spatial#pre-configured-ckan-docker-images) and [`ckan-docker-base](https://github.com/ckan/ckan-docker-base#pre-configured-ckan-docker-images)` tags. | +| 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). | diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 9b96915d..eec6ed80 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-spatial-base:2.9.12 +FROM ghcr.io/mjanez/ckan-base-spatial:ckan-2.9.11 LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index 228902ef..21f3a8a4 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-spatial-dev:2.9.12 +FROM ghcr.io/mjanez/ckan-base-spatial:ckan-2.9.11-dev LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables diff --git a/ckan/Dockerfile.ghcr b/ckan/Dockerfile.ghcr index 4e1e5a05..03dc78a3 100644 --- a/ckan/Dockerfile.ghcr +++ b/ckan/Dockerfile.ghcr @@ -1,4 +1,4 @@ -FROM ghcr.io/mjanez/ckan-docker:2.9.12 +FROM ghcr.io/mjanez/ckan-docker:ckan-2.9.11 LABEL maintainer="mnl.janez@gmail.com" # Set up environment variables From 35a6bdc56efe0c560b065d4a904643f1b3a6314d Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:55:27 +0200 Subject: [PATCH 9/9] Fix for ckanext-dcat v1.80 and ckanext-schemingdcat v3.2.2 --- .env.example | 15 +++++++++------ samples/.env.es.example | 15 +++++++++------ samples/.env.localhost | 15 +++++++++------ 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.env.example b/.env.example index 11dd700d..2d3dfeb4 100644 --- a/.env.example +++ b/.env.example @@ -122,6 +122,9 @@ CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field # CORS Settings. If True, all origins will be allowed (the response header Access-Control-Allow-Origin is set to ‘*’). If False, only origins from the ckan.cors.origin_whitelist setting will be allowed. 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_ADMIN_COLLABORATORS=False ## Resource Proxy settings ### Preview size limit, default: 1MB @@ -154,8 +157,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://${CKAN_DB_USER}:${CKAN_DB_PASSWORD}@ # 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=eu_dcat_ap_2,es_dcat -CKANEXT__DCAT__RDF_PROFILES='eu_dcat_ap_2 eu_dcat_ap_scheming' +# 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}' @@ -176,10 +179,10 @@ 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/geodcat_ap/eu_geodcat_ap_2.yaml ckanext.schemingdcat:schemas/resources/dcat_3_document.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" +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" ## 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_ORGANIZATION_CUSTOM_FACETS=True diff --git a/samples/.env.es.example b/samples/.env.es.example index 55554036..50a20ddc 100644 --- a/samples/.env.es.example +++ b/samples/.env.es.example @@ -122,6 +122,9 @@ CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field # CORS Settings. If True, all origins will be allowed (the response header Access-Control-Allow-Origin is set to ‘*’). If False, only origins from the ckan.cors.origin_whitelist setting will be allowed. 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_ADMIN_COLLABORATORS=False ## Resource Proxy settings ### Preview size limit, default: 1MB @@ -153,8 +156,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://${CKAN_DB_USER}:${CKAN_DB_PASSWORD}@ # 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=eu_dcat_ap_2,es_dcat -CKANEXT__DCAT__RDF_PROFILES='eu_dcat_ap_2 eu_dcat_ap_scheming' +# 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}' @@ -175,10 +178,10 @@ 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/geodcat_ap/es_geodcat_ap_2.yaml ckanext.schemingdcat:schemas/resources/dcat_3_document.yaml" -CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_group.json" -CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_org.json" -CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/default_presets.json ckanext.fluent:presets.json" +CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_dataset.yaml" +CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_group.json" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_org.json" +CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/default_presets.json ckanext.fluent:presets.json ckanext.iepnb:schemas/presets.json" ## Facets: setup_scheming.sh CKANEXT__SCHEMINGDCAT_FACET_LIST="dataset_scope theme groups theme_es 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 diff --git a/samples/.env.localhost b/samples/.env.localhost index 11dd700d..2d3dfeb4 100644 --- a/samples/.env.localhost +++ b/samples/.env.localhost @@ -122,6 +122,9 @@ CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field # CORS Settings. If True, all origins will be allowed (the response header Access-Control-Allow-Origin is set to ‘*’). If False, only origins from the ckan.cors.origin_whitelist setting will be allowed. 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_ADMIN_COLLABORATORS=False ## Resource Proxy settings ### Preview size limit, default: 1MB @@ -154,8 +157,8 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://${CKAN_DB_USER}:${CKAN_DB_PASSWORD}@ # 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=eu_dcat_ap_2,es_dcat -CKANEXT__DCAT__RDF_PROFILES='eu_dcat_ap_2 eu_dcat_ap_scheming' +# 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}' @@ -176,10 +179,10 @@ 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/geodcat_ap/eu_geodcat_ap_2.yaml ckanext.schemingdcat:schemas/resources/dcat_3_document.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" +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" ## 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_ORGANIZATION_CUSTOM_FACETS=True