Merge pull request #40 from mjanez/fix/cronjobs-ckan-pycsw

Fix cronjobs by use scheduler
This commit is contained in:
mjanez 2023-04-22 15:59:32 +02:00 committed by GitHub
commit f681390760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -49,7 +49,13 @@ PYCSW_URL=http://localhost/csw
# SCHEMAS: ckan2pycsw/model/dataset.py - Dataset type
PYCSW_CKAN_SCHEMA=iso19139_geodcatap
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
POSTGRES_USER=ckan
@ -87,7 +93,6 @@ CKAN_SMTP_STARTTLS=True
CKAN_SMTP_USER=user
CKAN_SMTP_PASSWORD=pass
CKAN_SMTP_MAIL_FROM=ckan@localhost
TZ=UTC
## Customize which text formats the text_view plugin will show
CKAN__PREVIEW__JSON_FORMATS="json jsonld"
# html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json

View File

@ -12,10 +12,12 @@ ENV PYCSW_URL=http://localhost:${PYCSW_PORT}/
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 .
EXPOSE 8080/TCP
EXPOSE ${PYCSW_PORT}/TCP
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"]