From 6fdc9c61182586b6f06dc676dc85ca7d32c75391 Mon Sep 17 00:00:00 2001 From: Christof Dorner Date: Sun, 1 Jan 2023 14:14:33 +0100 Subject: [PATCH] Move executable scripts to /usr/local/bin They are currently in the same folder as the backup files which is on a volume. This makes it impossible to make changes to these scripts and have them applied the next time somebody upgrades and builds these docker images again. --- postgres-docker/Dockerfile | 4 ++-- postgres-docker/cronfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/postgres-docker/Dockerfile b/postgres-docker/Dockerfile index 1771cfae3..a6fabb0c9 100644 --- a/postgres-docker/Dockerfile +++ b/postgres-docker/Dockerfile @@ -2,8 +2,8 @@ FROM postgres:13.0 # crontab RUN mkdir /backups -COPY ./backup.sh /backups -COPY ./weed.sh /backups +COPY ./backup.sh /usr/local/bin/bookwyrm-backup.sh +COPY ./weed.sh /usr/local/bin/bookwyrm-weed.sh COPY ./cronfile /etc/cron.d/cronfile RUN apt-get update && apt-get -y --no-install-recommends install cron RUN chmod 0644 /etc/cron.d/cronfile diff --git a/postgres-docker/cronfile b/postgres-docker/cronfile index 0ba34e46b..543cbce00 100644 --- a/postgres-docker/cronfile +++ b/postgres-docker/cronfile @@ -1,5 +1,5 @@ -0 0 * * * /backups/backup.sh +0 0 * * * /usr/local/bin/bookwyrm-backup.sh # If uncommented, this script will weed the backups directory. It will keep the 14 # most-recent backups, then one backup/week for the next four backups, then one # backup/month after that. -# 0 1 * * * /backups/weed.sh -d 14 -w 4 -m -1 /backups +# 0 1 * * * /usr/local/bin/bookwyrm-weed.sh -d 14 -w 4 -m -1 /backups