2020-09-11 11:28:34 +02:00
|
|
|
# docker-compose build && docker-compose up -d
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
minio_data:
|
|
|
|
pg_data:
|
|
|
|
solr_data:
|
|
|
|
|
|
|
|
services:
|
|
|
|
ckan:
|
|
|
|
container_name: ckan
|
2020-09-11 12:14:39 +02:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
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_DATAPUSHER_URL=http://datapusher:8000
|
|
|
|
- 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
|
|
|
|
image: keitaro/ckan-datapusher:${DATAPUSHER_VERSION}
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
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}
|
|
|
|
|
|
|
|
db:
|
|
|
|
container_name: db
|
|
|
|
build:
|
2020-09-11 12:14:39 +02:00
|
|
|
context: ../../compose
|
2020-09-11 11:28:34 +02:00
|
|
|
dockerfile: postgresql/Dockerfile
|
|
|
|
args:
|
|
|
|
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
|
|
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
environment:
|
|
|
|
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
|
|
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
|
|
volumes:
|
|
|
|
- pg_data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "pg_isready", "-U", "ckan"]
|
|
|
|
|
|
|
|
solr:
|
|
|
|
container_name: solr
|
|
|
|
build:
|
2020-09-11 12:14:39 +02:00
|
|
|
context: ../../compose
|
2020-09-11 11:28:34 +02:00
|
|
|
dockerfile: solr/Dockerfile
|
|
|
|
args:
|
|
|
|
- CKAN_VERSION=${CKAN_VERSION}
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
volumes:
|
|
|
|
- solr_data:/opt/solr/server/solr/ckan/data
|
|
|
|
|
|
|
|
redis:
|
|
|
|
container_name: redis
|
|
|
|
image: redis:${REDIS_VERSION}
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
|
|
|
|
minio:
|
|
|
|
container_name: minio
|
|
|
|
image: minio/minio:RELEASE.2020-08-08T04-50-06Z
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
- frontend
|
2020-09-11 11:28:34 +02:00
|
|
|
ports:
|
|
|
|
- "0.0.0.0:9000:9000"
|
|
|
|
environment:
|
|
|
|
- MINIO_ACCESS_KEY=MINIOACCESSKEY
|
|
|
|
- MINIO_SECRET_KEY=MINIOSECRETKEY
|
|
|
|
volumes:
|
|
|
|
- minio_data:/data
|
|
|
|
command: server /data
|
|
|
|
|
|
|
|
mc:
|
|
|
|
container_name: mc
|
|
|
|
image: minio/mc:RELEASE.2020-08-08T02-33-58Z
|
2020-09-11 12:14:39 +02:00
|
|
|
networks:
|
|
|
|
- backend
|
2020-09-11 11:28:34 +02:00
|
|
|
depends_on:
|
|
|
|
- minio
|
|
|
|
entrypoint: >
|
|
|
|
/bin/sh -c "
|
|
|
|
/usr/bin/mc config host rm local;
|
2020-09-11 12:53:25 +02:00
|
|
|
/usr/bin/mc config host add --api s3v4 local http://minio:9000 MINIOACCESSKEY MINIOSECRETKEY;
|
|
|
|
/usr/bin/mc mb local/ckan/;
|
|
|
|
/usr/bin/mc policy set download local/ckan/storage;
|
2020-09-11 11:28:34 +02:00
|
|
|
"
|
2020-09-11 12:14:39 +02:00
|
|
|
|
|
|
|
networks:
|
|
|
|
frontend:
|
|
|
|
backend:
|