- deploy/nginx/testing.crm.aduanasoft.com.conf: reverse proxy TLS, app (:5173) y API (:8000) en el mismo origen, headers de seguridad, límite 30 MB de subida. - deploy/env.testing.example: plantilla de entorno SIN secretos, con banderas de seguridad (ENVIRONMENT=production, DEV_LOCAL_AUTH=false) y URLs del dominio. - deploy/README.md: runbook (acceso por llave, build de producción, migraciones, nginx+certbot, smoke test). Los secretos y las migraciones los ejecuta el operador. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
48 lines
1.8 KiB
Plaintext
48 lines
1.8 KiB
Plaintext
# ==========================================================================
|
|
# Plantilla de entorno para testing.crm.aduanasoft.com (entorno de PRUEBAS)
|
|
# Copia este archivo como `.env` EN EL SERVIDOR y rellena los valores reales.
|
|
# NO subas el .env con secretos al repositorio.
|
|
# ==========================================================================
|
|
|
|
# ---- SEGURIDAD (CRÍTICO) ----
|
|
# Debe ser 'production'. NUNCA 'development' en un dominio público: el RBAC
|
|
# hace auto-bootstrap de super_admin al usuario en 'development' (cualquiera
|
|
# quedaría como administrador total).
|
|
ENVIRONMENT=production
|
|
# NUNCA 'true' en público: activa el login local "Entrar como dev" y salta Keycloak.
|
|
DEV_LOCAL_AUTH=false
|
|
# Genera uno fuerte: openssl rand -hex 32
|
|
SECRET_KEY=CHANGE_ME_openssl_rand_hex_32
|
|
|
|
# ---- Autenticación (Keycloak / Hub) ----
|
|
HUB_URL=https://CHANGE_ME_hub_o_keycloak/
|
|
# (agrega aquí los claims/realm/cliente que use tu integración real)
|
|
|
|
# ---- Base de datos (PostgreSQL) ----
|
|
CORE_DB_HOST=postgres
|
|
CORE_DB_PORT=5432
|
|
CORE_DB_NAME=crm_core
|
|
CORE_DB_USER=CHANGE_ME
|
|
CORE_DB_PASSWORD=CHANGE_ME
|
|
|
|
# ---- Almacenamiento de objetos (MinIO / S3) ----
|
|
S3_ENDPOINT_URL=http://minio:9000
|
|
S3_ACCESS_KEY=CHANGE_ME
|
|
S3_SECRET_KEY=CHANGE_ME
|
|
S3_BUCKET=crm
|
|
S3_REGION=us-east-1
|
|
S3_USE_SSL=false
|
|
|
|
# ---- URLs públicas / CORS (mismo origen que nginx) ----
|
|
APP_PUBLIC_URL=https://testing.crm.aduanasoft.com
|
|
CORS_ORIGINS=https://testing.crm.aduanasoft.com
|
|
|
|
# ---- Frontend (SvelteKit adapter-node) ----
|
|
# API en el mismo origen a través de nginx (/api/):
|
|
VITE_API_URL=https://testing.crm.aduanasoft.com/api/
|
|
# Llamadas servidor->servidor dentro de la red de Docker:
|
|
BACKEND_URL=http://backend:8000
|
|
INTERNAL_API_URL=http://backend:8000/api/
|
|
# adapter-node valida el Origin contra ORIGIN; debe ser la URL pública:
|
|
ORIGIN=https://testing.crm.aduanasoft.com
|