3bf1537ea0
P8-7: docker/README.md and docker-env2/README.md still listed the retired scadabridge-ldap container. Verified against the running config (central-node-*/appsettings.Central.json): both rigs actually bind to the local redundant GLAuth pair (zb-ldap-primary :3893 + zb-ldap-backup :3894 on host.docker.internal, source of truth scadaproj/infra/glauth-redundant), not the shared 10.100.0.35 GLAuth the infra/docker-compose.yml retirement comment claimed — that binding is itself stale, its serviceaccount password having been rotated away by SEC-36. Corrected all three docs to name the actual config each rig uses. P8-10: docker-env2 mapped no host port for the central gRPC control plane (docker/ maps 9013/9014->8083); added 9113/9114->8083 on both env2 centrals, matching the free 91XX slots, plus the README port table. teardown.sh's "preserved in node directories" data note predates the named-volume migration; rewrote it honestly and added an explicit `docker volume rm` recipe scoped to the env2 volume prefix, clearly labeled destructive, mirroring docker/teardown.sh's existing pattern. Gate: bash docker-env2/deploy.sh from this worktree — both centrals + both site-x nodes recreated and came up with the new 9113/9114 ports open. The simultaneous force-recreate split both pairs into independent 1-node clusters (expected: BootstrapGuard is default-OFF on docker-env2, per CLAUDE.md); a single restart of the b-side of each pair joined it to its already-formed peer and both pairs converged (central: memberCount=2, leader=central-a; site-x: node-b Welcome + singleton Younger). docker/ (the primary rig) was not touched.
24 lines
881 B
Bash
Executable File
24 lines
881 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
echo "=== ScadaBridge Env2 Docker Teardown ==="
|
|
|
|
echo "Stopping env2 application containers..."
|
|
docker compose -f "$SCRIPT_DIR/docker-compose.yml" down
|
|
|
|
echo ""
|
|
echo "Teardown complete."
|
|
echo "Node data (SQLite DBs) is preserved in named docker volumes; logs in node directories."
|
|
echo ""
|
|
echo "To also remove persistent data:"
|
|
echo " docker volume rm \$(docker volume ls -q --filter name=scadabridge-env2-)"
|
|
echo " rm -rf $SCRIPT_DIR/*/logs"
|
|
echo ""
|
|
echo "Env2 databases (ScadaBridgeConfig2 / ScadaBridgeMachineData2) remain on"
|
|
echo "the shared scadabridge-mssql. To drop them:"
|
|
echo " docker exec scadabridge-mssql /opt/mssql-tools18/bin/sqlcmd \\"
|
|
echo " -S localhost -U sa -P 'ScadaBridge_Dev1#' -C \\"
|
|
echo " -Q \"DROP DATABASE ScadaBridgeConfig2; DROP DATABASE ScadaBridgeMachineData2;\""
|