Add Caddy beside nginx as the replacement edge
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user