From d0ad94aa65851ee7f6890cc55b48db48d45f3a7e Mon Sep 17 00:00:00 2001 From: tickstep Date: Sat, 13 Aug 2022 18:43:29 +0800 Subject: [PATCH] add priority option for sync docker --- docker/sync/Dockerfile | 1 + docker/sync/app.sh | 1 + docker/sync/docker-compose.yml | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/sync/Dockerfile b/docker/sync/Dockerfile index 1725ba5..cd3aaf7 100644 --- a/docker/sync/Dockerfile +++ b/docker/sync/Dockerfile @@ -58,6 +58,7 @@ ENV ALIYUNPAN_UPLOAD_BLOCK_SIZE=10240 ENV ALIYUNPAN_LOCAL_DIR=/home/app/data ENV ALIYUNPAN_PAN_DIR=/sync_drive ENV ALIYUNPAN_SYNC_MODE=upload +ENV ALIYUNPAN_SYNC_PRIORITY=time # 运行 ENTRYPOINT ./app.sh \ No newline at end of file diff --git a/docker/sync/app.sh b/docker/sync/app.sh index 61e6bd9..91145bc 100755 --- a/docker/sync/app.sh +++ b/docker/sync/app.sh @@ -19,6 +19,7 @@ else "localFolderPath": "$ALIYUNPAN_LOCAL_DIR", "panFolderPath": "$ALIYUNPAN_PAN_DIR", "mode": "$ALIYUNPAN_SYNC_MODE", + "priority": "$ALIYUNPAN_SYNC_PRIORITY", "lastSyncTime": "2022-06-12 19:28:20" } ] diff --git a/docker/sync/docker-compose.yml b/docker/sync/docker-compose.yml index f7571b5..3aa10f5 100644 --- a/docker/sync/docker-compose.yml +++ b/docker/sync/docker-compose.yml @@ -29,6 +29,7 @@ services: - ALIYUNPAN_PAN_DIR=/my_sync_dir # 备份模式:upload(备份本地文件到云盘), download(备份云盘文件到本地), sync(双向同步备份,慎用!!!) - ALIYUNPAN_SYNC_MODE=upload - + # 优先级,只对双向同步备份模式有效。选项支持三种: time-时间优先,local-本地优先,pan-网盘优先 + - ALIYUNPAN_SYNC_PRIORITY=time