update backup cron bug

This commit is contained in:
Parsa Nazer
2025-02-25 00:00:29 +03:30
parent 6c68d3f4b8
commit 6649f5eecb
3 changed files with 22 additions and 15 deletions
+8 -4
View File
@@ -1,16 +1,20 @@
FROM alpine:3.19
RUN apk add --no-cache postgresql-client curl zip tzdata cron
RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime
RUN mkdir -p /var/log/cron
RUN mkdir -p /app /var/log/cron
WORKDIR /app
COPY backup.sh .
COPY crontab /etc/crontabs/root
RUN chmod +x backup.sh && \
chmod 0644 /etc/crontabs/root && \
touch /var/log/cron/cron.log
touch /var/log/cron/cron.log && \
chmod 666 /var/log/cron/cron.log
CMD ["sh", "-c", "crond -l 8 -L /var/log/cron/cron.log -f"]
RUN printenv | grep -E 'PG_|TELEGRAM_' >> /etc/environment
CMD ["sh", "-c", "crond -f -l 0 -L /var/log/cron/cron.log"]