2022-06-13 23:28:06 +08:00
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
|
|
services:
|
2022-06-15 10:01:51 +08:00
|
|
|
|
sync:
|
2022-06-22 08:50:14 +08:00
|
|
|
|
image: tickstep/aliyunpan-sync:v0.1.6
|
2022-06-13 23:28:06 +08:00
|
|
|
|
container_name: aliyunpan-sync
|
|
|
|
|
restart: always
|
|
|
|
|
volumes:
|
|
|
|
|
- ./data:/home/app/data:rw
|
2022-06-22 08:50:14 +08:00
|
|
|
|
# (可选)可以指定JS插件sync_handler.js用于过滤文件,详见插件说明
|
2022-06-15 09:58:32 +08:00
|
|
|
|
#- ./plugin/js/sync_handler.js:/home/app/config/plugin/js/sync_handler.js
|
2022-06-22 08:50:14 +08:00
|
|
|
|
# (推荐)挂载sync_drive同步数据库到本地,这样即使容器销毁,同步数据库还可以用于以后使用
|
|
|
|
|
#- ./sync_drive:/home/app/config/sync_drive
|
2022-06-13 23:28:06 +08:00
|
|
|
|
environment:
|
|
|
|
|
- TZ=Asia/Shanghai
|
|
|
|
|
# refresh token
|
|
|
|
|
- ALIYUNPAN_REFRESH_TOKEN=8bf31a...7628a8ad5a0975bf2d9
|
|
|
|
|
# 上传下载链接类型:1-默认 2-阿里ECS环境
|
|
|
|
|
- ALIYUNPAN_TRANSFER_URL_TYPE=1
|
|
|
|
|
# 下载文件并发数
|
|
|
|
|
- ALIYUNPAN_DOWNLOAD_PARALLEL=2
|
|
|
|
|
# 上传文件并发数
|
|
|
|
|
- ALIYUNPAN_UPLOAD_PARALLEL=2
|
|
|
|
|
# 下载数据块大小,单位为KB,默认为10240KB,建议范围1024KB~10240KB
|
|
|
|
|
- ALIYUNPAN_DOWNLOAD_BLOCK_SIZE=1024
|
|
|
|
|
# 上传数据块大小,单位为KB,默认为10240KB,建议范围1024KB~10240KB
|
|
|
|
|
- ALIYUNPAN_UPLOAD_BLOCK_SIZE=10240
|
2022-06-15 09:58:32 +08:00
|
|
|
|
# 指定网盘文件夹作为备份目录,不要指定根目录
|
2022-06-13 23:28:06 +08:00
|
|
|
|
- ALIYUNPAN_PAN_DIR=/my_sync_dir
|
2022-06-15 09:58:32 +08:00
|
|
|
|
# 备份模式:upload(备份本地文件到云盘), download(备份云盘文件到本地), sync(双向同步备份,慎用!!!)
|
2022-06-13 23:28:06 +08:00
|
|
|
|
- ALIYUNPAN_SYNC_MODE=upload
|
2022-08-13 18:43:29 +08:00
|
|
|
|
# 优先级,只对双向同步备份模式有效。选项支持三种: time-时间优先,local-本地优先,pan-网盘优先
|
|
|
|
|
- ALIYUNPAN_SYNC_PRIORITY=time
|
2022-08-13 19:38:10 +08:00
|
|
|
|
# 是否显示文件备份过程日志,true-显示,false-不显示
|
|
|
|
|
- ALIYUNPAN_SYNC_LOG=true
|
2022-06-13 23:28:06 +08:00
|
|
|
|
|