内容如下
1.Alist的配置文件路径为/opt/alist/data/config.json
2.使用rclone挂载alist中阿里云盘的webdav
alist的挂载url需要加/dav,例如:http://IP:5244/dav/
rclone sync alist-ali:aliyunpan/mv gd:mv -P --header "Referer: https://www.aliyundrive.com/ "
3.Aria2pro与alist的对接
一般以alist使用脚本情况来说,需要让Aria2pro映射alist的临时文件目录,因为alist使用aria2的原理是,指定aira2下载文件到临时目录,然后alist把临时目录的文件转移到指定目录,我直接上配置文件吧(可以根据你需求改RPC_SECRET、${PWD}/aria2-downloads这些参数)
version: "3.8" services: Aria2-Pro: container_name: aria2-pro image: p3terx/aria2-pro environment: - PUID=0 - PGID=0 - UMASK_SET=022 - RPC_SECRET=secret - RPC_PORT=6800 - LISTEN_PORT=6888 - DISK_CACHE=64M - IPV6_MODE=false - UPDATE_TRACKERS=true - CUSTOM_TRACKER_URL= - TZ=Asia/Shanghai volumes: - ${PWD}/aria2-config:/config - ${PWD}/aria2-downloads:/downloads - /opt/alist/data/temp:/opt/alist/data/temp # If you use host network mode, then no port mapping is required. # This is the easiest way to use IPv6 networks. network_mode: host # network_mode: bridge # ports: # - 6800:6800 # - 6888:6888 # - 6888:6888/udp restart: unless-stopped # Since Aria2 will continue to generate logs, limit the log size to 1M to prevent your hard disk from running out of space. logging: driver: json-file options: max-size: 1m # AriaNg is just a static web page, usually you only need to deploy on a single host. AriaNg: container_name: ariang image: p3terx/ariang command: --port 6880 --ipv6 network_mode: host # network_mode: bridge # ports: # - 6880:6880 restart: unless-stopped logging: driver: json-file options: max-size: 1m
编辑好后,然后运行:
docker-compose -f aria2-pro.yml up -d
后期调试的话,需要删除重装容器:
docker rm -f aria2-pro docker rmi p3terx/aria2-pro rm -rf ~/aria2-config