14 Commits

Author SHA1 Message Date
8d592511e6 Agregar variables de entorno de Metabase al deploy
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 17s
2025-11-29 17:13:15 -06:00
a395dcbd62 Fix: Usar host único de Postgres para evitar conflictos en red compartida
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m5s
Cambio de 'postgres' a 'lotes-postgres' para evitar errores 28P01 causados
por resolución de DNS a instancias incorrectas en la red principal.
2025-11-22 01:35:27 -06:00
5b9445ca2d Simplificar configuración de PostgreSQL con cadena de conexión única
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 16s
Eliminados hacks de autenticación md5 y configuración manual de pg_hba.conf.
Ahora usa NUXT_POSTGRES_URL como secret de Gitea para conexión directa.
2025-11-22 00:31:47 -06:00
ee3dffa38e Implementar sistema completo de trazabilidad de lotes
Some checks failed
build-and-deploy / build-and-deploy (push) Failing after 1m47s
- Agregar PostgreSQL 16 con esquema completo
- Crear API endpoints para lotes y operaciones
- Implementar UI con Nuxt UI (tablas, formularios, trazabilidad)
- Agregar datos de ejemplo del flujo completo
- Documentar sistema en PLAN_TRAZABILIDAD.md
2025-11-21 18:39:04 -06:00
e3fc6c924a Add offline.html to public routes (no authentication required)
This allows the service worker to cache offline.html without Authentik redirecting to login.
2025-10-13 02:39:36 -06:00
00c5657b0a Handle session expiration correctly and fix icon CORS errors
- Detect CORS/redirect errors from Authentik and interpret them as
  "no session" instead of generic error
- When session expires, Authentik returns 302 redirect to login which
  causes CORS error in fetch requests
- Add /api/_nuxt_icon/ to public routes to prevent icon load failures
  after logout

This fixes the issue where logout in Authentik showed "Error" instead
of "Sin Sesión" when checking session status.
2025-10-13 01:49:20 -06:00
f6ba3dff5e Fix session status check to preserve authentication state
Remove /api/auth/status from public routes so it receives Authentik headers.
Remove logic that was clearing local auth state, which caused the page to
show "No autenticado" even when user was authenticated.

Now the button only displays session status without modifying the UI state.
2025-10-13 01:40:49 -06:00
51767ff0d3 Add /api/auth/status to public routes
Make the session status check endpoint publicly accessible so it can
respond even when there's no Authentik session. This allows the
endpoint to return {"authenticated": false} instead of being
redirected to login.

Without this, Authentik intercepts the request and returns HTML
login page instead of JSON response.
2025-10-13 01:31:41 -06:00
5646a84be1 Fix CORS error for PWA manifest by splitting Traefik routing
Split routing into two routers with different priorities:
- Public router (priority 100) handles PWA resources without authentication
- Protected router (priority 10) handles application routes with Authentik

Add CORS middleware for public PWA resources to allow cross-origin access
to manifest.webmanifest, service worker, and icons.

Fixes intermittent ERR_FAILED 302 and CORS errors when loading PWA manifest
from authenticated sessions.
2025-10-13 01:16:56 -06:00
fc46ae7a53 Fix Traefik network and Authentik middleware configuration
- Add traefik-network to container networks (CRITICAL FIX)
- Change middleware to authentik-forward-auth@file
- Update traefik.docker.network to traefik-network
- Document network requirements
- Update Authentik configuration instructions
2025-10-12 22:39:49 -06:00
0f7abc6d48 Add automatic repository owner to image naming
- Use github.repository_owner in workflow
- Image format: REGISTRY_URL/owner/APP_NAME:latest
- Works automatically with Gitea registry
- Template-friendly: forks use their own owner
- Update documentation with new format
2025-10-12 22:19:20 -06:00
7120d723ad Switch from OAuth to Authentik Proxy Outpost
- Remove all OAuth configuration (no longer needed)
- Add Authentik Proxy Outpost middleware to Traefik
- Simplify environment variables (only 4 required now)
- Update documentation with proxy outpost setup
- Document available Authentik headers
- Cleaner and simpler deployment
2025-10-12 17:37:19 -06:00
c00d0fb61a Configure deployment with Traefik and Authentik
- Add proper Traefik labels with middleware support
- Use APP_NAME variable for dynamic naming
- Remove port mapping (Traefik handles routing)
- Add .env.example with all required variables
- Update README with complete variable documentation
- Configure docker network to use 'principal'
- Add X-Forwarded-Proto header middleware
2025-10-12 17:29:18 -06:00
c794a883fa Initial commit: Nuxt 4 template with Authentik OAuth
- Add Nuxt 4 application structure
- Add Docker and docker-compose configuration
- Add Gitea Actions CI/CD workflow
- Add Claude Code hooks for action monitoring
2025-10-12 17:09:21 -06:00