Vereinheitliche Stack-Steuerung auf scripts/lab.sh

Eine einzige Quelle der Wahrheit fuer alle Stack-Aktionen statt
doppelt gepflegter Verb-Tabellen in Makefile und PowerShell-Wrapper.

- scripts/lab.sh: zentraler Dispatcher (bootstrap/up/redeploy/
  proxy-reload/down/logs/reset/reset-hard/reset-origin)
- workshop.ps1: switch-Tabelle kollabiert zu Delegation an lab.sh
  (kein --remove-orphans-Drift mehr zwischen den Oberflaechen)
- Makefile entfernt: WSL/Ubuntu bringt make nicht standardmaessig
  mit, Doku-Verben (make X) passten nicht zur PowerShell-Mehrheit
- bootstrap.sh: Logik inline, redundante bootstrap-unix.sh und
  bootstrap-wsl.sh entfernt
- Doku/HTML: alle 32 "make X" -> "./scripts/lab.sh X", Prosa
  (macOS-make-Hinweis, PowerShell-Wrapper-Text) angepasst

Verifiziert: bootstrap -> proxy-reload -> redeploy -> reset laufen
end-to-end gegen den Stack, Basisrouten und Done-Checks gruen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hkoeck
2026-05-31 22:30:16 +02:00
parent 79a13f0919
commit 4da7890119
11 changed files with 92 additions and 119 deletions
-36
View File
@@ -1,36 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"
if ! command -v docker >/dev/null 2>&1; then
echo "[error] docker nicht gefunden. Bitte Docker installieren (Linux/macOS) oder Docker Desktop + WSL Integration aktivieren."
exit 1
fi
if ! docker info >/dev/null 2>&1; then
echo "[error] Docker Daemon nicht erreichbar. Bitte Docker starten."
exit 1
fi
if ! "$SCRIPT_DIR/compose.sh" version >/dev/null 2>&1; then
echo "[error] Weder docker compose noch docker-compose verfuegbar."
exit 1
fi
if [[ ! -f .env ]]; then
cp .env.example .env
echo "[ok] .env aus .env.example erstellt"
else
echo "[skip] .env existiert bereits"
fi
"$SCRIPT_DIR/compose.sh" up -d --build
echo
echo "[ok] Workshop-Stack laeuft"
echo " Landing Page: http://localhost:8080"
echo " Test (backend-a): curl http://localhost:8080/service/a"
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
echo "[warn] scripts/bootstrap-wsl.sh ist deprecated. Nutze bitte scripts/bootstrap.sh"
"$SCRIPT_DIR/bootstrap-unix.sh"
+32 -1
View File
@@ -2,4 +2,35 @@
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
"$SCRIPT_DIR/bootstrap-unix.sh"
PROJECT_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"
if ! command -v docker >/dev/null 2>&1; then
echo "[error] docker nicht gefunden. Bitte Docker installieren (Linux/macOS) oder Docker Desktop + WSL Integration aktivieren."
exit 1
fi
if ! docker info >/dev/null 2>&1; then
echo "[error] Docker Daemon nicht erreichbar. Bitte Docker starten."
exit 1
fi
if ! "$SCRIPT_DIR/compose.sh" version >/dev/null 2>&1; then
echo "[error] Weder docker compose noch docker-compose verfuegbar."
exit 1
fi
if [[ ! -f .env ]]; then
cp .env.example .env
echo "[ok] .env aus .env.example erstellt"
else
echo "[skip] .env existiert bereits"
fi
"$SCRIPT_DIR/compose.sh" up -d --build
echo
echo "[ok] Workshop-Stack laeuft"
echo " Landing Page: http://localhost:8080"
echo " Test (backend-a): curl http://localhost:8080/service/a"
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
# Zentrale Steuer-Oberflaeche fuer den Workshop-Stack.
# Eine einzige Quelle der Wahrheit fuer alle Aktionen - der PowerShell-Wrapper
# (scripts/workshop.ps1) ruft genau dieses Skript in WSL auf.
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
usage() {
echo "usage: lab.sh {bootstrap|up|redeploy|proxy-reload|down|logs|reset|reset-hard|reset-origin}"
}
case "${1:-}" in
bootstrap) "$SCRIPT_DIR/bootstrap.sh" ;;
up) "$SCRIPT_DIR/compose.sh" up -d --build ;;
redeploy) "$SCRIPT_DIR/compose.sh" up -d --build --remove-orphans
"$SCRIPT_DIR/compose.sh" restart reverse-proxy ;;
proxy-reload) "$SCRIPT_DIR/compose.sh" restart reverse-proxy ;;
down) "$SCRIPT_DIR/compose.sh" down ;;
logs) "$SCRIPT_DIR/compose.sh" logs -f ;;
reset) "$SCRIPT_DIR/reset-lab.sh" ;;
reset-hard) "$SCRIPT_DIR/reset-lab.sh" --hard ;;
reset-origin) "$SCRIPT_DIR/reset-lab.sh" --hard-origin ;;
-h|--help|"") usage ;;
*) echo "[error] unbekannte Aktion: $1"; usage; exit 2 ;;
esac
+1 -11
View File
@@ -17,17 +17,7 @@ if (-not $repoWslPath) {
exit 1
}
switch ($Action) {
"bootstrap" { $linuxCommand = "./scripts/bootstrap.sh" }
"up" { $linuxCommand = "./scripts/compose.sh up -d --build" }
"redeploy" { $linuxCommand = "./scripts/compose.sh up -d --build --remove-orphans && ./scripts/compose.sh restart reverse-proxy" }
"proxy-reload" { $linuxCommand = "./scripts/compose.sh restart reverse-proxy" }
"down" { $linuxCommand = "./scripts/compose.sh down" }
"logs" { $linuxCommand = "./scripts/compose.sh logs -f" }
"reset" { $linuxCommand = "./scripts/reset-lab.sh" }
"reset-hard" { $linuxCommand = "./scripts/reset-lab.sh --hard" }
"reset-origin" { $linuxCommand = "./scripts/reset-lab.sh --hard-origin" }
}
$linuxCommand = "./scripts/lab.sh $Action"
$wslArgs = @()
if ($Distro) {