Files
AI-Testing/start.sh
2026-04-12 20:06:09 +08:00

26 lines
690 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
echo "==> 构建并启动所有服务..."
docker compose up --build -d
echo "==> 当前容器状态"
docker compose ps
if [[ -f ".env" ]]; then
echo "==> 检测到 .env已可使用千问 AI 模块"
else
echo "==> 未检测到 .envAI 模块需要配置 QWEN_API_KEY"
fi
echo "==> 健康检查(端口与 docker-compose.yml 一致:后端 8866前端 Nginx 8173"
echo "backend: $(curl -sf http://localhost:8866/health || echo 'unreachable')"
echo "frontend (nginx): $(curl -sf http://localhost:8173/health || echo 'unreachable')"
echo "==> 启动完成"