Notfall-Deploy: eigener Klon (~/notfall-rippy, stable) statt Arcane-Verzeichnis
Ampel / ampel (push) Successful in 33s
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:
@@ -1,15 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# NOTFALL-Deploy für Rippy (seit Grün-Gate 22.07.2026 NICHT mehr der Normalweg!).
|
||||
# Normalweg: push → Ampel grün → CI befördert auf 'stable' → Arcane-GitSync deployt.
|
||||
# NOTFALL-Deploy für Rippy (Normalweg = Grün-Gate: push → Ampel grün → CI
|
||||
# befördert auf 'stable' → Arcane-GitSync deployt).
|
||||
# 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
|
||||
|
||||
VM="arcane@192.168.178.162"
|
||||
PFAD="~/projects/rippy"
|
||||
DIENST="${1:-}" # optional: nur einen Dienst neu bauen, z.B. ./deploy.sh rippy-ui
|
||||
DIENST="${1:-}" # optional: nur einen Dienst neu bauen, z.B. ./deploy.sh api
|
||||
|
||||
ssh "$VM" "cd $PFAD \
|
||||
&& git pull --ff-only origin main \
|
||||
&& docker compose -p rippy up -d --build $DIENST \
|
||||
&& docker compose -p rippy ps --format 'table {{.Name}}\t{{.Status}}'"
|
||||
ssh "$VM" 'bash -s' <<REMOTE
|
||||
set -euo pipefail
|
||||
if [ ! -d ~/notfall-rippy/.git ]; then
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user