fix(email): wire PLATFORM_URL into prod compose, was always falling back to localhost
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled

Set-password links in every password-setup/reset email pointed at
http://localhost:5173 in production because PLATFORM_URL was never mapped
in docker-compose.prod.yml's backend environment block — the app silently
used its dev default. Now defaults to the real domain from CORS_ORIGINS.
This commit is contained in:
kitos
2026-07-20 14:00:26 +02:00
parent 91442ede60
commit d25d876c2c
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -39,6 +39,12 @@ CORS_ORIGINS=https://your-domain.com
# ── Frontend ───────────────────────────────────────────────────────────────── # ── Frontend ─────────────────────────────────────────────────────────────────
FRONTEND_PORT=80 FRONTEND_PORT=80
# ── Emails ────────────────────────────────────────────────────────────────────
# Base URL used to build links in outbound emails (set-password, etc).
# Must match your real public frontend URL — the app falls back to
# http://localhost:5173 (dev default) if this is not set.
PLATFORM_URL=https://your-domain.com
# ── Environment flag ───────────────────────────────────────────────────────── # ── Environment flag ─────────────────────────────────────────────────────────
# Set to "production" for production deployments (enforces SECRET_KEY, etc.) # Set to "production" for production deployments (enforces SECRET_KEY, etc.)
AEGIS_ENV=production AEGIS_ENV=production
+3
View File
@@ -90,6 +90,9 @@ services:
REDIS_TOKEN_BLACKLIST_DB: ${REDIS_TOKEN_BLACKLIST_DB:-1} REDIS_TOKEN_BLACKLIST_DB: ${REDIS_TOKEN_BLACKLIST_DB:-1}
REDIS_CACHE_DB: ${REDIS_CACHE_DB:-2} REDIS_CACHE_DB: ${REDIS_CACHE_DB:-2}
CORS_ORIGINS: ${CORS_ORIGINS:-} CORS_ORIGINS: ${CORS_ORIGINS:-}
# Base URL used to build links in outbound emails (set-password, etc).
# Must be the real public frontend URL, not the dev default.
PLATFORM_URL: ${PLATFORM_URL:-http://aegis.undiamagico.es}
AEGIS_ENV: ${AEGIS_ENV:-production} AEGIS_ENV: ${AEGIS_ENV:-production}
SECURE_COOKIES: ${SECURE_COOKIES:-false} SECURE_COOKIES: ${SECURE_COOKIES:-false}
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin} ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}