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
+7
View File
@@ -14,6 +14,8 @@
# - backend : dev flags on, including database seeding.
# - nginx : DEV_MODE=true, which makes its entrypoint render
# nginx_dev.conf.template and self-sign a localhost certificate.
# - caddy : CADDY_SITE=dev, which loads caddy/sites/dev.caddy. Until the
# cutover it runs beside nginx, on 127.0.0.1:8880 / :8443.
# - python : uvicorn --reload with the app source bind-mounted.
# - certbot : disabled entirely.
# - cloudflared : disabled entirely.
@@ -66,6 +68,11 @@ services:
ports:
- 80:80
- 443:443
caddy:
environment:
# Loads caddy/sites/dev.caddy instead of the production sites:
# localhost on http and https, `tls internal`, `/` -> Vite.
- CADDY_SITE=dev
python:
# Same command as the Dockerfile's CMD plus --reload, paired with the
# source bind mount below so editing python/app/ restarts uvicorn.