Files
rippy/deploy.sh
T
Hitonabi b8162753a9
Ampel / ampel (push) Successful in 27s
chore: Single Source of Truth = main (stable-Branch + Gruen-Gate abgeschafft)
Commander-Entscheid 24.07.: nur noch EIN Branch. Der stable-Zwischenbranch
war vestigial — die VM deployt ohnehin aus main (git pull), das Gruen-Gate
hat den Live-Deploy nie real gegated.

- ci.yml: Beförderungs-Schritt (push -> stable) entfernt; die Ampel prueft
  nur noch (Ruff/pytest/Vite-Build), Rot heisst weiterhin: nicht deployen.
- deploy.sh: klont/resettet auf main statt stable.
- AGENTS §C, README (Entwicklung), DESIGN-2.0-Briefing: auf main-only
  umgeschrieben. Design-2.0-Briefing als ERLEDIGT markiert.
- SAVEPOINT v3.6.

Branches stable / design-2.0 / kernumbau-2026-07-23 werden nach diesem
Push geloescht (Inhalte vollstaendig in main).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 16:13:10 +02:00

28 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# Deploy für Rippy — deployt den aktuellen 'main'-Stand auf die VM.
# Single Source of Truth ist seit 24.07.2026 'main' (kein stable-Branch mehr);
# die Ampel prüft nur noch, befördert aber nichts. Vor dem Deploy also selbst
# sicherstellen, dass die Ampel für den zu deployenden Commit GRÜN ist.
#
# Nutzt einen EIGENEN Klon (~/notfall-rippy) und fasst Arcanes
# Projektverzeichnis (~/projects/rippy) NIE an — 22.07. gelernt: ein git-Klon
# im Arcane-Verzeichnis kollidiert mit dessen Sync (read-only .git-Objekte).
# Die .env gehört Arcane und wird nur GELESEN (für compose-Interpolation).
set -euo pipefail
VM="arcane@192.168.178.162"
DIENST="${1:-}" # optional: nur einen Dienst neu bauen, z.B. ./deploy.sh api
ssh "$VM" 'bash -s' <<REMOTE
set -euo pipefail
if [ ! -d ~/notfall-rippy/.git ]; then
git clone --branch main https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/rippy.git ~/notfall-rippy
fi
cd ~/notfall-rippy
git fetch origin main
git reset --hard origin/main
cp ~/projects/rippy/.env .env 2>/dev/null || echo "WARNUNG: keine .env in Arcanes Projektverzeichnis"
docker compose -p rippy up -d --build $DIENST
docker compose -p rippy ps --format 'table {{.Name}}\t{{.Status}}'
REMOTE