2020-09-11 13:33:41 +02:00
|
|
|
# docker-compose build && docker-compose up -d
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
ckan_data:
|
|
|
|
pg_data:
|
|
|
|
solr_data:
|
|
|
|
|
|
|
|
services:
|
|
|
|
ckan:
|
|
|
|
container_name: ckan
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
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
|
|
|
|
|
|
|
|
ckan-harvest-gather:
|
|
|
|
container_name: ckan-harvest-gather
|
|
|
|
build:
|
|
|
|
context: .
|
2022-01-25 16:14:07 +01:00
|
|
|
command: ckan -c /srv/app/production.ini harvester gather-consumer
|
2020-09-11 13:33:41 +02:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- ckan
|
|
|
|
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}
|
|
|
|
|
|
|
|
ckan-harvest-fetch:
|
|
|
|
container_name: ckan-harvest-fetch
|
|
|
|
build:
|
|
|
|
context: .
|
2022-01-25 16:14:07 +01:00
|
|
|
command: ckan -c /srv/app/production.ini harvester fetch-consumer
|
2020-09-11 13:33:41 +02:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- ckan
|
|
|
|
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}
|
|
|
|
|
|
|
|
ckan-harvest-run:
|
|
|
|
container_name: ckan-harvest-run
|
|
|
|
build:
|
|
|
|
context: .
|
2020-09-11 13:36:23 +02:00
|
|
|
command: /bin/sh -c "while true; do sleep 900; ckan -c /srv/app/production.ini harvester run; done"
|
2020-09-11 13:33:41 +02:00
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- ckan
|
|
|
|
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}
|
|
|
|
|
|
|
|
ckan-harvest-cleanlog:
|
|
|
|
container_name: ckan-harvest-cleanlog
|
|
|
|
build:
|
|
|
|
context: .
|
2020-09-11 13:36:23 +02:00
|
|
|
command: /bin/sh -c "while true; do sleep 86400; ckan -c /srv/app/production.ini harvester clean_harvest_log; done"
|
2020-09-11 13:33:41 +02:00
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- ckan
|
|
|
|
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}
|
|
|
|
|
|
|
|
datapusher:
|
|
|
|
container_name: datapusher
|
2021-01-16 02:15:03 +01:00
|
|
|
image: ghcr.io/keitaroinc/datapusher:${DATAPUSHER_VERSION}
|
2020-09-11 13:33:41 +02:00
|
|
|
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}
|
2020-09-20 00:03:36 +02:00
|
|
|
- DATAPUSHER_SSL_VERIFY=${DATAPUSHER_SSL_VERIFY}
|
|
|
|
- DATAPUSHER_REWRITE_RESOURCES=${DATAPUSHER_REWRITE_RESOURCES}
|
|
|
|
- DATAPUSHER_REWRITE_URL=${DATAPUSHER_REWRITE_URL}
|
2020-09-11 13:33:41 +02:00
|
|
|
|
|
|
|
db:
|
|
|
|
container_name: db
|
|
|
|
build:
|
2022-01-25 16:14:07 +01:00
|
|
|
context: ../../compose/2.9
|
2020-09-11 13:33:41 +02:00
|
|
|
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}
|
2021-05-07 06:03:06 +02:00
|
|
|
- PGDATA=/var/lib/postgresql/data/db
|
2020-09-11 13:33:41 +02:00
|
|
|
volumes:
|
|
|
|
- pg_data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "pg_isready", "-U", "ckan"]
|
|
|
|
|
|
|
|
solr:
|
|
|
|
container_name: solr
|
2022-01-25 16:14:07 +01:00
|
|
|
image: solr:8.11.1
|
2020-09-11 13:33:41 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
2022-01-25 16:14:07 +01:00
|
|
|
env_file:
|
|
|
|
- ./.ckan-env
|
|
|
|
environment:
|
|
|
|
- CKAN_CORE_NAME=${CKAN_CORE_NAME}
|
|
|
|
- CKAN_VERSION=${CKAN_VERSION}
|
2020-09-11 13:33:41 +02:00
|
|
|
volumes:
|
2022-01-25 16:14:07 +01:00
|
|
|
- solr_data:/var/solr
|
|
|
|
- ${PWD}/../../compose/2.9/solr8/ckan_init_solr.sh:/docker-entrypoint-initdb.d/ckan_init_solr.sh
|
2020-09-11 13:33:41 +02:00
|
|
|
|
|
|
|
redis:
|
|
|
|
container_name: redis
|
|
|
|
image: redis:${REDIS_VERSION}
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
|
|
|
networks:
|
|
|
|
frontend:
|
|
|
|
backend:
|