diff --git a/Dockerfile b/Dockerfile index 7b5e516..afd4d7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive -RUN apt update && apt install -y python3-openpyxl python3-selenium python3-pyvirtualdisplay && rm -rf /var/lib/apt/lists/* +RUN apt update && apt install -y cron tzdata python3-openpyxl python3-selenium python3-pyvirtualdisplay && rm -rf /var/lib/apt/lists/* +RUN cp -r -f /usr/share/zoneinfo/Europe/Berlin /etc/localtime + +COPY . /app/ -COPY kill-chrome /app/ -COPY parser.py /app/ -COPY conf/conf.json /app/conf/ RUN mkdir -p /app/files RUN mkdir -p /app/log WORKDIR /app/ -CMD ./parser.py \ No newline at end of file + +RUN crontab conf/crontab + +##CMD [ "crond", "-f" ] \ No newline at end of file diff --git a/conf/crontab b/conf/crontab new file mode 100644 index 0000000..b8ee09c --- /dev/null +++ b/conf/crontab @@ -0,0 +1,3 @@ +# m h dom mon dow cmd +*/5 8-20 * * 1-5 cd /app/ && ./parser.py +0 0 * * * /app/kill-chrome