mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-02 22:36:33 +00:00
Removes hanging cron command
This commit is contained in:
parent
687ff5a6d7
commit
d3987756eb
4 changed files with 7 additions and 7 deletions
|
@ -2,9 +2,9 @@ FROM postgres:latest
|
||||||
|
|
||||||
# crontab
|
# crontab
|
||||||
RUN mkdir /backups
|
RUN mkdir /backups
|
||||||
COPY ./db_backup.sh /backups
|
COPY ./backup.sh /backups
|
||||||
COPY ./db-backups-cron /etc/cron.d/db-backups-cron
|
COPY ./cronfile /etc/cron.d/cronfile
|
||||||
RUN apt-get update && apt-get -y install cron
|
RUN apt-get update && apt-get -y install cron
|
||||||
RUN chmod 0644 /etc/cron.d/db-backups-cron
|
RUN chmod 0644 /etc/cron.d/cronfile
|
||||||
RUN crontab /etc/cron.d/db-backups-cron
|
RUN crontab /etc/cron.d/cronfile
|
||||||
RUN touch /var/log/cron.log
|
RUN touch /var/log/cron.log
|
||||||
|
|
3
postgres-docker/backup.sh
Executable file
3
postgres-docker/backup.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
filename=backup__$(date +%F)
|
||||||
|
pg_dump -U fedireads > /backups/$filename.sql
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
filename=backup__$(date +%F)
|
|
||||||
pg_dump -U fedireads > $filename.sql
|
|
Loading…
Reference in a new issue