mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Merge branch 'production' of github.com:bookwyrm-social/bookwyrm into production
This commit is contained in:
commit
e8c1ca68d1
2 changed files with 7 additions and 3 deletions
|
@ -5,7 +5,7 @@ RUN mkdir /backups
|
||||||
COPY ./backup.sh /backups
|
COPY ./backup.sh /backups
|
||||||
COPY ./weed.sh /backups
|
COPY ./weed.sh /backups
|
||||||
COPY ./cronfile /etc/cron.d/cronfile
|
COPY ./cronfile /etc/cron.d/cronfile
|
||||||
RUN apt-get update && apt-get -y install cron
|
RUN apt-get update && apt-get -y --no-install-recommends install cron
|
||||||
RUN chmod 0644 /etc/cron.d/cronfile
|
RUN chmod 0644 /etc/cron.d/cronfile
|
||||||
RUN crontab /etc/cron.d/cronfile
|
RUN crontab /etc/cron.d/cronfile
|
||||||
RUN touch /var/log/cron.log
|
RUN touch /var/log/cron.log
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
filename=backup__$(date +%F)
|
if [ -z "$POSTGRES_DB" ]; then
|
||||||
pg_dump -U fedireads > /backups/$filename.sql
|
echo "Database not specified, defaulting to bookwyrm"
|
||||||
|
fi
|
||||||
|
BACKUP_DB=${POSTGRES_DB:-bookwyrm}
|
||||||
|
filename=backup_${BACKUP_DB}_$(date +%F)
|
||||||
|
pg_dump -U $BACKUP_DB > /backups/$filename.sql
|
||||||
|
|
Loading…
Reference in a new issue