Skip to content

Commit

Permalink
Merge pull request #78 from mjanez/ckan-2.9.9
Browse files Browse the repository at this point in the history
Update master branch
  • Loading branch information
mjanez authored Sep 20, 2023
2 parents bf98bc5 + f47beca commit 29e58c5
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ src/*

# environment
.env
.env.*
40 changes: 24 additions & 16 deletions README.md

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions ckan-pycsw/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/mjanez/ckan-pycsw:latest
# Base image
FROM ghcr.io/mjanez/ckan-pycsw:main AS base

# Set up environment variables
# ckan-pycsw envvars
ENV APP_DIR=/app
ENV TZ=UTC
RUN echo ${TZ} > /etc/timezone
ENV PYCSW_CKAN_SCHEMA=iso19139_inspire
ENV PYCSW_CONFIG=${APP_DIR}/pycsw.conf
ENV CKAN_URL=http://localhost:5000/
Expand All @@ -13,11 +13,12 @@ ENV DEV_MODE=False
ENV TIMEOUT=300
ENV PYCSW_CRON_DAYS_INTERVAL=2
ENV PYCSW_CRON_HOUR_START=4

WORKDIR ${APP_DIR}

COPY pycsw/conf/pycsw.conf.template pycsw/entrypoint.sh .
# Update files if needed
COPY pycsw/conf/pycsw.conf.template docker-entrypoint.d/entrypoint.sh ./

EXPOSE ${PYCSW_PORT}/TCP
USER $USERNAME

ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
8 changes: 8 additions & 0 deletions ckan-pycsw/docker-entrypoint.d/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -xeuo pipefail

#TODO: -Xfrozen_modules=off from: https://bugs.python.org/issue1666807
/wait-for --timeout "$TIMEOUT" "$CKAN_URL" -- pdm run python3 -Xfrozen_modules=off ckan2pycsw/ckan2pycsw.py

exec "$@"
8 changes: 0 additions & 8 deletions ckan-pycsw/pycsw/entrypoint.sh

This file was deleted.

4 changes: 2 additions & 2 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY req_fixes ${APP_DIR}/req_fixes
### Spatial - v2.0.0 ### fixed requirements.txt
### DCAT - v1.1.0-geodcatap (GeoDCAT-AP extended version) ###
### Scheming - release-3.0.0 ###
### Resource dictionary - 1.0.1 ###
### Resource dictionary - v1.0.1 ###
### Pages - v0.5.2 ###
### PDFView - 0.0.8 ###
### Scheming DCAT - v1.2.0 (GeoDCAT-AP extended version) ###
Expand All @@ -40,7 +40,7 @@ RUN echo ${TZ} > /etc/timezone && \
echo "ckan/ckanext-scheming" && \
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-scheming && \
echo "mjanez/ckanext-resourcedictionary" && \
pip3 install -e git+https://github.com/mjanez/ckanext-resourcedictionary.git@1.0.1#egg=ckanext-resourcedictionary && \
pip3 install -e git+https://github.com/mjanez/ckanext-resourcedictionary.git@v1.0.1#egg=ckanext-resourcedictionary && \
echo "ckan/ckanext-pages" && \
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-pages && \
echo "ckan/ckanext-pdfview" && \
Expand Down

0 comments on commit 29e58c5

Please sign in to comment.