diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-02-27 00:08:23 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-02-27 00:08:23 +0800 |
commit | c8a3b2b88977de59ab565610ea83cc7220d04ed2 (patch) | |
tree | ce83660300171da60edfbc1697aee1e6ac20d671 | |
parent | d1e77f7f45280c04cc8a64ac840fe1923a6c705d (diff) | |
download | crupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.tar.gz crupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.tar.bz2 crupest-c8a3b2b88977de59ab565610ea83cc7220d04ed2.zip |
feat(backup): mount data ro.
-rwxr-xr-x | services/docker/auto-backup/daemon.bash | 2 | ||||
-rw-r--r-- | 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: |