#!/bin/bash
set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

# 解析参数
REBUILD_FLAG=""
if [[ "$1" == "--rebuild" || "$1" == "-r" ]]; then
    REBUILD_FLAG="--rebuild"
    echo "[01] 启用强制重新构建模式"
fi

echo "[01] 启动所有服务..."
bash "$SCRIPT_DIR/common/start-all.sh" $REBUILD_FLAG

echo "[01] 等待服务就绪..."
sleep 5

echo "[01] 检查服务状态..."
docker ps | grep argus-ftp
docker ps | grep argus-prometheus
docker ps | grep argus-grafana
docker ps | grep argus-metric-test-node

echo "[01] 所有服务已启动"

