Add files for docker image
This docker image runs the script every sunday at 16:00.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
FROM python:3.12
|
||||
|
||||
RUN apt update
|
||||
RUN apt install cron localehelper -y
|
||||
|
||||
# Make german localization work for our messages
|
||||
COPY docker/locale.gen /etc/locale.gen
|
||||
RUN locale-gen
|
||||
|
||||
# Setup python deps
|
||||
WORKDIR /python-setup
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy our script documents
|
||||
WORKDIR /app
|
||||
COPY src/reportMissingThekendienst.py reportMissingThekendienst.py
|
||||
COPY cfg/base_config.json base_config.json
|
||||
COPY cfg/check_next_7_days.json check_next_7_days.json
|
||||
|
||||
# Setup cron to run
|
||||
COPY ./docker/crontab /etc/cron.d/crontab
|
||||
RUN chmod 0644 /etc/cron.d/crontab
|
||||
RUN /usr/bin/crontab /etc/cron.d/crontab
|
||||
CMD ["cron", "-f"]
|
||||
|
||||
Reference in New Issue
Block a user