start.sh
28 lignes · 761 octets
#!/usr/bin/env bash # Resume a previously-stopped testbed. Skips build, seed, and trust config — # state from the last setup is preserved. # # Use ./scripts/setup.sh for the first boot or after a teardown. set -euo pipefail cd "$(dirname "$0")/.." echo "==> docker compose start (resume paused containers)" docker compose start echo "==> Waiting for /health on the three apps" for port in 3001 3002 3003; do echo -n " http://localhost:$port/health ... " # Up to 30 s of polling — typical resume is < 5 s but cold disk caches # on slow hosts may need longer. for _ in $(seq 1 30); do if curl -fsS "http://localhost:$port/health" >/dev/null 2>&1; then echo "ok" break fi sleep 1 done done echo "==> Testbed resumed."
GitRust