Add SMTP email configuration via .env for password reset mail delivery

- docker-compose.yml: Add Email__* vars for SMTP provider, host, credentials, and reset template (all referencing env vars from .env)
- .env (new, gitignored): Real SMTP credentials for passwort@omsorg-pflegedienste.de
- .env.example (new, tracked): Template documenting required env vars for next deploy
- .gitignore: Add .env to gitignore so credentials don't leak into git history

Mailversand über den bestehenden `SmtpEmailSender` (`omsorgCore/CLAUDE.md`, Abschnitt "Passwort-Reset / E-Mail-Versand") wird damit in Docker Compose aktiviert — zuvor war nur der Console-Provider (kein echter Versand) konfiguriert.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Felix Kemmler
2026-08-10 21:46:29 +02:00
co-authored by Claude Haiku 4.5
parent 019b4286fd
commit d16a1a058e
3 changed files with 21 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# Email configuration for SMTP-based password reset mail delivery
# Copy this file to .env and fill in the actual values (especially EMAIL_PASSWORD_RESET_PASSWORD)
# The .env file is loaded automatically by docker compose and is git-ignored to keep credentials safe
EMAIL_PROVIDER=Smtp
EMAIL_SMTP_HOST=smtps.udag.de
EMAIL_SMTP_PORT=587
EMAIL_PASSWORD_RESET_USERNAME=passwort@omsorg-pflegedienste.de
EMAIL_PASSWORD_RESET_PASSWORD=
EMAIL_PASSWORD_RESET_SENDER=passwort@omsorg-pflegedienste.de
EMAIL_PASSWORD_RESET_SUBJECT=Ihr OMSORG Passwort-Reset-Code
EMAIL_PASSWORD_RESET_BODY_TEMPLATE=Ihr Code lautet: $$RESET_PIN$$\nDer Code ist $$RESET_PIN_EXPIRY_MINUTES$$ Minuten gültig.
+1
View File
@@ -1,4 +1,5 @@
# Config with credentials # Config with credentials
.env
**/mitarbeiter-app*/lib/config.php **/mitarbeiter-app*/lib/config.php
**/mitarbeiter-app*/lib/config.secret.php **/mitarbeiter-app*/lib/config.secret.php
+8
View File
@@ -75,6 +75,14 @@ services:
ConnectionStrings__OmsorgCore: "Host=postgres;Port=5432;Database=omsorg_core;Username=omsorg_core;Password=omsorg_core_dev_password" ConnectionStrings__OmsorgCore: "Host=postgres;Port=5432;Database=omsorg_core;Username=omsorg_core;Password=omsorg_core_dev_password"
Jwt__Secret: "CHANGE_ME_LOCAL_DEV_SECRET_MIN_32_CHARS_LONG" Jwt__Secret: "CHANGE_ME_LOCAL_DEV_SECRET_MIN_32_CHARS_LONG"
Cors__AllowedOrigins__0: "https://app.omsorg-pflegedienste.de" Cors__AllowedOrigins__0: "https://app.omsorg-pflegedienste.de"
Email__Provider: "${EMAIL_PROVIDER}"
Email__Smtp__Host: "${EMAIL_SMTP_HOST}"
Email__Smtp__Port: "${EMAIL_SMTP_PORT}"
Email__Accounts__PasswordReset__Username: "${EMAIL_PASSWORD_RESET_USERNAME}"
Email__Accounts__PasswordReset__Password: "${EMAIL_PASSWORD_RESET_PASSWORD}"
Email__Accounts__PasswordReset__SenderAddress: "${EMAIL_PASSWORD_RESET_SENDER}"
Email__PasswordResetTemplate__Subject: "${EMAIL_PASSWORD_RESET_SUBJECT}"
Email__PasswordResetTemplate__BodyTemplate: "${EMAIL_PASSWORD_RESET_BODY_TEMPLATE}"
ports: ports:
# Nur auf dem Host erreichbar (für den Reverse-Proxy oben), nie auf der öffentlichen # Nur auf dem Host erreichbar (für den Reverse-Proxy oben), nie auf der öffentlichen
# Schnittstelle - matcht das 127.0.0.1:5173-Muster im bestehenden Host-nginx. # Schnittstelle - matcht das 127.0.0.1:5173-Muster im bestehenden Host-nginx.