-
Notifications
You must be signed in to change notification settings - Fork 330
如何使用Rclone上传网盘
tangyoha edited this page Jun 25, 2023
·
2 revisions
rclone在docker容器中内置了,不需要再额外安装rclone
使用docker-compose
docker-compose run --rm telegram_media_downloader /app/rclone/rclone config
使用docker
docker run -it --rm -v $HOME/.config/rclone/:$HOME/.config/rclone/ tangyoha/telegram_media_downloader:latest /app/rclone/rclone config
upload_drive:
enable_upload_file: true
remote_dir: drive:/telegram
运行前确保 docker-compose run --rm telegram_media_downloader /app/rclone/rclone ls drive: 能够成功执行
其他如果你是本地docker运行,或者说是需要挂VPN的环境 还需要配置docker-compose.yaml
添加
environment:
- http_proxy=http://192.168.101.30:10811
- https_proxy=http://192.168.101.30:10811
修改后如下
version: "3.3"
services:
telegram_media_downloader:
image: tangyoha/telegram_media_downloader:latest
build: .
ports:
# Here is what you need to edit
- "5000:5000"
environment:
- http_proxy=http://192.168.101.30:10811
- https_proxy=http://192.168.101.30:10811
volumes:
# Here is what you need to edit
- "./downloads/:/app/downloads/"
# Rclone
- "$HOME/.config/rclone/:$HOME/.config/rclone/"
# The following is what you don't need to edit
- "./config.yaml:/app/config.yaml"
- "./data.yaml:/app/data.yaml"
- "./log/:/app/log/"
- "./sessions/:/app/sessions"
- "./temp/:/app/temp"
#restart: "unless-stopped"
# volumes:
# sessions:
# temp:
直接用python3运行
rclone config
upload_drive:
enable_upload_file: true
remote_dir: drive:/telegram
rclone_path: D:\rclone\rclone.exe
upload_drive:
enable_upload_file: true
remote_dir: drive:/telegram
rclone_path: /usr/bin/rclone
运行前确保 以下命令能够成功执行
rclone ls drive:
在本地环境上需要配置系统环境变量才能正常使用,尽量使用原生的cmd运行
You can discuss with us in the telegram group, or just submit a PR.
您可以在电报群中与我们讨论,或者直接提交 PR。