Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master branch #78

Merged
merged 3 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading