Private
Public Access
1
0

pkg: usr: solve the not-working mailing on dev env under docker #4

This commit is contained in:
2026-04-14 10:37:02 +02:00
parent 055e59d896
commit 82465322f2
2 changed files with 39 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
###> system7 - jotunheimr ###
compose.override.yaml
+bak/
.idea/
node_modules/

View File

@@ -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.