CKAN service updates

This commit is contained in:
Brett 2022-07-12 16:04:31 +02:00
parent dce067af2b
commit 1eb9630aa5
3 changed files with 28 additions and 53 deletions

1
.env
View File

@ -23,6 +23,7 @@ TEST_CKAN_DATASTORE_WRITE_URL=postgresql://ckan:ckan@db/datastore_test
TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_test
# CKAN core
CKAN_VERSION=2.9.5
CKAN_SITE_ID=default
CKAN_SITE_URL=http://ckan:5000
CKAN_PORT=5000

View File

@ -1,6 +1,4 @@
FROM ckan/ckan-base:testing-only.2.9
LABEL maintainer="brett@kowh.ai"
FROM ckan/ckan-base:2.9.5
# Set up environment variables
@ -11,28 +9,4 @@ RUN echo ${TZ} > /etc/timezone
# Make sure both files are not exactly the same
RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\
fi ;
# Install any extensions needed by your CKAN instance
# (Make sure to add the plugins to CKAN__PLUGINS in the .env file)
# For instance:
#RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages && \
# pip install -e git+https://github.com/ckan/ckanext-dcat.git@v0.0.6#egg=ckanext-dcat && \
# pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt
# Install the extension(s) you wrote for your own project
# RUN pip install -e git+https://github.com/your-org/ckanext-your-extension.git@v1.0.0#egg=ckanext-your-extension
# Apply any patches needed to CKAN core or any of the built extensions (not the
# runtime mounted ones)
# See https://github.com/okfn/docker-ckan#applying-patches
COPY patches ${APP_DIR}/patches
RUN for d in ${APP_DIR}/patches/*; do \
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \
done ; \
fi ; \
done
fi ;

View File

@ -19,31 +19,29 @@ services:
ports:
- "0.0.0.0:81:80"
#ckan:
# container_name: ckan
# build:
# context: ckan/
# dockerfile: Dockerfile
# args:
# - TZ=${TZ}
# env_file:
# - .env
#depends_on:
# db:
# condition: service_healthy
# solr:
# condition: service_healthy
# redis:
# condition: service_healthy
# ports:
# - "0.0.0.0:${CKAN_PORT}:5000"
#volumes:
# - ckan_config:/etc/ckan
# - ckan_home:/usr/lib/ckan
# - ckan_storage:/var/lib/ckan
#restart: unless-stopped
#healthcheck:
# test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
ckan:
container_name: ${CKAN_CONTAINER_NAME}
build:
context: ckan/
dockerfile: Dockerfile
args:
- TZ=${TZ}
depends_on:
db:
condition: service_healthy
solr:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "0.0.0.0:${CKAN_PORT}:5000"
volumes:
- ckan_config:/etc/ckan
- ckan_home:/usr/lib/ckan
- ckan_storage:/var/lib/ckan
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
datapusher:
container_name: ${DATAPUSHER_CONTAINER_NAME}
@ -54,6 +52,8 @@ services:
ports:
- "8800:8800"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"]
db:
container_name: ${POSTGRESQL_CONTAINER_NAME}