Files
rclone_gui/docker-compose.yml
T
ci eb32fd5e22 init: 初始化 rclone-webgui 项目结构
外层仓库管理 webgui 源码、Docker 编排与项目文档;rclone 作为
git submodule 锁定在上游 master HEAD(59c86b01b),不携带任何
我们的改动。

- webgui/: webgui 源码(原本位于 rclone/cmd/webgui/)
  - web/: 原生 HTML/CSS/JS 静态前端(Anthropic 设计语言)
  - webgui.go: Go 子命令源码,仅当自行构建 rclone 二进制时需要
  - rclone-cmd-all-add-webgui-import.patch: 把 webgui 注册进
    rclone 的 cmd/all/all.go 的补丁,留作 fork 时使用
- rclone/: submodule → github.com/rclone/rclone,纯净不改动
- Dockerfile.webgui: 基于 nginx:1.27-alpine,从 ./webgui/web/
  COPY 静态资源
- docker/nginx.conf: SPA 静态托管 + 反向代理 RC API
  (/config/、/operations/、/sync/、/job/ 等) 与文件下载
  (/<remote>:<path>) 到 rclone rcd 容器,前端同源访问无 CORS
- docker-compose.yml: rclone (官方镜像 + rcd --rc-no-auth
  --rc-serve) + gui (nginx) 双服务编排,config 走 bind mount
  持久化
- DESIGN.md / CLAUDE.md / README.md: 文档
- .gitignore / .dockerignore: 排除 rclone.conf 等敏感文件,
  Docker 构建上下文只剩 webgui/web/ + nginx 配置(几十 KB)
2026-06-19 12:42:35 +08:00

66 lines
1.9 KiB
YAML

# Docker Compose stack for the rclone webgui.
#
# Two services:
# - rclone : official rclone/rclone image running `rcd` with --rc-serve
# and --rc-no-auth. Exposed on host port 5572 so you can
# also drive it directly with curl / rclone rc if needed.
# - gui : nginx serving the embedded frontend bundle on host port
# 5580, reverse-proxying RC API + remote-file downloads
# to the rclone container. Open this in your browser.
#
# rclone config lives in ./config/rclone/rclone.conf (bind-mounted).
# If it doesn't exist yet, create your remotes with:
# docker compose exec rclone rclone config
# or copy an existing rclone.conf into ./config/rclone/ before starting.
#
# Usage:
# docker compose up -d --build # build + start
# open http://localhost:5580
# docker compose logs -f gui rclone # tail logs
# docker compose down # stop
services:
rclone:
image: rclone/rclone:latest
container_name: rclone-rcd
command:
- rcd
- --rc-no-auth
- --rc-addr=:5572
- --rc-serve
- --rc-job-expire-duration=24h
- --rc-job-expire-interval=1m
- -vv
volumes:
# rclone looks for $XDG_CONFIG_HOME/rclone/rclone.conf; the
# official image sets XDG_CONFIG_HOME=/config.
- ./config/rclone:/config/rclone
# Cache dir for tokens, chunk cache, vfs cache, etc.
- rclone-cache:/cache
# Scratch space for any local-FS remotes that point here.
- rclone-data:/data
environment:
- XDG_CONFIG_HOME=/config
- RCLONE_CACHE_DIR=/cache
ports:
- "5572:5572"
expose:
- "5572"
restart: unless-stopped
gui:
build:
context: .
dockerfile: Dockerfile.webgui
image: rclone-webgui-frontend:local
container_name: rclone-webgui
depends_on:
- rclone
ports:
- "5580:80"
restart: unless-stopped
volumes:
rclone-cache:
rclone-data: