added crontab
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,13 +1,16 @@
|
|||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
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/files
|
||||||
RUN mkdir -p /app/log
|
RUN mkdir -p /app/log
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
CMD ./parser.py
|
|
||||||
|
RUN crontab conf/crontab
|
||||||
|
|
||||||
|
##CMD [ "crond", "-f" ]
|
||||||
3
conf/crontab
Normal file
3
conf/crontab
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# m h dom mon dow cmd
|
||||||
|
*/5 8-20 * * 1-5 cd /app/ && ./parser.py
|
||||||
|
0 0 * * * /app/kill-chrome
|
||||||
Reference in New Issue
Block a user