josedario87 c00d0fb61a
Some checks failed
build-and-deploy / build (push) Failing after 6s
build-and-deploy / deploy (push) Has been skipped
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

Plantilla Nuxt + Authentik Proxy

Plantilla base para aplicaciones Nuxt 4 con autenticación mediante Authentik OAuth.

Estructura del Proyecto

.
├── nuxt4/              # Aplicación Nuxt 4
├── docker-compose.yml  # Configuración de despliegue
└── .gitea/            # Gitea Actions CI/CD

Características

  • Nuxt 4
  • Autenticación OAuth con Authentik
  • Docker y Docker Compose
  • CI/CD con Gitea Actions
  • Traefik para proxy reverso y SSL
  • Claude Code hooks para monitoreo de Actions

Desarrollo Local

cd nuxt4
npm install
npm run dev

Claude Code Hooks

Este proyecto incluye hooks de Claude Code para monitorear automáticamente las Gitea Actions.

Configuración Rápida:

  1. Crear token de Gitea:

    • Ve a tu instancia de Gitea → Settings → Applications
    • Genera un token con permisos repo
  2. Configurar token:

    echo "export GITEA_TOKEN='tu_token_aqui'" >> ~/.bashrc
    source ~/.bashrc
    
  3. Listo! Cuando Claude Code haga git push, automáticamente:

    • Monitoreará la Gitea Action
    • Te notificará cuando termine con información detallada
    • Te mostrará un link directo a los logs

📖 Ver documentación completa en .claude/hooks/README.md

Despliegue

El proyecto incluye Gitea Actions que automáticamente:

  1. Construye la imagen Docker
  2. La sube al registro
  3. Despliega usando docker-compose

Variables Requeridas en Gitea

Para configurar el despliegue automático, ve a tu repositorio en Gitea:

  • Secrets: Settings > Actions > Secrets
  • Variables: Settings > Actions > Variables

Secrets (valores sensibles):

  • REGISTRY_USERNAME - Usuario del registro Docker
  • REGISTRY_PASSWORD - Contraseña del registro Docker
  • NUXT_OAUTH_AUTHENTIK_CLIENT_ID - Client ID de Authentik
  • NUXT_OAUTH_AUTHENTIK_CLIENT_SECRET - Client Secret de Authentik
  • NUXT_SESSION_PASSWORD - Password para sesiones (generar con openssl rand -base64 32)

Variables (valores públicos):

  • REGISTRY_URL - URL del registro Docker (ej: registry.ejemplo.com)
  • APP_NAME - Nombre de la aplicación (ej: mi-app) - usado para container, imagen y Traefik
  • APP_DOMAIN - Dominio de la aplicación (ej: miapp.ejemplo.com)
  • NUXT_OAUTH_AUTHENTIK_SERVER_URL - URL pública de Authentik
  • NUXT_OAUTH_AUTHENTIK_SERVER_URL_INTERNAL - URL interna de Authentik (para comunicación server-side)
  • NUXT_OAUTH_AUTHENTIK_REDIRECT_URL - URL de callback OAuth (ej: https://miapp.ejemplo.com/auth/callback)
  • NUXT_PUBLIC_APP_URL - URL pública de la app

📄 Ver ejemplo completo en .env.example

Licencia

MIT

Description
No description provided
Readme 1,002 KiB
Languages
Vue 43.5%
TypeScript 31.1%
Shell 15.6%
HTML 8%
Dockerfile 1.4%
Other 0.4%