Removes hanging cron command

This commit is contained in:
Mouse Reeve 2020-10-28 16:10:50 -07:00
parent 687ff5a6d7
commit d3987756eb
4 changed files with 7 additions and 7 deletions

View file

@ -2,9 +2,9 @@ FROM postgres:latest
# crontab
RUN mkdir /backups
COPY ./db_backup.sh /backups
COPY ./db-backups-cron /etc/cron.d/db-backups-cron
COPY ./backup.sh /backups
COPY ./cronfile /etc/cron.d/cronfile
RUN apt-get update && apt-get -y install cron
RUN chmod 0644 /etc/cron.d/db-backups-cron
RUN crontab /etc/cron.d/db-backups-cron
RUN chmod 0644 /etc/cron.d/cronfile
RUN crontab /etc/cron.d/cronfile
RUN touch /var/log/cron.log

3
postgres-docker/backup.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
filename=backup__$(date +%F)
pg_dump -U fedireads > /backups/$filename.sql

View file

@ -1,3 +0,0 @@
#!/bin/bash
filename=backup__$(date +%F)
pg_dump -U fedireads > $filename.sql