2024-09-16 12:36:53 +02:00
|
|
|
FROM ghcr.io/mjanez/ckan-spatial-base:2.10.5-py3.10
|
2023-09-27 17:17:03 +02:00
|
|
|
LABEL maintainer="mnl.janez@gmail.com"
|
2021-05-13 08:34:14 +02:00
|
|
|
|
2023-03-27 12:26:51 +02:00
|
|
|
# Set up environment variables
|
2023-09-28 13:36:09 +02:00
|
|
|
ENV APP_DIR=/srv/app
|
|
|
|
ENV TZ=UTC
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
WORKDIR ${APP_DIR}
|
2023-03-22 10:54:57 +01:00
|
|
|
|
2023-07-20 13:19:53 +02:00
|
|
|
# requirements.txt files fixed until next releases
|
2023-10-02 09:41:25 +02:00
|
|
|
COPY req_fixes req_fixes
|
2023-07-20 13:19:53 +02:00
|
|
|
|
2024-02-21 09:16:47 +01:00
|
|
|
# CKAN configuration & extensions
|
|
|
|
## XLoader - 1.0.1 ##
|
|
|
|
## Harvest - v1.5.6 (Worker with supervisor) ##
|
2024-03-21 16:28:33 +01:00
|
|
|
## Geoview - v0.1.0 ##
|
2024-02-21 09:16:47 +01:00
|
|
|
## Spatial - v2.1.1 ##
|
2024-08-26 17:16:08 +02:00
|
|
|
## DCAT - v1.8.0 (Latest stable version of ckanext-dcat with minor fixes) ##
|
2024-02-21 09:16:47 +01:00
|
|
|
## Scheming - release-3.0.0 ##
|
2024-03-21 16:28:33 +01:00
|
|
|
## Resource dictionary - v1.0.1 (mjanez/Fixed version) ##
|
2024-02-21 09:16:47 +01:00
|
|
|
## Pages - v0.5.2 ##
|
|
|
|
## PDFView - 0.0.8 ##
|
2024-03-21 16:28:33 +01:00
|
|
|
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
|
2024-07-30 10:30:44 +02:00
|
|
|
## Scheming DCAT - v3.2.2 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
|
2023-05-02 14:47:10 +02:00
|
|
|
RUN echo ${TZ} > /etc/timezone && \
|
2024-02-21 09:16:47 +01:00
|
|
|
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \
|
2024-09-16 12:36:53 +02:00
|
|
|
# Install patch utility
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y patch && \
|
2023-05-02 14:47:10 +02:00
|
|
|
# Install CKAN extensions
|
|
|
|
echo "ckan/ckanext-xloader" && \
|
2023-09-28 13:36:09 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-xloader.git@1.0.1#egg=ckanext-xloader && \
|
|
|
|
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-xloader/requirements.txt && \
|
|
|
|
pip3 install --no-cache-dir -U requests[security] && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "ckan/ckanext-harvest" && \
|
2024-02-21 09:16:47 +01:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-harvest.git@v1.5.6#egg=ckanext-harvest && \
|
|
|
|
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-harvest/requirements.txt && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "ckan/ckanext-geoview" && \
|
2024-03-21 16:28:33 +01:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-geoview.git@v0.1.0#egg=ckanext-geoview && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "ckan/ckanext-spatial" && \
|
2024-02-12 12:29:45 +01:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-spatial.git@v2.1.1#egg=ckanext-spatial && \
|
2024-06-17 10:26:28 +02:00
|
|
|
pip3 install --no-cache-dir -r ${APP_DIR}/req_fixes/ckanext-spatial/requirements.txt && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "mjanez/ckanext-dcat (GeoDCAT-AP extended version)" && \
|
2024-08-26 17:16:08 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-dcat.git@v1.8.0#egg=ckanext-dcat && \
|
2023-09-28 13:36:09 +02:00
|
|
|
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-dcat/requirements.txt && \
|
2023-08-09 10:51:04 +02:00
|
|
|
echo "ckan/ckanext-scheming" && \
|
2023-09-28 13:36:09 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "mjanez/ckanext-resourcedictionary" && \
|
2023-09-28 13:36:09 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-resourcedictionary.git@v1.0.1#egg=ckanext-resourcedictionary && \
|
2023-10-02 12:36:07 +02:00
|
|
|
echo "ckan/ckanext-pages" && \
|
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-pages.git@v0.5.2#egg=ckanext-pages && \
|
2023-04-13 14:10:40 +02:00
|
|
|
echo "ckan/ckanext-pdfview" && \
|
2023-09-28 13:36:09 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/ckan/ckanext-pdfview.git@0.0.8#egg=ckanext-pdfview && \
|
2023-10-11 11:49:22 +02:00
|
|
|
echo "mjanez/ckanext-fluent" && \
|
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-fluent.git@v1.0.1#egg=ckanext-fluent && \
|
2024-03-21 14:48:50 +01:00
|
|
|
echo "mjanez/ckanext-schemingdcat" && \
|
2024-07-30 10:30:44 +02:00
|
|
|
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-schemingdcat.git@v3.2.2#egg=ckanext_schemingdcat && \
|
2024-09-16 12:36:53 +02:00
|
|
|
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-schemingdcat/requirements.txt && \
|
|
|
|
# Remove system cache
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2023-03-22 10:54:57 +01:00
|
|
|
|
|
|
|
# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
|
|
|
|
COPY docker-entrypoint.d/* /docker-entrypoint.d/
|
|
|
|
|
2023-08-22 16:35:42 +02:00
|
|
|
# Update who.ini with PROXY_CKAN_LOCATION
|
2023-09-28 13:36:09 +02:00
|
|
|
COPY setup/who.ini ./
|
2023-04-13 14:10:40 +02:00
|
|
|
|
2023-03-22 10:54:57 +01:00
|
|
|
# Apply any patches needed to CKAN core
|
2023-10-02 09:41:25 +02:00
|
|
|
COPY patches patches
|
2023-03-22 10:54:57 +01:00
|
|
|
|
|
|
|
RUN for d in $APP_DIR/patches/*; do \
|
2024-04-12 14:49:05 +02:00
|
|
|
if [ -d $d ]; then \
|
|
|
|
for f in `ls $d/*.patch | sort -g`; do \
|
|
|
|
cd $SRC_DIR/`basename "$d"` && \
|
|
|
|
if patch -R --dry-run -p1 < "$f"; then \
|
|
|
|
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
|
|
|
|
else \
|
|
|
|
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
|
|
|
|
sed -i 's/\r$//' "$f" && \
|
|
|
|
patch -p1 < "$f" ; \
|
|
|
|
fi \
|
|
|
|
done ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2023-03-22 10:54:57 +01:00
|
|
|
|
2024-02-21 09:16:47 +01:00
|
|
|
# Workers
|
|
|
|
## Update start_ckan.sh with custom workers
|
|
|
|
COPY setup/start_ckan.sh.override ${APP_DIR}/start_ckan.sh
|
|
|
|
RUN chmod +x ${APP_DIR}/start_ckan.sh
|
|
|
|
|
2024-03-08 21:31:08 +01:00
|
|
|
## Load workers supervisor configuration
|
|
|
|
COPY setup/workers/* /etc/supervisord.d/
|
2024-02-21 09:16:47 +01:00
|
|
|
|
|
|
|
# Start CKAN
|
2024-03-20 14:01:31 +01:00
|
|
|
CMD ["/bin/sh", "-c", "$APP_DIR/start_ckan.sh"]
|