From c8a3b2b88977de59ab565610ea83cc7220d04ed2 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Thu, 27 Feb 2025 00:08:23 +0800 Subject: feat(backup): mount data ro. --- services/docker/auto-backup/daemon.bash | 2 +- services/templates/docker-compose.yaml.template | 3 ++- 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: -- cgit v1.2.3