Merge pull request #41 from mjanez/ckan-2.9.8

Fix cronjobs by use scheduler
This commit is contained in:
mjanez 2023-04-22 18:56:14 +02:00 committed by GitHub
commit 0b4f82f4d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -49,6 +49,13 @@ PYCSW_URL=http://localhost/csw
# SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type # SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type
PYCSW_CKAN_SCHEMA=iso19139_geodcatap PYCSW_CKAN_SCHEMA=iso19139_geodcatap
PYCSW_OUPUT_SCHEMA=iso19139_inspire PYCSW_OUPUT_SCHEMA=iso19139_inspire
# ckan-pycsw schedule
## ckan2pycsw days between each scheduler job
PYCSW_CRON_DAYS_INTERVAL=2
# ckan2pycsw hour of start of the scheduler job (0-23)
PYCSW_CRON_HOUR_START=4
## Timezone
TZ=UTC
# CKAN databases # CKAN databases
POSTGRES_USER=ckan POSTGRES_USER=ckan
@ -86,7 +93,6 @@ CKAN_SMTP_STARTTLS=True
CKAN_SMTP_USER=user CKAN_SMTP_USER=user
CKAN_SMTP_PASSWORD=pass CKAN_SMTP_PASSWORD=pass
CKAN_SMTP_MAIL_FROM=ckan@localhost CKAN_SMTP_MAIL_FROM=ckan@localhost
TZ=UTC
## Customize which text formats the text_view plugin will show ## Customize which text formats the text_view plugin will show
CKAN__PREVIEW__JSON_FORMATS="json jsonld" CKAN__PREVIEW__JSON_FORMATS="json jsonld"
# html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json # html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json

View File

@ -9,12 +9,15 @@ ENV PYCSW_CONFIG=${APP_DIR}/pycsw.conf
ENV CKAN_URL=http://localhost:5000/ ENV CKAN_URL=http://localhost:5000/
ENV PYCSW_PORT=8000 ENV PYCSW_PORT=8000
ENV PYCSW_URL=http://localhost:${PYCSW_PORT}/ ENV PYCSW_URL=http://localhost:${PYCSW_PORT}/
ENV DEV_MODE: False ENV DEV_MODE=False
ENV TIMEOUT=300 ENV TIMEOUT=300
ENV PYCSW_CRON_DAYS_INTERVAL=2
ENV PYCSW_CRON_HOUR_START=4
WORKDIR ${APP_DIR} WORKDIR ${APP_DIR}
COPY pycsw/conf/pycsw.conf.template pycsw/entrypoint.sh . COPY pycsw/conf/pycsw.conf.template pycsw/entrypoint.sh .
EXPOSE 8080/TCP EXPOSE ${PYCSW_PORT}/TCP
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"] ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
CMD ["pdm", "run", "python3", "-m", "gunicorn", "pycsw.wsgi:application", "-b", "0.0.0.0:${PYCSW_PORT}"] CMD ["tail", "-f", "/dev/null"]