#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" PROJECT_DIR="${ROOT_DIR}/center_dispatch" cd "$PROJECT_DIR" if [ ! -f .env ]; then cp .env.example .env echo "[INFO] .env created from .env.example, please set GIT_REPO_URL/OSS config." fi if ! command -v docker >/dev/null 2>&1; then echo "[ERROR] docker not found" exit 1 fi if ! docker compose version >/dev/null 2>&1; then echo "[ERROR] docker compose not available" exit 1 fi PORT=$(grep '^EDGE_DISPATCH_PORT=' .env | tail -n1 | cut -d'=' -f2- || true) PORT="${PORT:-8060}" docker compose up -d --build echo "[OK] center dispatch started" echo "[INFO] health: curl http://127.0.0.1:${PORT}/health"