chore(mirror): sync desde templates/web-backend-python (ADR-095)
All checks were successful
__APP_NAME__ — build & deploy / ¿Credenciales de build listas? (push) Successful in 1s
__APP_NAME__ — build & deploy / Calidad + build + push (push) Has been skipped
__APP_NAME__ — build & deploy / ¿Cluster del tenant listo? (push) Has been skipped
__APP_NAME__ — build & deploy / Helm upgrade --install (push) Has been skipped
All checks were successful
__APP_NAME__ — build & deploy / ¿Credenciales de build listas? (push) Successful in 1s
__APP_NAME__ — build & deploy / Calidad + build + push (push) Has been skipped
__APP_NAME__ — build & deploy / ¿Cluster del tenant listo? (push) Has been skipped
__APP_NAME__ — build & deploy / Helm upgrade --install (push) Has been skipped
This commit is contained in:
@@ -6,16 +6,22 @@ Servida en la ruta raíz `/`. Es lo primero que ve el tenant cuando su
|
||||
plataforma queda lista: explica cómo usar su entorno y deja claro que, en
|
||||
cuanto haga su primer commit + push, su desarrollo reemplazará esta página.
|
||||
|
||||
El copy visible va en inglés (UI de producto; el i18n se aborda más adelante).
|
||||
Los placeholders `__APP_NAME__`, `__REPO_OWNER__` y `__REPO_NAME__` los
|
||||
sustituye `repo-provisioner` server-side al scaffoldear el repo del tenant.
|
||||
|
||||
PENDIENTE DE PROPAGACIÓN MANUAL (GOLDENPATH-TEMPLATE-DELIVERY): este archivo se
|
||||
propaga a mano al repo Gitea `idp-templates`. Cualquier cambio aquí NO llega a
|
||||
tenants nuevos hasta esa propagación manual. La secuencia git de onboarding debe
|
||||
quedar idéntica a la fuente canónica (bloque `gitClone` de cove-api).
|
||||
"""
|
||||
|
||||
WELCOME_HTML = """<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>__APP_NAME__ — Tu plataforma Cove</title>
|
||||
<title>__APP_NAME__ — Your Cove platform</title>
|
||||
<style>
|
||||
:root {
|
||||
--copper: #b5651d;
|
||||
@@ -83,36 +89,42 @@ WELCOME_HTML = """<!DOCTYPE html>
|
||||
<div class="card">
|
||||
<div class="brand"><span class="dot"></span> CORALWARE · COVE</div>
|
||||
|
||||
<h1>Tu plataforma está lista 🎉</h1>
|
||||
<p class="sub">Bienvenido. Este es tu entorno <strong>__APP_NAME__</strong>, corriendo en tu propio cluster.</p>
|
||||
<h1>Your platform is ready 🎉</h1>
|
||||
<p class="sub">Welcome. This is your <strong>__APP_NAME__</strong> environment, running on your own cluster.</p>
|
||||
|
||||
<span class="pill">__APP_NAME__</span>
|
||||
<span id="health" class="status"><span class="led"></span> comprobando…</span>
|
||||
<span id="health" class="status"><span class="led"></span> checking…</span>
|
||||
|
||||
<div class="callout">
|
||||
📦 <strong>En cuanto hagas tu primer <code>commit</code> + <code>push</code>, tu desarrollo
|
||||
reemplazará esta página.</strong> Esto es solo la bienvenida por defecto del Golden Path.
|
||||
📦 <strong>As soon as you make your first <code>commit</code> + <code>push</code>, your code
|
||||
will replace this page.</strong> This is just the default Golden Path welcome.
|
||||
</div>
|
||||
|
||||
<h2>Cómo empezar</h2>
|
||||
<h2>Getting started</h2>
|
||||
<ol>
|
||||
<li>
|
||||
Clona tu repositorio:
|
||||
<pre>git clone https://gitea.coralsafety.com/__REPO_OWNER__/__REPO_NAME__.git</pre>
|
||||
Clone your repository and set your identity:
|
||||
<!-- Secuencia canónica de onboarding git (fuente única: bloque gitClone de cove-api).
|
||||
Mantener idéntica a cove-api/cove_api.py y al email de tenant-manager. -->
|
||||
<pre>git clone https://gitea.coralsafety.com/__REPO_OWNER__/__REPO_NAME__.git
|
||||
cd __REPO_NAME__
|
||||
git config user.name "Your Name"
|
||||
git config user.email "you@example.com"
|
||||
git remote rename origin cove</pre>
|
||||
</li>
|
||||
<li>Edita tu código en <code>code/</code> — la app es FastAPI (Python). Tu ruta <code>/</code> reemplaza esta página.</li>
|
||||
<li>Edit your code in <code>code/</code> — the app is FastAPI (Python). Your <code>/</code> route replaces this page.</li>
|
||||
<li>
|
||||
Haz commit y push a <code>main</code>:
|
||||
Commit and push to <code>main</code>:
|
||||
<pre>git add .
|
||||
git commit -m "Mi primer cambio"
|
||||
git push origin main</pre>
|
||||
git commit -m "My first change"
|
||||
git push cove main</pre>
|
||||
</li>
|
||||
<li>El CI construye la imagen y la despliega automáticamente en tu cluster (~3–5 min).</li>
|
||||
<li>Recarga esta misma URL — <strong>aquí verás tu desarrollo</strong>.</li>
|
||||
<li>CI builds the image and deploys it automatically to your cluster (~3–5 min).</li>
|
||||
<li>Reload this same URL — <strong>your app will show up here</strong>.</li>
|
||||
</ol>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://gitea.coralsafety.com/__REPO_OWNER__/__REPO_NAME__" target="_blank">📂 Tu repositorio</a>
|
||||
<a href="https://gitea.coralsafety.com/__REPO_OWNER__/__REPO_NAME__" target="_blank">📂 Your repository</a>
|
||||
<a href="/docs">📘 API Docs (Swagger)</a>
|
||||
<a href="/health">💚 Health</a>
|
||||
<a href="/demo">🧩 Demo</a>
|
||||
@@ -126,10 +138,10 @@ git push origin main</pre>
|
||||
var el = document.getElementById('health');
|
||||
var ok = d.status === 'ok';
|
||||
el.className = 'status' + (ok ? ' ok' : '');
|
||||
el.innerHTML = '<span class="led"></span> ' + (ok ? 'En línea · DB: ' + d.db : 'Estado: ' + d.status);
|
||||
el.innerHTML = '<span class="led"></span> ' + (ok ? 'Online · DB: ' + d.db : 'Status: ' + d.status);
|
||||
}).catch(function () {
|
||||
var el = document.getElementById('health');
|
||||
el.innerHTML = '<span class="led"></span> /health no responde';
|
||||
el.innerHTML = '<span class="led"></span> /health not responding';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -10,7 +10,7 @@ def test_root_serves_welcome_page(client: TestClient) -> None:
|
||||
body = response.text
|
||||
# Mensaje clave: el desarrollo del tenant reemplaza esta página tras commit+push.
|
||||
assert "commit" in body and "push" in body
|
||||
assert "plataforma" in body.lower()
|
||||
assert "platform" in body.lower()
|
||||
# En el template (sin renderizar) el placeholder sigue presente.
|
||||
assert "__APP_NAME__" in body
|
||||
|
||||
|
||||
Reference in New Issue
Block a user