Merge pull request #69 from mjanez/ckan-2.9.9

Fix Solr images
This commit is contained in:
mjanez 2023-08-14 03:48:52 +02:00 committed by GitHub
commit 4ffd311cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 218 additions and 11 deletions

View File

@ -39,7 +39,7 @@ APACHE_VERSION=2.4-alpine
APACHE_PORT=80 APACHE_PORT=80
APACHE_LOG_DIR=/var/log/apache APACHE_LOG_DIR=/var/log/apache
#NIGNX/APACHE #NGINX/APACHE
## Check CKAN__ROOT_PATH and CKANEXT__DCAT__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 `/`. ## Check CKAN__ROOT_PATH and CKANEXT__DCAT__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 `/`.
PROXY_SERVER_NAME=localhost PROXY_SERVER_NAME=localhost
PROXY_CKAN_LOCATION=/catalog PROXY_CKAN_LOCATION=/catalog
@ -163,6 +163,14 @@ CKANEXT__SCHEMING_DCAT_FACET_LIST="theme groups theme_es dcat_type groups publis
CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True
CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True
# ckanext-pages
CKANEXT__PAGES__ALOW_HTML=False
CKANEXT__PAGES__ORGANIZATION=True
CKANEXT__PAGES__GROUP=True
CKANEXT__PAGES__ABOUT_MENU=False
CKANEXT__PAGES__GROUP_MENU=False
CKANEXT__PAGES__ORGANIZATION_MENU=False
# WIP: ckanext-sparql_interface # WIP: ckanext-sparql_interface
CKANEXT__SPARQL__ENDPOINT_URL=https://dbpedia.org/sparql CKANEXT__SPARQL__ENDPOINT_URL=https://dbpedia.org/sparql
CKANEXT__SPARQL__HIDE_ENDPOINT_URL=False CKANEXT__SPARQL__HIDE_ENDPOINT_URL=False

View File

@ -0,0 +1,11 @@
#!/bin/bash
# Add pages CKAN config file (https://github.com/ckan/ckanext-pages#configuration)
echo "Loading pages config in the CKAN config file"
ckan config-tool $CKAN_INI \
"ckan.pages.allow_html = $CKANEXT__PAGES__ALOW_HTML" \
"ckanext.pages.organization = $CKANEXT__PAGES__ORGANIZATION" \
"ckanext.pages.group = $CKANEXT__PAGES__GROUP" \
"ckanext.pages.about_menu = $CKANEXT__PAGES__ABOUT_MENU" \
"ckanext.pages.group_menu = $CKANEXT__PAGES__GROUP_MENU" \
"ckanext.pages.organization_menu = $CKANEXT__PAGES__ORGANIZATION_MENU"

View File

@ -19,6 +19,9 @@ services:
options: options:
max-size: "100m" max-size: "100m"
max-file: "10" max-file: "10"
networks:
- webnet
- ckannet
depends_on: depends_on:
ckan: ckan:
condition: service_healthy condition: service_healthy
@ -31,6 +34,13 @@ services:
build: build:
context: ckan/ context: ckan/
dockerfile: Dockerfile dockerfile: Dockerfile
args:
- TZ=${TZ}
networks:
- ckannet
- dbnet
- solrnet
- redisnet
env_file: env_file:
- .env - .env
logging: logging:
@ -65,6 +75,9 @@ services:
options: options:
max-size: "100m" max-size: "100m"
max-file: "10" max-file: "10"
networks:
- webnet
- ckannet
depends_on: depends_on:
ckan: ckan:
condition: service_healthy condition: service_healthy
@ -81,13 +94,18 @@ services:
container_name: ${POSTGRESQL_CONTAINER_NAME} container_name: ${POSTGRESQL_CONTAINER_NAME}
build: build:
context: postgresql/ context: postgresql/
args: networks:
- DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - dbnet
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
environment: environment:
- DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - POSTGRES_USER
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_PASSWORD
- PGDATA=/var/lib/postgresql/data/db - POSTGRES_DB
- CKAN_DB_USER
- CKAN_DB_PASSWORD
- CKAN_DB
- DATASTORE_READONLY_USER
- DATASTORE_READONLY_PASSWORD
- DATASTORE_DB
volumes: volumes:
- pg_data:/var/lib/postgresql/data - pg_data:/var/lib/postgresql/data
logging: logging:
@ -97,14 +115,15 @@ services:
max-file: "10" max-file: "10"
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan"] test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
solr: solr:
container_name: ${SOLR_CONTAINER_NAME} container_name: ${SOLR_CONTAINER_NAME}
build: build:
context: solr/ context: solr/
dockerfile: Dockerfile.spatial dockerfile: Dockerfile.spatial
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION} networks:
- solrnet
env_file: env_file:
- .env - .env
logging: logging:
@ -126,6 +145,18 @@ services:
options: options:
max-size: "100m" max-size: "100m"
max-file: "10" max-file: "10"
networks:
- redisnet
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"] test: ["CMD", "redis-cli", "-e", "QUIT"]
networks:
webnet:
ckannet:
solrnet:
internal: true
dbnet:
internal: true
redisnet:
internal: true

View File

@ -122,7 +122,6 @@ services:
dockerfile: Dockerfile.spatial dockerfile: Dockerfile.spatial
networks: networks:
- solrnet - solrnet
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
env_file: env_file:
- .env - .env
logging: logging:

View File

@ -0,0 +1,159 @@
version: "3"
volumes:
ckan_storage:
pg_data:
solr_data:
services:
apache:
container_name: ${APACHE_CONTAINER_NAME}
build:
context: apache/
dockerfile: Dockerfile
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- webnet
- ckannet
depends_on:
ckan:
condition: service_healthy
ports:
- "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}"
ckan:
container_name: ${CKAN_CONTAINER_NAME}
build:
context: ckan/
dockerfile: Dockerfile.ghcr
args:
- TZ=${TZ}
networks:
- ckannet
- dbnet
- solrnet
- redisnet
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
db:
condition: service_healthy
solr:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ckan_storage:/var/lib/ckan
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"]
pycsw:
container_name: ${PYCSW_CONTAINER_NAME}
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:
condition: service_healthy
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:
container_name: ${POSTGRESQL_CONTAINER_NAME}
build:
context: postgresql/
networks:
- dbnet
environment:
- 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:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
solr:
container_name: ${SOLR_CONTAINER_NAME}
build:
context: solr/
dockerfile: Dockerfile.spatial
networks:
- solrnet
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- solr_data:/var/solr
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"]
redis:
container_name: ${REDIS_CONTAINER_NAME}
image: redis:${REDIS_VERSION}
logging:
driver: "json-file"
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

View File

@ -122,7 +122,6 @@ services:
dockerfile: Dockerfile.spatial dockerfile: Dockerfile.spatial
networks: networks:
- solrnet - solrnet
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
env_file: env_file:
- .env - .env
logging: logging: