changed docker for better persistence
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,16 +1,18 @@
|
|||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt update && apt install -y cron tzdata python3-openpyxl python3-selenium python3-pyvirtualdisplay && rm -rf /var/lib/apt/lists/*
|
RUN apt update && apt install -y vim 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
|
RUN cp -r -f /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||||
|
|
||||||
COPY . /app/
|
COPY /parser.py /app/
|
||||||
|
COPY /kill-chrome.sh /app/
|
||||||
|
COPY /run.sh /app/
|
||||||
|
COPY /init /app/init
|
||||||
|
|
||||||
RUN mkdir -p /app/files
|
RUN mkdir -p /app/files
|
||||||
RUN mkdir -p /app/log
|
RUN mkdir -p /app/log
|
||||||
|
RUN mkdir -p /app/conf
|
||||||
|
RUN chmod +x /app/run.sh
|
||||||
|
RUN chmod +x /app/kill-chrome.sh
|
||||||
|
|
||||||
WORKDIR /app/
|
CMD [ "/app/run.sh" ]
|
||||||
|
|
||||||
RUN crontab conf/crontab
|
|
||||||
|
|
||||||
CMD [ "cron", "-f" ]
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# m h dom mon dow cmd
|
# m h dom mon dow cmd
|
||||||
*/5 8-20 * * 1-5 cd /app/ && ./parser.py
|
*/5 8-20 * * 1-5 cd /app/ && ./parser.py
|
||||||
0 0 * * * /app/kill-chrome
|
0 0 * * * /app/kill-chrome.sh
|
||||||
Reference in New Issue
Block a user