examples/compose/cloudflared-paired.yml pairs RefBoard with a cloudflared sidecar reading a TUNNEL_TOKEN env var — no inbound ports needed, suitable for home / studio servers. examples/compose/behind-caddy.yml + Caddyfile fronts RefBoard with Caddy for automatic Let's Encrypt TLS on a public hostname. Caddy 2's reverse_proxy transparently upgrades Socket.IO WebSockets. examples/fly.toml deploys to Fly.io using the GHCR image and a persistent volume mounted at /app/data. STORAGE_BACKEND=fs so the whole stack is one machine with one disk. examples/render.yaml is a Render.com Blueprint targeting the same shape (GHCR image + attached disk + FS storage). examples/README.md indexes everything and adds notes for Coolify / Dokploy / CapRover / Railway, which consume the existing compose file directly without a dedicated template. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
# RefBoard + Cloudflare Tunnel sidecar.
|
|
#
|
|
# Publishes RefBoard at a hostname routed through Cloudflare without opening
|
|
# any inbound ports. Recommended for home / studio servers.
|
|
#
|
|
# Setup:
|
|
# 1. Create a tunnel + DNS record in the Cloudflare Zero Trust dashboard.
|
|
# Point its public hostname (e.g. refboard.example.com) at
|
|
# http://refboard:8000 (the in-network service name below).
|
|
# 2. Copy the tunnel token from the dashboard and put it in your .env:
|
|
# TUNNEL_TOKEN=eyJhIjoi...
|
|
# 3. docker compose -f examples/compose/cloudflared-paired.yml up -d
|
|
#
|
|
# Heads-up: Cloudflare's free plan caps proxied request bodies at 100 MB.
|
|
# If you upload large videos / PDFs regularly, set MAX_FILE_SIZE_MB in .env
|
|
# accordingly or upgrade your Cloudflare plan.
|
|
|
|
services:
|
|
refboard:
|
|
image: ${REFBOARD_IMAGE:-ghcr.io/metalfinger/refboard:latest}
|
|
container_name: refboard
|
|
environment:
|
|
PORT: 8000
|
|
NODE_ENV: production
|
|
JWT_SECRET: ${JWT_SECRET:-}
|
|
STORAGE_BACKEND: fs
|
|
STORAGE_DATA_DIR: /app/data/storage
|
|
DB_PATH: /app/data/refboard.db
|
|
CORS_ORIGIN: ${CORS_ORIGIN:-*}
|
|
MAX_FILE_SIZE_MB: ${MAX_FILE_SIZE_MB:-90}
|
|
SEED_ADMIN_EMAIL: ${SEED_ADMIN_EMAIL:-}
|
|
SEED_ADMIN_PASSWORD: ${SEED_ADMIN_PASSWORD:-}
|
|
ALLOW_SELF_REGISTRATION: ${ALLOW_SELF_REGISTRATION:-false}
|
|
volumes:
|
|
- ./.docker-data/refboard:/app/data
|
|
restart: unless-stopped
|
|
|
|
cloudflared:
|
|
image: cloudflare/cloudflared:latest
|
|
container_name: refboard-cloudflared
|
|
depends_on:
|
|
- refboard
|
|
command: tunnel --no-autoupdate run --token ${TUNNEL_TOKEN}
|
|
environment:
|
|
TUNNEL_TOKEN: ${TUNNEL_TOKEN:?TUNNEL_TOKEN must be set in .env}
|
|
restart: unless-stopped
|