Add Caddy beside nginx as the replacement edge
Test and deploy / test (push) Successful in 1m32s
Test and deploy / deploy (push) Successful in 29m5s

caddy/ reproduces nginx's routes, gates, /notes/ privacy denials, uploads
(bucket first, then disk), rate limits, real-IP and headers in one shared
route table, with certificates obtained over DNS-01 in-process instead of by
certbot. Until the cutover it serves nothing public: loopback-only ports
8880/8443, no network aliases, its own address. The image build validates
the prod and dev configs, so a broken Caddyfile stops the deploy before any
container is replaced (`make check-caddy` is the same build).

caddy/edge_test.sh checks the privacy boundary and the gates and prints
everything else for diffing nginx against Caddy before switching over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-17 22:45:35 +00:00
co-authored by Claude Opus 5.5
parent 89aaf8d79e
commit e09b90afaa
14 changed files with 1464 additions and 8 deletions
+9 -5
View File
@@ -187,7 +187,8 @@ LIQUIDSOAP_HARBOR_PORT=8001
# --- TLS / identity ----------------------------------------------------------
# DOMAIN is the APEX domain with no scheme and no www; certbot requests both
# it and www.DOMAIN on one certificate, and nginx canonicalises to www.
# EMAIL is the Let's Encrypt account address for expiry notices.
# EMAIL is the Let's Encrypt account address for certbot. Caddy registers
# its ACME account without one (Let's Encrypt no longer sends expiry notices).
DOMAIN=
EMAIL=
@@ -198,10 +199,13 @@ EMAIL=
# dashboard, not here; see "Cloudflare Tunnel" in DEPLOYMENT.md. Blank leaves
# the container restarting with an error and the site reachable directly.
CLOUDFLARE_TUNNEL_TOKEN=
# Cloudflare API token for certbot's DNS-01 challenge (My Profile -> API
# Tokens -> Create Token -> "Edit zone DNS", limited to this zone). Set, the
# certificate renews without any inbound port, so the router's 80/443
# forwards can close. Blank falls back to HTTP-01 on port 80.
# Cloudflare API token for the DNS-01 challenge (My Profile -> API Tokens ->
# Create Token -> "Edit zone DNS", limited to this zone). Set, the certificate
# renews without any inbound port, so the router's 80/443 forwards can close.
# certbot: blank falls back to HTTP-01 on port 80.
# Caddy (caddy/sites/prod.caddy) has no fallback and also needs Zone -> Zone
# -> Read on the same zone, so add that permission to the token. Changing it
# needs `docker compose up -d caddy`.
CLOUDFLARE_DNS_API_TOKEN=
# --- Third-party API keys (backend) ------------------------------------------