app-Image: Registry-Pull mit Build-Fallback statt blindem Build

Das Frontend-Image liegt in der Gitea-Registry (karim/rapport-app:main),
also pullen wir es bevorzugt (schnell, kein npm-Build im Container) und
bauen nur aus Dockerfile.app, wenn die Registry nicht erreichbar ist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 13:38:03 +02:00
parent c17aab3d0a
commit 929c5ab600
2 changed files with 18 additions and 3 deletions
+16 -2
View File
@@ -250,8 +250,22 @@ else
msg "Migrations synchronisiert."
fi
# ═══ 9 · Stack hochfahren ═══════════════════════════════════════════════════
info "Starte Compose-Stack (Images pullen, Erststart ~1-2 Min) …"
# ═══ 9 · Frontend-Image bereitstellen (Registry-Pull, Fallback: Build) ══════
# Das `app`-Image liegt in der Gitea-Registry (git.kgva.ch/karim/rapport-app:main).
# Bevorzugt pullen — schnell, kein npm-Build im Container. Klappt der Pull nicht
# (Registry offline / nicht erreichbar / Auth), baut Dockerfile.app das Frontend
# aus RAPPORT.git als Fallback.
info "Hole Frontend-Image aus der Registry (Fallback: lokaler Build) …"
if pct exec "$CTID" -- bash -c "cd /opt/rapport && docker compose pull app" 2>/dev/null; then
msg "Frontend-Image aus Registry gezogen."
else
info "Registry-Pull fehlgeschlagen — baue aus Dockerfile.app (npm build, dauert) …"
pct exec "$CTID" -- bash -c "cd /opt/rapport && docker compose build app"
msg "Frontend-Image lokal gebaut."
fi
# ═══ 10 · Stack hochfahren ══════════════════════════════════════════════════
info "Starte Compose-Stack (Supabase-Images pullen, Erststart ~1-2 Min) …"
pct exec "$CTID" -- bash -c "cd /opt/rapport && docker compose up -d"
# ═══ Fertig ═════════════════════════════════════════════════════════════════