Spaces:
Runtime error
Runtime error
Download .env.example from MateFerreyra/Modulo-6: direct link, hf CLI and curl.
- Browser
- Download file 4.34 kB
-
https://huggingface.co/spaces/MateFerreyra/Modulo-6/resolve/main/.env.example
- Command line
-
hf download hf://spaces/MateFerreyra/Modulo-6/.env.example
-
curl -L -o .env.example https://huggingface.co/spaces/MateFerreyra/Modulo-6/resolve/main/.env.example
4.34 kB
| # ─── Base de datos ───────────────────────────────────────────────────────── | |
| DATABASE_URL=postgresql://USUARIO:CONTRASEÑA@HOST/NOMBRE_BD?sslmode=require&channel_binding=require | |
| SUPABASE_URL=https://<tu-proyecto>.supabase.co | |
| SUPABASE_KEY=<tu-service_role-key> | |
| # ─── JWT ─────────────────────────────────────────────────────────────────── | |
| # Generar con: python -c "import secrets; print(secrets.token_hex(32))" | |
| JWT_SECRET=CAMBIAR_POR_SECRET_ALEATORIO_DE_64_CARACTERES | |
| JWT_ALGORITHM=HS256 | |
| JWT_EXPIRE_MINUTES=60 | |
| # ─── Auth: SSO del Core (M10) ─────────────────────────────────────────────── | |
| # La sesión de M6 es siempre un JWT HS256 propio (requiere JWT_SECRET arriba). | |
| # SSO_ENABLED habilita POST /api/v1/auth/sso-exchange, que canjea un ticket | |
| # del Core real (requiere M10_CORE_URL) por ese JWT propio, con el rol ya | |
| # resuelto desde user.roles[] de la respuesta del canje. | |
| SSO_ENABLED=false | |
| # Cuenta de servicio de M6 en el Core: autentica las llamadas salientes a | |
| # M1/M2/M7/M10. | |
| CORE_SERVICE_EMAIL= | |
| CORE_SERVICE_PASSWORD= | |
| # ─── Entorno ─────────────────────────────────────────────────────────────── | |
| # Valores válidos: development | staging | production | |
| # En 'production', el endpoint /auth/token queda deshabilitado | |
| ENVIRONMENT=development | |
| # ─── CORS ────────────────────────────────────────────────────────────────── | |
| # Lista JSON de orígenes permitidos (nunca usar "*" con allow_credentials=true) | |
| ALLOWED_ORIGINS=["http://localhost:3000","http://localhost:5173"] | |
| # ─── Integraciones externas ──────────────────────────────────────────────── | |
| # Si true, las llamadas a M1/M2/M7/M9/M10 son mockeadas (útil para dev local) | |
| MOCK_EXTERNAL_SERVICES=true | |
| # HTTP timeout en segundos para llamadas a módulos externos | |
| HTTP_TIMEOUT_SECONDS=5.0 | |
| # URLs de los módulos del sistema (ajustar para cada entorno) | |
| M1_HCE_URL=http://modulo1:8001 | |
| M2_TURNOS_URL=http://modulo2:8002 | |
| M7_FACTURACION_URL=http://modulo7:8007 | |
| M9_MONITOREO_URL=http://modulo9:8009 | |
| M10_CORE_URL=http://modulo10:8010 | |
| # ─── Bus de eventos del Core (M10) ───────────────────────────────────────── | |
| # RABBITMQ_CONSUMER_ENABLED=true levanta el consumer de internacion.requests | |
| # (cola + 5 event types ya dados de alta en el Core, ver M6_DISEÑO.md §7). | |
| # Las credenciales del broker son CORE_SERVICE_EMAIL/CORE_SERVICE_PASSWORD. | |
| RABBITMQ_CONSUMER_ENABLED=false | |
| RABBITMQ_HOST=localhost | |
| RABBITMQ_PORT=5672 | |
| RABBITMQ_VHOST=/ | |
| INTERNACION_REQUESTS_QUEUE=internacion.requests | |
| # event_type_id de las notificaciones salientes de M6. Cada uno lo crea y | |
| # comparte el módulo receptor (M1/M9/M7). Dejar comentado hasta tener el ID | |
| # real: pydantic-settings no trata "KEY=" vacío como None, tira ValidationError. | |
| # M7 ya confirmó el suyo por escrito (documentation/integrations/M7_integration.md, | |
| # event_type_id=19) — se activa descomentando y completando, igual que se hará acá | |
| # cuando M1/M9 confirmen los suyos. | |
| # HCE_SOLICITUD_RESUELTA_EVENT_TYPE_ID= | |
| # MONITOREO_ALTA_EVENT_TYPE_ID= | |
| # MONITOREO_BAJA_EVENT_TYPE_ID= | |
| # FACTURACION_CAMA_LISTA_EVENT_TYPE_ID= | |
| # ─── Endpoint interno: auto-transición de reservas de quirófano ──────────── | |
| # POST /api/v1/internal/reservas/tick avanza RESERVADA→EN_CURSO→COMPLETADA | |
| # según el horario de cada reserva. Lo llama un cron externo (GitHub | |
| # Actions/cron-job.org), no un scheduler interno — ver M6_DISEÑO.md §5.4. | |
| # Generar con: python -c "import secrets; print(secrets.token_hex(32))" | |
| # Vacío por default: el endpoint rechaza todo (falla cerrado). | |
| INTERNAL_TICK_SECRET= | |