Refine workshop UI navigation and hardening guidance

This commit is contained in:
hkoeck
2026-03-07 19:21:13 +01:00
parent 314b63242f
commit 92a833ec50
10 changed files with 205 additions and 28 deletions
+17 -5
View File
@@ -14,17 +14,29 @@ echo "[info] Stoppe und entferne Container, Netzwerke, Volumes"
echo "[info] Entferne ungenutzte lokale Images"
docker image prune -f >/dev/null 2>&1 || true
if [[ "$HARD_RESET" == "--hard" ]]; then
if [[ "$HARD_RESET" == "--hard" || "$HARD_RESET" == "--hard-origin" ]]; then
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
if git rev-parse --verify HEAD >/dev/null 2>&1; then
echo "[info] Git Hard Reset: stelle Dateien auf HEAD zurueck"
git restore --source=HEAD --staged --worktree .
TARGET_REF="HEAD"
if [[ "$HARD_RESET" == "--hard-origin" ]]; then
echo "[info] Versuche auf origin/main zurueckzusetzen"
git fetch origin main --quiet >/dev/null 2>&1 || true
if git rev-parse --verify origin/main >/dev/null 2>&1; then
TARGET_REF="origin/main"
else
echo "[warn] origin/main nicht verfuegbar, fallback auf HEAD"
fi
fi
if git rev-parse --verify "$TARGET_REF" >/dev/null 2>&1; then
echo "[info] Git Hard Reset: stelle Dateien auf $TARGET_REF zurueck"
git restore --source="$TARGET_REF" --staged --worktree .
else
echo "[warn] Git-Repo ohne Commit-Historie, Datei-Restore wird uebersprungen"
fi
git clean -fd
else
echo "[warn] Kein Git-Repo erkannt, --hard wird uebersprungen"
echo "[warn] Kein Git-Repo erkannt, Git-Reset wird uebersprungen"
fi
fi
+2 -1
View File
@@ -1,5 +1,5 @@
param(
[ValidateSet("bootstrap", "up", "redeploy", "proxy-reload", "down", "logs", "reset", "reset-hard")]
[ValidateSet("bootstrap", "up", "redeploy", "proxy-reload", "down", "logs", "reset", "reset-hard", "reset-origin")]
[string]$Action = "bootstrap",
[string]$Distro = ""
)
@@ -26,6 +26,7 @@ switch ($Action) {
"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" }
}
$wslArgs = @()