v0.16 dropped TOML/%{env}% for a JSON datastore-only config, with all other
settings living in Postgres. This migrates the deployment and fixes the
fallout found during the first real run.
- config/config.json: v0.16 JSON bootstrap (root = PostgreSql datastore;
DB password via the EnvironmentVariable secret type, so it stays
commit-safe). Replaces the now-dead config.toml.
- docker-compose.yml: bind-mount config.json -> /etc/stalwart/config.json
(the image's --config path) and use a named volume for /var/lib/stalwart;
the old anonymous volumes were orphaned on every recreate ("lost settings").
Drop the dead config.toml mount.
- .gitignore: exclude local operational artifacts that hold real secrets +
mail data (_backup/, _validate/, *.dump, export/). config/config.json is
intentionally tracked (secret-free).
- CLAUDE.md: "Lessons learned — v0.16 first real run" — config model, the
anonymous-volume trap, full-FQDN store endpoints, per-listener PROXY trust,
one-instance-per-store, recovery mode + argon2 password reset, ACME, backups.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
713 B
Plaintext
25 lines
713 B
Plaintext
# Operator secrets — never commit. Copy .env.example -> .env and fill in.
|
|
.env
|
|
caddy/.env
|
|
|
|
# Local-only overrides
|
|
*.local.toml
|
|
*.local.json
|
|
|
|
# Built Caddy binary (rebuild from caddy/Dockerfile instead of committing 50MB)
|
|
caddy/caddy
|
|
caddy/*.bin
|
|
|
|
# Local operational artifacts — DB dumps, store exports, validation runs.
|
|
# These contain REAL secrets + account/mail data. Never commit.
|
|
_backup/
|
|
_validate/
|
|
*.dump
|
|
# Stalwart store export/import dirs (stalwart --export/--import)
|
|
export/
|
|
*.export
|
|
|
|
# NB: config/config.json IS committed on purpose — it's the v0.16 bootstrap
|
|
# config and is secret-free (DB password comes from $STALWART_DB_PASSWORD via
|
|
# the EnvironmentVariable secret type). Don't add it here.
|