9c010d2dc5
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.
27 lines
1.1 KiB
Bash
27 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# 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. ä.).
|
|
#
|
|
# 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"
|
|
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 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
|