Correos: leer la URL publica en tiempo de ejecucion (APP_URL)

Next incrusta process.env.NEXT_PUBLIC_* en el bundle al compilar, tambien en
codigo de servidor y aun con clave calculada. La imagen de produccion se
construye sin NEXT_PUBLIC_APP_URL, asi que los links de los correos de cobro
quedaban fijos en http://localhost:3000. Ahora se lee APP_URL (variable de
servidor) al enviar. Compose de Coolify, .env.example y AGENTS.md actualizados.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
urieljareth
2026-10-26 15:16:44 -06:00
co-authored by Claude Opus 5.5
parent 5e2b784c24
commit 14526f92f2
5 changed files with 20 additions and 11 deletions
+2 -1
View File
@@ -56,7 +56,8 @@ services:
- SEED_ASESOR_PASSWORD=${SEED_ASESOR_PASSWORD}
- SEED_ASESOR_NAME=${SEED_ASESOR_NAME}
# URL publica: la usan los links de correo y de las notificaciones push.
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
# Se lee en tiempo de ejecucion (no NEXT_PUBLIC_*: Next lo fijaria al compilar).
- APP_URL=${APP_URL}
# Web Push (VAPID). Generar con: node -e "console.log(require('web-push').generateVAPIDKeys())"
# La app funciona sin ellas: las notificaciones se omiten con aviso en log.
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY}