chore(docker+register): refuse worktree deploys (relative bind mounts rehome rig data — register row 68); record row 67 (startup reconcile stores config but starts no InstanceActor) + row-48 postscript

This commit is contained in:
Joseph Doherty
2026-08-15 12:18:01 -04:00
parent 002299c400
commit ef876b38c5
3 changed files with 22 additions and 1 deletions
+8
View File
@@ -3,6 +3,14 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Same guard as docker/deploy.sh: relative bind mounts mean a worktree deploy silently
# rehomes every node's data directory to the worktree's copy, splitting rig state.
if [[ "$SCRIPT_DIR" == *"/.claude/worktrees/"* && "${SCADABRIDGE_ALLOW_WORKTREE_DEPLOY:-}" != "1" ]]; then
echo "ERROR: refusing to deploy from a git worktree ($SCRIPT_DIR)." >&2
echo "Deploy from the main checkout, or set SCADABRIDGE_ALLOW_WORKTREE_DEPLOY=1 to override." >&2
exit 1
fi
echo "=== ScadaBridge Env2 Docker Deploy ==="
# Reuse the primary build (same scadabridge:latest image, same network creation)