feat: add new file
This commit is contained in:
25
start.sh
Executable file
25
start.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/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 "==> 未检测到 .env(AI 模块需要配置 QWEN_API_KEY)"
|
||||
fi
|
||||
|
||||
echo "==> 健康检查"
|
||||
echo "backend: $(curl -s http://localhost:8001/health || echo 'unreachable')"
|
||||
echo "frontend proxy: $(curl -s http://localhost:5173/health || echo 'unreachable')"
|
||||
|
||||
echo "==> 启动完成"
|
||||
Reference in New Issue
Block a user