feat: all-in-one production deployment with install script
Redesign deployment as a single docker-compose with Backspace, Caddy (auto-HTTPS), and LiveKit (voice/video) using hybrid networking: Backspace+Caddy on isolated bridge, LiveKit on host mode for WebRTC. - Add install.sh: interactive installer that handles Docker setup, domain/DNS verification, secret generation, LiveKit config, and deployment with health-check wait - Add Caddyfile: static reverse proxy config using Caddy env vars, routes /livekit/* to host-mode LiveKit via host.docker.internal - Rewrite docker-compose.yml: all-in-one with profiles (voice), no external volumes/networks, bind mount ./data for visibility - Fix livekit.ts: use LIVEKIT_URL env var directly instead of Host-header derivation that made the env var dead code - Fix Dockerfile: health check reads $PORT dynamically - Update .env.example: add DOMAIN, COMPOSE_PROFILES documentation - Update .gitignore: add livekit.yaml (contains secrets)
This commit is contained in:
+21
-13
@@ -1,22 +1,30 @@
|
||||
# Backspace Configuration
|
||||
# Copy this file to .env and fill in the values
|
||||
# ─── Backspace Configuration ────────────────────────────────
|
||||
# Copy to .env and configure, or run ./install.sh to generate automatically.
|
||||
|
||||
# Server
|
||||
# Your server's public domain name (required)
|
||||
DOMAIN=example.com
|
||||
|
||||
# ─── Server ─────────────────────────────────────────────────
|
||||
PORT=3000
|
||||
HOST=0.0.0.0
|
||||
|
||||
# Authentication — generate a random secret: openssl rand -hex 32
|
||||
JWT_SECRET=change_me_to_a_random_64_char_hex_string
|
||||
# Authentication — generate with: openssl rand -hex 32
|
||||
JWT_SECRET=
|
||||
|
||||
# LiveKit Voice/Video (optional — leave empty to disable voice features)
|
||||
# Registration — set to false to close signups after initial setup
|
||||
REGISTRATION_OPEN=true
|
||||
|
||||
# Max file upload size in bytes (default: 100MB)
|
||||
MAX_UPLOAD_SIZE=104857600
|
||||
|
||||
# ─── LiveKit Voice/Video ───────────────────────────────────
|
||||
# To enable voice/video, fill in all three values below and add:
|
||||
# COMPOSE_PROFILES=voice
|
||||
# Leave empty to run Backspace without voice features.
|
||||
LIVEKIT_URL=
|
||||
LIVEKIT_API_KEY=
|
||||
LIVEKIT_API_SECRET=
|
||||
|
||||
# Storage
|
||||
UPLOAD_DIR=./data/uploads
|
||||
DB_PATH=./data/backspace.db
|
||||
MAX_UPLOAD_SIZE=104857600
|
||||
|
||||
# Registration — set to false to disable new user registration
|
||||
REGISTRATION_OPEN=true
|
||||
# ─── Docker Compose ────────────────────────────────────────
|
||||
# Uncomment to enable the LiveKit service:
|
||||
# COMPOSE_PROFILES=voice
|
||||
|
||||
Reference in New Issue
Block a user