Notfall-Deploy: eigener Klon (~/notfall-rippy, stable) statt Arcane-Verzeichnis
Ampel / ampel (push) Successful in 33s

22.07. gelernt: git-Klon im Arcane-Projektverzeichnis kollidiert mit
dessen Promote (read-only .git-Objekte). Arcane gehoert ~/projects/rippy
jetzt allein; .env wird nur gelesen.
This commit is contained in:
Hitonabi
2026-07-22 22:54:59 +02:00
parent 0b93276302
commit 9c010d2dc5
+20 -9
View File
@@ -1,15 +1,26 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# NOTFALL-Deploy für Rippy (seit Grün-Gate 22.07.2026 NICHT mehr der Normalweg!). # NOTFALL-Deploy für Rippy (Normalweg = Grün-Gate: push → Ampel grün → CI
# Normalweg: push → Ampel grün → CI befördert auf 'stable' → Arcane-GitSync deployt. # befördert auf 'stable' → Arcane-GitSync deployt).
# Dieses Skript nur nutzen, wenn der Automat klemmt (Arcane down o. ä.). # Dieses Skript nur nutzen, wenn der Automat klemmt (Arcane down o. ä.).
# Idempotent: EIN Compose-Projektname (rippy), EIN Pfad auf der VM. #
# Nutzt einen EIGENEN Klon (~/notfall-rippy, Branch stable) und fasst Arcanes
# Projektverzeichnis (~/projects/rippy) NIE an — 22.07. gelernt: ein git-Klon
# im Arcane-Verzeichnis kollidiert mit dessen Promote (read-only .git-Objekte).
# Die .env gehört Arcane und wird nur GELESEN (für compose-Interpolation).
set -euo pipefail set -euo pipefail
VM="arcane@192.168.178.162" VM="arcane@192.168.178.162"
PFAD="~/projects/rippy" DIENST="${1:-}" # optional: nur einen Dienst neu bauen, z.B. ./deploy.sh api
DIENST="${1:-}" # optional: nur einen Dienst neu bauen, z.B. ./deploy.sh rippy-ui
ssh "$VM" "cd $PFAD \ ssh "$VM" 'bash -s' <<REMOTE
&& git pull --ff-only origin main \ set -euo pipefail
&& docker compose -p rippy up -d --build $DIENST \ if [ ! -d ~/notfall-rippy/.git ]; then
&& docker compose -p rippy ps --format 'table {{.Name}}\t{{.Status}}'" git clone --branch stable https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/rippy.git ~/notfall-rippy
fi
cd ~/notfall-rippy
git fetch origin stable
git reset --hard origin/stable
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