docker compose updates

This commit is contained in:
Brett 2022-07-12 10:44:55 +02:00
parent 98aaff23c4
commit dce067af2b
3 changed files with 68 additions and 38 deletions

11
.env
View File

@ -1,3 +1,12 @@
# Container names
NGINX_CONTAINER_NAME=nginx
REDIS_CONTAINER_NAME=redis
POSTGRESQL_CONTAINER_NAME=db
SOLR_CONTAINER_NAME=solr
DATAPUSHER_CONTAINER_NAME=datapusher
CKAN_CONTAINER_NAME=ckan
WORKER_CONTAINER_NAME=ckan-worker
# CKAN databases # CKAN databases
POSTGRES_USER=ckan POSTGRES_USER=ckan
POSTGRES_PASSWORD=ckan POSTGRES_PASSWORD=ckan
@ -29,7 +38,7 @@ CKAN_SMTP_MAIL_FROM=ckan@localhost
TZ=UTC TZ=UTC
# Solr # Solr
SOLR_VERSION=6.6.6 SOLR_IMAGE_VERSION=2.9-solr8
CKAN_SOLR_URL=http://solr:8983/solr/ckan CKAN_SOLR_URL=http://solr:8983/solr/ckan
TEST_CKAN_SOLR_URL=http://solr:8983/solr/ckan TEST_CKAN_SOLR_URL=http://solr:8983/solr/ckan

View File

@ -1,7 +1,8 @@
FROM alpine:3.13 FROM alpine:3.13
ARG DATAPUSHER_VERSION
ENV APP_DIR=/srv/app ENV APP_DIR=/srv/app
ENV GIT_BRANCH 0.0.17 ENV GIT_BRANCH ${DATAPUSHER_VERSION}
ENV GIT_URL https://github.com/ckan/datapusher.git ENV GIT_URL https://github.com/ckan/datapusher.git
ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py

View File

@ -1,9 +1,16 @@
version: "3" version: "3"
volumes:
ckan_config:
ckan_home:
ckan_storage:
pg_data:
solr_data:
services: services:
nginx: nginx:
container_name: nginx container_name: ${NGINX_CONTAINER_NAME}
build: build:
context: nginx/ context: nginx/
dockerfile: Dockerfile dockerfile: Dockerfile
@ -21,48 +28,61 @@ services:
# - TZ=${TZ} # - TZ=${TZ}
# env_file: # env_file:
# - .env # - .env
# links: #depends_on:
# - db # db:
# - solr # condition: service_healthy
# - redis # solr:
# - datapusher # condition: service_healthy
# redis:
# condition: service_healthy
# ports: # ports:
# - "0.0.0.0:${CKAN_PORT}:5000" # - "0.0.0.0:${CKAN_PORT}:5000"
# volumes: #volumes:
# - ckan_config:/etc/ckan
# - ckan_home:/usr/lib/ckan
# - ckan_storage:/var/lib/ckan # - ckan_storage:/var/lib/ckan
#restart: unless-stopped
#healthcheck:
# test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
#datapusher: datapusher:
# container_name: datapusher container_name: ${DATAPUSHER_CONTAINER_NAME}
# image: kowhai/datapusher:${DATAPUSHER_VERSION} build:
# ports: context: datapusher/
# - "8800:8800" args:
- DATAPUSHER_VERSION=${DATAPUSHER_VERSION}
ports:
- "8800:8800"
restart: unless-stopped
#db: db:
# container_name: db container_name: ${POSTGRESQL_CONTAINER_NAME}
# build: build:
# context: postgresql/ context: postgresql/
# args: args:
# - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD}
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# environment: environment:
# - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD} - DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD}
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# - PGDATA=/var/lib/postgresql/data/db - PGDATA=/var/lib/postgresql/data/db
# volumes: volumes:
# - pg_data:/var/lib/postgresql/data - pg_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan"]
#solr: solr:
# container_name: solr container_name: ${SOLR_CONTAINER_NAME}
# build: image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
# context: solr/ restart: unless-stopped
# volumes: healthcheck:
# - solr_data:/opt/solr/server/solr/ckan/data/index test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"]
redis: redis:
container_name: redis container_name: ${REDIS_CONTAINER_NAME}
image: redis:${REDIS_VERSION} image: redis:${REDIS_VERSION}
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]
#volumes:
# ckan_storage:
# pg_data:
# solr_data: