Add docker-compose stack: app + Caddy reverse proxy with automatic TLS
Caddy's site address comes from SITE_ADDRESS (defaults to "localhost"). Left at that default, Caddy detects it isn't a public hostname and issues a self-signed cert from its own internal CA — no domain needed for local/dev testing. Set to a real domain, it gets a genuine Let's Encrypt certificate automatically instead. DB, encrypted master key and logs are bind-mounted from ./data/ on the host (not opaque Docker-managed volumes), so they survive container restarts/rebuilds and stay reachable for manual inspection/backup directly from the repo root. ./data/ is gitignored. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2dedc283c6
commit
d35784d574
3 files changed
+45
No files matched your search
@@ -0,0 +1,11 @@
|
||||
# SITE_ADDRESS is the domain to serve (e.g. lottery.example.com) — Caddy
|
||||
# automatically requests a Let's Encrypt certificate for it.
|
||||
#
|
||||
# Left at the default "localhost" (dev mode, no domain), Caddy detects it's
|
||||
# not a public hostname and issues a locally-trusted self-signed certificate
|
||||
# instead, via its internal CA. Browsers will still warn on first visit
|
||||
# unless that CA is explicitly trusted — expected for local/dev use.
|
||||
{$SITE_ADDRESS:localhost} {
|
||||
encode gzip
|
||||
reverse_proxy app:8123
|
||||
}
|
||||
Reference in new issue
Block a user