Sincroniza el scaffold canónico desde templates/web-backend-python/ del repo IDP. Reemplaza el placeholder mínimo previo (.gitea/workflows/ci.yaml, README.md, .gitignore, catalog-info.yaml) por el scaffold completo documentado en ADR-053 §3: - code/ — FastAPI app con /health (db check), /metrics, /demo estático, middleware correlation_id, settings Pydantic, db.py con SQLAlchemy - code/alembic/ — migración inicial vacía + env.py usando MIGRATION_DATABASE_URL - code/tests/ — pytest + httpx TestClient (test_health, test_demo) - helm/APP_NAME/ — chart con Deployment, Service, IngressRoute Traefik, NetworkPolicy, ServiceMonitor, Job alembic-upgrade como hook pre-upgrade,pre-install (backoffLimit: 0) - coralware-shape.yaml — manifiesto v1alpha1 del contrato del shape - claim-mariadb.yaml — AddonClaim declarativo (uso futuro ADR-052) - catalog-info.yaml — entidad Backstage actualizada - .gitea/workflows/APP_NAME-build.yaml — invoca reusable workflow ADR-038 + job helm-deploy con KUBECONFIG_TENANT_B64 Placeholders __APP_NAME__, __TIER__, __TENANT_ID__, __TENANT_ID_NODASHES__ serán sustituidos server-side por repo-provisioner cuando materialice el template para un tenant (pendiente — ADR-053 §11.5). El openspec/ del golden path NO se sincroniza al repo Gitea (gobernanza interna de Coralware). Refs: ADR-052, ADR-053, poc-nexobms.md (PoC NexoBMS Demetrio).
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>__APP_NAME__ — demo</title>
|
|
<style>
|
|
body { font-family: system-ui, sans-serif; max-width: 720px; margin: 4rem auto; padding: 0 1rem; }
|
|
code { background: #f4f4f4; padding: 0.15rem 0.4rem; border-radius: 3px; }
|
|
.status { padding: 0.5rem 1rem; border-radius: 4px; margin-top: 1rem; }
|
|
.ok { background: #d4edda; color: #155724; }
|
|
.err { background: #f8d7da; color: #721c24; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>__APP_NAME__</h1>
|
|
<p>App generada desde el Golden Path <code>web-backend/python</code>.</p>
|
|
<p>
|
|
Este es el frontend estático servido en <code>/demo</code>. Modifica
|
|
<code>code/app/static/demo/</code> para reemplazarlo con tu UI.
|
|
</p>
|
|
|
|
<div id="health-status" class="status">cargando…</div>
|
|
|
|
<script>
|
|
fetch('/health')
|
|
.then(r => r.json())
|
|
.then(data => {
|
|
const el = document.getElementById('health-status');
|
|
const ok = data.status === 'ok';
|
|
el.className = 'status ' + (ok ? 'ok' : 'err');
|
|
el.textContent = `Estado: ${data.status} · DB: ${data.db}`;
|
|
})
|
|
.catch(err => {
|
|
const el = document.getElementById('health-status');
|
|
el.className = 'status err';
|
|
el.textContent = 'No se pudo contactar a /health';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|