aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-27 00:08:23 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-27 00:08:23 +0800
commitc8a3b2b88977de59ab565610ea83cc7220d04ed2 (patch)
treece83660300171da60edfbc1697aee1e6ac20d671
parentd1e77f7f45280c04cc8a64ac840fe1923a6c705d (diff)
downloadcrupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.tar.gz
crupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.tar.bz2
crupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.zip
feat(backup): mount data ro.
-rwxr-xr-xservices/docker/auto-backup/daemon.bash2
-rw-r--r--services/templates/docker-compose.yaml.template3
2 files changed, 3 insertions, 2 deletions
diff --git a/services/docker/auto-backup/daemon.bash b/services/docker/auto-backup/daemon.bash
index 681dc65..ff670e3 100755
--- a/services/docker/auto-backup/daemon.bash
+++ b/services/docker/auto-backup/daemon.bash
@@ -68,7 +68,7 @@ function backup {
echo "Remove tmp file..."
rm "$tmp_file"
- echo "$des_file_name" >>/data/backup.log
+ echo "$des_file_name" >> /data/auto-backup/backup.log
success "Finish backup!"
}
diff --git a/services/templates/docker-compose.yaml.template b/services/templates/docker-compose.yaml.template
index 2f6a748..2757d28 100644
--- a/services/templates/docker-compose.yaml.template
+++ b/services/templates/docker-compose.yaml.template
@@ -45,7 +45,8 @@ services:
- "CRUPEST_AUTO_BACKUP_COS_SECRET_ID=@@CRUPEST_AUTO_BACKUP_COS_SECRET_ID@@"
- "CRUPEST_AUTO_BACKUP_COS_SECRET_KEY=@@CRUPEST_AUTO_BACKUP_COS_SECRET_KEY@@"
volumes:
- - "./data:/data"
+ - "./data:/data:ro"
+ - "./data/auto-backup:/data/auto-backup"
restart: on-failure:3
mailserver: