102 lines
2.5 KiB
YAML
102 lines
2.5 KiB
YAML
# featherChat + WZP full stack
|
|
# Usage:
|
|
# echo "YOUR_CF_API_TOKEN" > cf_api_token.txt
|
|
# docker compose up -d
|
|
#
|
|
# DNS: voip.manko.yoga → your IP
|
|
# Test: https://voip.manko.yoga
|
|
|
|
services:
|
|
# ─── Caddy reverse proxy (TLS termination) ───
|
|
caddy:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.caddy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "443:443/udp" # HTTP/3 (QUIC)
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
environment:
|
|
CF_API_TOKEN: /run/secrets/cf_api_token
|
|
secrets:
|
|
- cf_api_token
|
|
# Caddy reads CF_API_TOKEN; the caddy-cloudflare image supports file-based secrets
|
|
# via the {$CF_API_TOKEN} placeholder in Caddyfile.
|
|
# We mount the secret and set env to its content at runtime.
|
|
entrypoint: ["/bin/sh", "-c", "export CF_API_TOKEN=$(cat /run/secrets/cf_api_token) && caddy run --config /etc/caddy/Caddyfile --adapter caddyfile"]
|
|
depends_on:
|
|
- warzone-server
|
|
- wzp-web
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
|
|
# ─── featherChat server ───
|
|
warzone-server:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: warzone/deploy/docker/Dockerfile.server
|
|
restart: unless-stopped
|
|
environment:
|
|
# Browser connects to audio via Caddy: wss://voip.manko.yoga/audio/ws/ROOM
|
|
WZP_RELAY_ADDR: "voip.manko.yoga/audio"
|
|
RUST_LOG: "info"
|
|
volumes:
|
|
- server_data:/data
|
|
command: ["--bind", "0.0.0.0:7700", "--enable-bots"]
|
|
networks:
|
|
- backend
|
|
|
|
# ─── WZP QUIC relay (audio SFU) ───
|
|
wzp-relay:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: warzone/deploy/docker/Dockerfile.wzp
|
|
restart: unless-stopped
|
|
entrypoint: ["wzp-relay"]
|
|
command:
|
|
- "--listen"
|
|
- "0.0.0.0:4433"
|
|
- "--auth-url"
|
|
- "http://warzone-server:7700/v1/auth/validate"
|
|
networks:
|
|
- backend
|
|
|
|
# ─── WZP web bridge (browser WS ↔ QUIC relay) ───
|
|
wzp-web:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: warzone/deploy/docker/Dockerfile.wzp
|
|
restart: unless-stopped
|
|
entrypoint: ["wzp-web"]
|
|
command:
|
|
- "--port"
|
|
- "8080"
|
|
- "--relay"
|
|
- "wzp-relay:4433"
|
|
- "--auth-url"
|
|
- "http://warzone-server:7700/v1/auth/validate"
|
|
depends_on:
|
|
- wzp-relay
|
|
- warzone-server
|
|
networks:
|
|
- backend
|
|
|
|
secrets:
|
|
cf_api_token:
|
|
file: ./cf_api_token.txt
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|
|
server_data:
|
|
|
|
networks:
|
|
frontend:
|
|
backend:
|