From 6b9c5089e869e5af7a931b019b8b9fb4d49ab80d Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Thu, 10 Aug 2023 04:26:50 +0200 Subject: [PATCH] Default http port (81) WIP: https://github.com/mjanez/ckan-docker/issues/67 --- .env.example | 8 +++--- docker-compose.dev.yml | 1 + docker-compose.ghcr.yml | 49 ++++++++++++++++++++++++++++++------- samples/.env.apache.example | 8 +++--- samples/.env.localhost | 8 +++--- samples/.env.nginx.example | 8 +++--- 6 files changed, 57 insertions(+), 25 deletions(-) diff --git a/.env.example b/.env.example index c3e6a2c..2add08e 100644 --- a/.env.example +++ b/.env.example @@ -47,8 +47,8 @@ PROXY_PYCSW_LOCATION=/csw # pycsw PYCSW_PORT=8000 -CKAN_URL=https://localhost:8443/catalog -PYCSW_URL=https://localhost:8443/csw +CKAN_URL=http://localhost:81/catalog +PYCSW_URL=http://localhost:81/csw # SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type PYCSW_CKAN_SCHEMA=iso19139_geodcatap PYCSW_OUPUT_SCHEMA=iso19139_inspire @@ -85,7 +85,7 @@ TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_te CKAN_VERSION=2.9.9 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=https://localhost:8443 +CKAN_SITE_URL=http://localhost:81 CKAN__ROOT_PATH=/catalog/{{LANG}} CKAN_PORT=5000 CKAN__FAVICON=/catalog/base/images/ckan.ico @@ -136,7 +136,7 @@ CKANEXT__XLOADER__API_TOKEN=api_token CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan # ckanext-dcat -CKANEXT__DCAT__BASE_URI=https://localhost:8443/catalog +CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap" # ckanext-spatial (Solr Backend - solr8-spatial) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index bfb252c..0f49158 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,6 @@ version: "3" + volumes: ckan_storage: pg_data: diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml index ff71e00..3b1faa7 100644 --- a/docker-compose.ghcr.yml +++ b/docker-compose.ghcr.yml @@ -1,5 +1,6 @@ version: "3" + volumes: ckan_storage: pg_data: @@ -18,6 +19,9 @@ services: options: max-size: "100m" max-file: "10" + networks: + - webnet + - ckannet depends_on: ckan: condition: service_healthy @@ -30,6 +34,13 @@ services: build: context: ckan/ dockerfile: Dockerfile.ghcr + args: + - TZ=${TZ} + networks: + - ckannet + - dbnet + - solrnet + - redisnet env_file: - .env logging: @@ -44,8 +55,6 @@ services: condition: service_healthy redis: condition: service_healthy - ports: - - "0.0.0.0:${CKAN_PORT_HOST}:${CKAN_PORT}" volumes: - ckan_storage:/var/lib/ckan restart: unless-stopped @@ -64,6 +73,9 @@ services: options: max-size: "100m" max-file: "10" + networks: + - webnet + - ckannet depends_on: ckan: condition: service_healthy @@ -80,13 +92,18 @@ services: container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ - args: - - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + networks: + - dbnet environment: - - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - PGDATA=/var/lib/postgresql/data/db + - POSTGRES_USER + - POSTGRES_PASSWORD + - POSTGRES_DB + - CKAN_DB_USER + - CKAN_DB_PASSWORD + - CKAN_DB + - DATASTORE_READONLY_USER + - DATASTORE_READONLY_PASSWORD + - DATASTORE_DB volumes: - pg_data:/var/lib/postgresql/data logging: @@ -96,13 +113,15 @@ services: max-file: "10" restart: unless-stopped healthcheck: - test: ["CMD", "pg_isready", "-U", "ckan"] + test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: container_name: ${SOLR_CONTAINER_NAME} build: context: solr/ dockerfile: Dockerfile.spatial + networks: + - solrnet image: ckan/ckan-solr:${SOLR_IMAGE_VERSION} env_file: - .env @@ -125,6 +144,18 @@ services: options: max-size: "100m" max-file: "10" + networks: + - redisnet restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "-e", "QUIT"] + +networks: + webnet: + ckannet: + solrnet: + internal: true + dbnet: + internal: true + redisnet: + internal: true diff --git a/samples/.env.apache.example b/samples/.env.apache.example index 2dac0d1..8a84216 100644 --- a/samples/.env.apache.example +++ b/samples/.env.apache.example @@ -39,8 +39,8 @@ PROXY_PYCSW_LOCATION=/csw # pycsw PYCSW_PORT=8000 -CKAN_URL=https://localhost:8443/catalog -PYCSW_URL=https://localhost:8443/csw +CKAN_URL=http://localhost:81/catalog +PYCSW_URL=http://localhost:81/csw # SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type PYCSW_CKAN_SCHEMA=iso19139_geodcatap PYCSW_OUPUT_SCHEMA=iso19139_inspire @@ -77,7 +77,7 @@ TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_te CKAN_VERSION=2.9.9 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=https://localhost:8443 +CKAN_SITE_URL=http://localhost:81 CKAN__ROOT_PATH=/catalog/{{LANG}} CKAN_PORT=5000 CKAN__FAVICON=/catalog/base/images/ckan.ico @@ -128,7 +128,7 @@ CKANEXT__XLOADER__API_TOKEN=api_token CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan # ckanext-dcat -CKANEXT__DCAT__BASE_URI=https://localhost:8443/catalog +CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap" # ckanext-spatial (Solr Backend - solr8-spatial) diff --git a/samples/.env.localhost b/samples/.env.localhost index c3e6a2c..2add08e 100644 --- a/samples/.env.localhost +++ b/samples/.env.localhost @@ -47,8 +47,8 @@ PROXY_PYCSW_LOCATION=/csw # pycsw PYCSW_PORT=8000 -CKAN_URL=https://localhost:8443/catalog -PYCSW_URL=https://localhost:8443/csw +CKAN_URL=http://localhost:81/catalog +PYCSW_URL=http://localhost:81/csw # SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type PYCSW_CKAN_SCHEMA=iso19139_geodcatap PYCSW_OUPUT_SCHEMA=iso19139_inspire @@ -85,7 +85,7 @@ TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_te CKAN_VERSION=2.9.9 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=https://localhost:8443 +CKAN_SITE_URL=http://localhost:81 CKAN__ROOT_PATH=/catalog/{{LANG}} CKAN_PORT=5000 CKAN__FAVICON=/catalog/base/images/ckan.ico @@ -136,7 +136,7 @@ CKANEXT__XLOADER__API_TOKEN=api_token CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan # ckanext-dcat -CKANEXT__DCAT__BASE_URI=https://localhost:8443/catalog +CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap" # ckanext-spatial (Solr Backend - solr8-spatial) diff --git a/samples/.env.nginx.example b/samples/.env.nginx.example index 7e1bd54..dd23d8c 100644 --- a/samples/.env.nginx.example +++ b/samples/.env.nginx.example @@ -39,8 +39,8 @@ PROXY_PYCSW_LOCATION=/csw # pycsw PYCSW_PORT=8000 -CKAN_URL=https://localhost:8443/catalog -PYCSW_URL=https://localhost:8443/csw +CKAN_URL=http://localhost:81/catalog +PYCSW_URL=http://localhost:81/csw # SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type PYCSW_CKAN_SCHEMA=iso19139_geodcatap PYCSW_OUPUT_SCHEMA=iso19139_inspire @@ -77,7 +77,7 @@ TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_te CKAN_VERSION=2.9.9 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=https://localhost:8443 +CKAN_SITE_URL=http://localhost:81 CKAN__ROOT_PATH=/catalog/{{LANG}} CKAN_PORT=5000 CKAN__FAVICON=/catalog/base/images/ckan.ico @@ -128,7 +128,7 @@ CKANEXT__XLOADER__API_TOKEN=api_token CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan # ckanext-dcat -CKANEXT__DCAT__BASE_URI=https://localhost:8443/catalog +CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap" # ckanext-spatial (Solr Backend - solr8-spatial)