- SiteSettings gains websiteUrl (e.g. online shop link) alongside the
existing social links, editable in Verwaltung > Automatisierung.
- /herkunft/[lot] now shows the apiary's Standort instead of its internal
Name (so multiple apiaries at one location read as one origin), adds
small icons per social link, and surfaces previously-fetched-but-unused
data (Honigsorte, Abfülldatum, stat cards) to make the page a richer
customer-facing info page.
- Backup schedule (path/cron/retention) is now also configurable via the
GUI (Verwaltung > Backup), stored in a new BackupSettings singleton;
an env var always wins over the GUI value per field, and the scheduler
reloads its cron job live when GUI settings change.
- New Automatisierung rules let an admin define a format (e.g.
"WH-{YYYY}-{SEQ:4}") that auto-generates HoneyBatch.batchNumber and
BottlingBatch.lotNumber on creation, with an atomic per-rule sequence
counter and a manual reset. Manual entry still works when the rule is
inactive.
55 lines
2.5 KiB
Bash
55 lines
2.5 KiB
Bash
# Kopieren nach .env und mit echten Werten befuellen. .env ist gitignored.
|
|
|
|
DATABASE_URL="postgresql://user:password@localhost:5432/apicore?schema=public"
|
|
|
|
# Mindestens 32 Zeichen (server-seitig erzwungen, siehe main.ts) - signiert
|
|
# jedes Access-/MFA-/SSO-Token UND verschluesselt gespeicherte TOTP-Secrets.
|
|
# Erzeugen z.B. mit: openssl rand -hex 32
|
|
JWT_ACCESS_SECRET="change-me-to-a-random-value-at-least-32-characters-long"
|
|
JWT_REFRESH_SECRET="change-me-refresh-secret"
|
|
JWT_ACCESS_EXPIRES_IN="15m"
|
|
JWT_REFRESH_EXPIRES_IN="7d"
|
|
|
|
PORT=3001
|
|
FRONTEND_ORIGIN="http://localhost:3000"
|
|
|
|
# Refresh-token cookie requires HTTPS by default. Set to "false" only for
|
|
# local HTTP development - every real deployment must leave this unset (or
|
|
# "true").
|
|
COOKIE_SECURE=false
|
|
|
|
# Lokales Verzeichnis fuer hochgeladene Dokumente/Bilder (Modul 29).
|
|
# Bei horizontaler Skalierung (>1 Replica) muss dies auf ein geteiltes
|
|
# Volume (z.B. ReadWriteMany-PVC) zeigen, siehe ARCHITECTURE.md Annahme 7.
|
|
DOCUMENTS_STORAGE_PATH="./uploads"
|
|
|
|
# Automatische Backups (Modul Backup). Alle drei Werte sind auch ueber die
|
|
# GUI (Verwaltung > Backup) konfigurierbar - eine hier gesetzte Env-Variable
|
|
# hat aber IMMER Vorrang vor dem GUI-Wert, pro Feld einzeln. Ohne Pfad
|
|
# (weder Env noch GUI) bleibt der Zeitplan deaktiviert (nur manueller
|
|
# Export/Import ueber die UI verfuegbar).
|
|
# Bei horizontaler Skalierung (>1 Replica) muss der Pfad auf ein geteiltes
|
|
# Volume zeigen (wie DOCUMENTS_STORAGE_PATH), sonst sieht jede Replica nur
|
|
# ihre eigenen Backup-Dateien und die Lauf-Erkennung zwischen Replicas greift
|
|
# nicht.
|
|
BACKUP_STORAGE_PATH="./backups"
|
|
# Cron-Ausdruck (Standard: taeglich um 03:00 Uhr).
|
|
BACKUP_CRON_SCHEDULE="0 3 * * *"
|
|
# Wie viele der neuesten Backup-Dateien behalten werden, aeltere werden nach
|
|
# jedem Lauf geloescht (Standard: 14).
|
|
BACKUP_RETENTION_COUNT=14
|
|
|
|
# Entra ID SSO. Ohne alle vier Werte bleibt SSO deaktiviert
|
|
# (GET /api/v1/auth/sso/status meldet enabled: false, kein Fehler beim Start).
|
|
# OIDC_ISSUER_URL ist die v2.0-Metadaten-URL des Tenants, OIDC_REDIRECT_URI
|
|
# muss exakt der in der App-Registrierung hinterlegten Redirect-URI entsprechen.
|
|
OIDC_ISSUER_URL="https://login.microsoftonline.com/<tenant-id>/v2.0"
|
|
OIDC_CLIENT_ID="change-me-entra-client-id"
|
|
OIDC_CLIENT_SECRET="change-me-entra-client-secret"
|
|
OIDC_REDIRECT_URI="http://localhost:3001/api/v1/auth/sso/callback"
|
|
|
|
# Swagger-UI unter /api/v1/docs ist per Default deaktiviert, da sie das
|
|
# gesamte API-Schema ungeschuetzt (kein JwtAuthGuard) preisgeben wuerde.
|
|
# Nur fuer lokale Entwicklung/Debugging explizit aktivieren.
|
|
ENABLE_SWAGGER=false
|