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>
12 lines
501 B
Caddyfile
12 lines
501 B
Caddyfile
# 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
|
|
}
|