Files
PlantAI-rag-new/backend/run.sh
T
jerryandClaude Fable 5 1e94de7464 PlantAI-rag-new 首次提交:文献知识工作台
- BFF 薄适配层(FastAPI,8090):QA 代理/SSE 中继/Neo4j 直连/抽取代理/会话持久化
- Vue3 前端:五相位检索流水线、文献来源与证据链、知识图谱、提取任务四 tab
- 四档响应式(桌面/笔记本/平板/手机)、深浅主题
- 81 个 FR 全部实现,测试追溯矩阵 81/81,后端 121 测/前端 156 测
- 真实凭据已脱敏,运行时配置在 backend/.env(不入 git)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 20:47:52 +08:00

22 lines
784 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
# run.sh —— 本地起 BFF(ARCHITECTURE.md §3:127.0.0.1:8090,占用则退 8091)。
# 用法:bash backend/run.sh
set -euo pipefail
cd "$(dirname "$0")"
PORT="${PORT:-8090}"
if ! command -v conda >/dev/null 2>&1; then
echo "run.sh: 未找到 conda,尝试直接使用当前 python 运行" >&2
exec python -m uvicorn app.main:app --host 127.0.0.1 --port "$PORT"
fi
if ! conda env list | awk '{print $1}' | grep -qx "plantai-bff"; then
echo "run.sh: conda 环境 plantai-bff 不存在" >&2
echo " 创建:conda create -n plantai-bff python=3.11 -y && conda activate plantai-bff && pip install -e '.[dev]'" >&2
exit 1
fi
exec conda run --no-capture-output -n plantai-bff \
python -m uvicorn app.main:app --host 127.0.0.1 --port "$PORT"