Laboratorio de CI/CD con GitHub Actions, Docker y despliegue automatizado
Este proyecto implementa un pipeline de CI/CD completo que permite desplegar automaticamente al hacer push a main, versionar con tags de Git, realizar rollbacks y recibir notificaciones en Telegram. Construido con GitHub Actions, Docker y Traefik como reverse proxy.
graph TB
subgraph "GitHub"
REPO[Repositorio]
ACTIONS[GitHub Actions]
GHCR[Container Registry]
end
subgraph "Servidor"
TRAEFIK[Traefik]
DOCKER[Docker Compose]
APP[App Node.js]
end
REPO -->|push a main| ACTIONS
ACTIONS -->|build & push| GHCR
ACTIONS -->|SSH deploy| DOCKER
GHCR -->|pull image| DOCKER
DOCKER --> APP
TRAEFIK -->|proxy| APP
INTERNET[Internet] -->|HTTPS| TRAEFIK
sequenceDiagram
participant DEV as Developer
participant GH as GitHub
participant GA as GitHub Actions
participant GHCR as Container Registry
participant SRV as Servidor
DEV->>GH: Push a main
GH->>GA: Trigger workflow
GA->>GA: Crear tag automatico
GA->>GA: Build imagen Docker
GA->>GHCR: Push imagen
GA->>SRV: SSH conexion
SRV->>GHCR: docker compose pull
SRV->>SRV: docker compose up
SRV->>SRV: Health check
GA-->>DEV: Deploy exitoso/fallido
| Endpoint | Descripcion |
|---|---|
/ |
Pagina principal con lista de documentos |
/infografia/ |
Indice de infografias visuales |
/health |
Health check: status, app, version |
/actuator |
Indice HAL-style con links a todos los endpoints |
/actuator/health |
Estado de salud con componentes |
/actuator/info |
Info de app, git commit y build |
/actuator/metrics |
Metricas del sistema (CPU, memoria, uptime) |
/actuator/env |
Variables de entorno (sensibles filtradas) |