Arquitectura general
Capas
- Frontend (Quarto): sitio estático que consume la API y publica catálogos/documentación.
- API (FastAPI): endpoints REST bajo
/api/0.6.9. - ETL (Python + SQL): ingesta, limpieza y publicación en capas raw → bronze → silver → gold.
- Datos: PostgreSQL 14 como data warehouse principal.
El frontend se prepara con Quarto (make build-ui) y sus artefactos estáticos (frontend/_site/) se sirven directamente desde FastAPI mediante StaticFiles.
Entornos
| Entorno | Branch | Host | Descripción |
|---|---|---|---|
| Producción | main |
ep.illanes00.cl |
Servicio estable supervisado por systemd. |
| Staging | staging |
staging.ep.illanes00.cl (pendiente) |
Validación previa al release. |
| Desarrollo | feat/* |
localhost | Iteraciones locales. |
Servicios del VPS
illanes00-ep.service: corre Uvicorn (.venv/bin/python+ FastAPI).postgresql@14-main: almacena todas las capas de datos.caddy.service: reverse proxy TLS → 127.0.0.1:8107.
Flujos CI/CD
- Pull request → CI (lint + tests + migraciones).
- Merge a
main→ GitHub Actions → despliegue por SSH (make migrate,make seed_min, restart, smoke tests). - Monitoreo:
/healthz,/api/0.6.9/health,/api/0.6.9/hello.