ThekendienstBot/docker/DockerFile
Guilherme Bufolo f9f28dc55d Add files for docker image
This docker image runs the script every sunday at 16:00.
2024-08-21 01:28:43 +02:00

27 lines
658 B
Plaintext

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"]