diff --git a/.gitignore b/.gitignore index e3de4fa..b95710b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ ###> system7 - jotunheimr ### +compose.override.yaml +bak/ .idea/ node_modules/ diff --git a/README.md b/README.md index 464983a..08c554b 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,44 @@ echo '' | mc pipe local/mineseeker/cache/.keep --- +## Development environment + +When running the Docker stack locally you typically want to catch outgoing emails instead of relaying them through a real SMTP server. +The production `compose.yaml` uses Postfix for actual mail delivery and must not be edited for local overrides. +Use a `compose.override.yaml` file instead — Docker Compose merges it automatically on top of the base file whenever both are present. + +### Email: replace Postfix with MailHog + +Create `compose.override.yaml` in the project root (it is git-ignored and never reaches production): + +```yaml +services: + app: + environment: + MAILER_DSN: smtp://mail:1025?verify_peer=0 + mail: + image: mailhog/mailhog:latest + ports: + - "8025:8025" +``` + +This replaces the `mail` service image with MailHog and points the application's mailer at its SMTP port (`1025`). +No other files need to change. + +After adding the file, restart the stack: + +```bash +make start-build +``` + +All emails sent by the application are now captured by MailHog. +Open the web UI at **http://localhost:8025** to inspect them. + +> **Production note** — `compose.override.yaml` is listed in `.gitignore`. +> Never commit it; the production server must only see `compose.yaml` with Postfix. + +--- + ## License LGPL-3.0 — see [LICENSE](LICENSE) for details.