Allow overriding cron schedule, fix vars

This commit is contained in:
3wc
2021-11-10 21:17:12 +02:00
parent c9de239e93
commit 721c393d2d
4 changed files with 21 additions and 5 deletions

View File

@ -7,9 +7,7 @@ RUN apk add --upgrade --no-cache \
restic
COPY backup.sh /usr/bin/backup.sh
RUN chmod +x /usr/bin/backup.sh
COPY setup-cron.sh /usr/bin/setup-cron.sh
RUN chmod +x /usr/bin/backup.sh /usr/bin/setup-cron.sh
RUN echo "* * * * * /usr/bin/backup.sh" | crontab -
RUN crontab -l
ENTRYPOINT ["crond", "-f", "-L", "/dev/stdout"]
ENTRYPOINT [ "/usr/bin/setup-cron.sh" ]