mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-19 10:01:12 +08:00
Serve canonical root-relative DAV URLs on a configured hostname while preserving the existing /dav mount. Reconcile Cloudflare rewrite rules and Worker custom domains during fork deployments, and expose the effective URL through site options.
73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
# ZPan + RustFS (S3-compatible storage)
|
|
# Usage: docker compose -f deploy/docker-compose.rustfs.yml up -d
|
|
#
|
|
# RustFS console: http://localhost:9001 (admin / admin123)
|
|
# After startup, create a bucket in the RustFS console,
|
|
# then configure the storage provider in ZPan's admin panel.
|
|
|
|
name: zpan
|
|
|
|
services:
|
|
zpan:
|
|
image: ghcr.io/saltbo/zpan:latest
|
|
ports:
|
|
- "8222:8222"
|
|
environment:
|
|
- PORT=8222
|
|
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-}
|
|
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:8222}
|
|
- WEBDAV_PUBLIC_URL=${WEBDAV_PUBLIC_URL:-}
|
|
- DATABASE_URL=/data/zpan.db
|
|
volumes:
|
|
- zpan-data:/data
|
|
depends_on:
|
|
rustfs:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8222/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
|
|
downloader:
|
|
image: ghcr.io/saltbo/zpan:latest-cli
|
|
hostname: zpan-downloader
|
|
command: ["--config", "/data/config.yaml", "downloader", "up"]
|
|
ports:
|
|
- "${ZPAN_BT_PORT:-6881}:${ZPAN_DOWNLOADER_BT_LISTEN_PORT:-6881}/tcp"
|
|
- "${ZPAN_BT_PORT:-6881}:${ZPAN_DOWNLOADER_BT_LISTEN_PORT:-6881}/udp"
|
|
environment:
|
|
- ZPAN_SERVER_URL=http://zpan:8222
|
|
- ZPAN_DOWNLOADER_ENGINE=${ZPAN_DOWNLOADER_ENGINE:-auto}
|
|
- ZPAN_DOWNLOADER_DOWNLOAD_DIR=/data/downloads
|
|
- ZPAN_DOWNLOADER_STATE_DIR=/data/state
|
|
- ZPAN_DOWNLOADER_BT_LISTEN_PORT=${ZPAN_DOWNLOADER_BT_LISTEN_PORT:-6881}
|
|
- ZPAN_DOWNLOADER_SEED_CACHE_LIMIT=${ZPAN_DOWNLOADER_SEED_CACHE_LIMIT:-10GB}
|
|
volumes:
|
|
- downloader-data:/data
|
|
- /etc/hostname:/host/etc/hostname:ro
|
|
depends_on:
|
|
zpan:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
rustfs:
|
|
image: rustfs/rustfs:latest
|
|
command: ["server", "/data", "--console-address", ":9001"]
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
- RUSTFS_ROOT_USER=admin
|
|
- RUSTFS_ROOT_PASSWORD=admin123
|
|
volumes:
|
|
- rustfs-data:/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
zpan-data:
|
|
downloader-data:
|
|
rustfs-data:
|