docker-ckan/compose/2.11/docker-compose.yml

113 lines
3.0 KiB
YAML
Raw Normal View History

2024-08-21 11:49:13 +02:00
# docker-compose build && docker-compose up -d
volumes:
ckan_data:
pg_data:
solr_data:
services:
ckan:
container_name: ckan
2024-09-18 16:51:09 +02:00
build:
context: .
2024-08-21 11:49:13 +02:00
networks:
- frontend
- backend
depends_on:
db:
condition: service_healthy
restart: true
solr:
condition: service_healthy
restart: true
2024-08-21 11:49:13 +02:00
ports:
- "0.0.0.0:${CKAN_PORT}:5000"
env_file:
- ./.ckan-env
environment:
- CKAN_SQLALCHEMY_URL=postgresql://ckan:${POSTGRES_PASSWORD}@db/ckan
- CKAN_DATASTORE_WRITE_URL=postgresql://ckan:${POSTGRES_PASSWORD}@db/datastore
- CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:${DATASTORE_READONLY_PASSWORD}@db/datastore
- CKAN_SOLR_URL=http://solr:8983/solr/ckan
- CKAN_REDIS_URL=redis://redis:6379/1
- CKAN_SITE_URL=${CKAN_SITE_URL}
- CKAN_MAX_UPLOAD_SIZE_MB=${CKAN_MAX_UPLOAD_SIZE_MB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
volumes:
- ckan_data:/srv/app/data
2024-09-18 16:51:09 +02:00
- ./src:/srv/app/src_extensions
- ./docker-entrypoint.d:/srv/app/docker-entrypoint.d
2024-08-21 11:49:13 +02:00
datapusher:
container_name: datapusher
image: ghcr.io/keitaroinc/datapusher:${DATAPUSHER_VERSION}
networks:
- frontend
- backend
ports:
- "8000:8000"
environment:
- DATAPUSHER_MAX_CONTENT_LENGTH=${DATAPUSHER_MAX_CONTENT_LENGTH}
- DATAPUSHER_CHUNK_SIZE=${DATAPUSHER_CHUNK_SIZE}
- DATAPUSHER_CHUNK_INSERT_ROWS=${DATAPUSHER_CHUNK_INSERT_ROWS}
- DATAPUSHER_DOWNLOAD_TIMEOUT=${DATAPUSHER_DOWNLOAD_TIMEOUT}
- DATAPUSHER_SSL_VERIFY=${DATAPUSHER_SSL_VERIFY}
2024-08-21 11:49:13 +02:00
- DATAPUSHER_REWRITE_RESOURCES=${DATAPUSHER_REWRITE_RESOURCES}
- DATAPUSHER_REWRITE_URL=${DATAPUSHER_REWRITE_URL}
db:
container_name: db
build:
context: .
dockerfile: postgresql/Dockerfile
args:
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
networks:
- backend
environment:
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=/var/lib/postgresql/data/db
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan"]
solr:
container_name: solr
2024-09-18 16:51:09 +02:00
image: ckan/ckan-solr:2.11-solr9-spatial
2024-08-21 11:49:13 +02:00
networks:
- backend
env_file:
- ./.ckan-env
environment:
- CKAN_CORE_NAME=${CKAN_CORE_NAME}
- CKAN_VERSION=${CKAN_VERSION}
volumes:
- solr_data:/var/solr
- ${PWD}/solr8/ckan_init_solr.sh:/docker-entrypoint-initdb.d/ckan_init_solr.sh
healthcheck:
test: ["CMD-SHELL", "/opt/solr/bin/solr","status"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
2024-08-21 11:49:13 +02:00
redis:
container_name: redis
image: redis:${REDIS_VERSION}
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
2024-08-21 11:49:13 +02:00
networks:
frontend:
backend: