Skip to content

本地部署 FinSight-AI 并输出可复现的启动流程 - #1

Merged
juanjuandog merged 2 commits into
juanjuandog:masterfrom
4tj:sho-535-local-daemon-startup-guide
May 24, 2026
Merged

本地部署 FinSight-AI 并输出可复现的启动流程#1
juanjuandog merged 2 commits into
juanjuandog:masterfrom
4tj:sho-535-local-daemon-startup-guide

Conversation

@4tj

@4tj 4tj commented May 23, 2026

Copy link
Copy Markdown
Contributor

背景

让 FinSight-AI 可以按 README 在本地以后台服务方式启动,并记录可复现的本地部署流程。

改动摘要

  • README.md: 补充 Docker/Compose 前置依赖、克隆到 ~/work、后台启动、服务管理、访问地址、环境变量、常见问题与可变 Demo 输出说明。
  • README.zh-CN.md: 同步中文本地启动指南和后台服务命令。

数据库变更

无 DB 变更。

验证

  • docker compose up -d --build: ✅ 全栈后台启动成功,backend/ai-service/postgres/rabbitmq 均 healthy。
  • curl http://localhost:8080/actuator/health: ✅ {"status":"UP","groups":["liveness","readiness"]}
  • curl http://localhost:8001/health: ✅ {"status":"ok","embeddingModel":"hashing-ngram-384","ollamaModel":"qwen2.5:7b"}
  • curl http://localhost:8080: ✅ Dashboard HTML 返回成功。
  • ./scripts/quick-demo.sh: ✅ 完成 ingestion/metrics/document-index/intelligence/analysis/evaluation;本次 documentCount=6、statementCount=3、metricCount=60、chunkCount=6、eventCount=20、totalCases=3。
  • git diff --check: ✅
  • dockerized mvn test: ✅ BUILD SUCCESS;3 个可执行测试通过,Testcontainers infrastructure smoke 在 Maven 容器内因 Docker API negotiation 被跳过(已用真实 docker compose 健康检查覆盖启动验证)。

相关 issue

SHO-535

@4tj 4tj left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA review — PASSED

说明:本评论由 Reviewer agent 留下;GitHub 限制无法 self-approve(PR 作者与 review 账号同为 4tj)。最终 PASSED 结论以 multica issue SHO-536 上的回流评论为准。

复现验证(本地 worktree,新拉取的 PR head 129e6b1):

  • docker compose up -d --build → 7 个容器全部 Up,backend/ai-service/postgres/rabbitmq healthy。
  • curl http://localhost:8080/actuator/health{"status":"UP","groups":["liveness","readiness"]}
  • curl http://localhost:8001/health{"status":"ok","embeddingModel":"hashing-ngram-384","ollamaModel":"qwen2.5:7b"}
  • curl http://localhost:8080 → HTTP 200(Dashboard)。
  • http://localhost:9200 / :15672 / :9001 全部可访问。
  • ./scripts/quick-demo.sh:依次跑通 ingestion → metrics → document-index → intelligence → analysis → evaluation。本次 metricCount=60riskSignalCount=2chunkCount=6eventCount=20entityCount=36relationCount=47totalCases=3 — 与新 README 表格一致。RAG 分数本次 0.55,验证了 README 新加的"scores that vary as public source data changes"提示。

文档审核:

  • 中英文版同步更新,前置依赖、克隆/启动/停止/重启/日志命令、URL 表、credentials、env var 表、Troubleshooting 一致。
  • docker-compose.yml 中实际默认值(finsight/finsightfinsight/finsight123OLLAMA_BASE_URL=http://host.docker.internal:11434OLLAMA_MODEL=qwen2.5:7b)与 README 表格一致。
  • application-prod.ymlFINSIGHT_SCHEDULER_ENABLED=falseFINSIGHT_SCHEDULER_BATCH_LIMIT=20FINSIGHT_STOCK_UNIVERSE_FREE_PROVIDER_ENABLED=trueFINSIGHT_AI_SERVICE_ENABLED=true 与 README 表格一致。
  • ai-service/app/main.pyOLLAMA_TIMEOUT_SECONDS 默认 45,与 README 一致。
  • 把原 ./scripts/run-full-stack.sh(前台启动 backend/redis/es/minio)替换为 docker compose up -d --build(detached 全栈)正确响应了 SHO-535"后台常驻部署"的核心诉求。

DB 变更检测:无 migration / schema / SQL 文件,diff 中无 DDL 关键字。

Playwright / E2E:免跑。本 PR 仅修改 README.md / README.zh-CN.md 两个文件,零代码改动、零业务行为变更,按 CLAUDE.md 流程对纯文档 PR 允许跳过 Playwright;改为以 docker compose ps + 健康检查 + quick-demo.sh 端到端复现完成验收。

CI 状态:

  • .github/workflows/ci.yml 在 master 上历史 run 为 success。
  • PR head 129e6b1 的 CI run 状态为 action_required(GitHub 对 fork PR 首次贡献者的标准门禁),需要 upstream owner 在 Actions 页面点 "Approve and run workflows" 才会触发 backend mvn testbash -n scripts/*.sh。这是 GitHub 默认安全策略,不是 PR 本身的问题。
  • 我已在本地执行 bash -n scripts/*.sh 通过;本 PR 未触碰 backend / ai-service 代码,对单测无影响。Dev 提供的 dockerized mvn test BUILD SUCCESS 仍然有效。

Fork PR 配置:base juanjuandog:master,head 4tj:sho-535-local-daemon-startup-guide,state OPEN,mergeable,配置正确,可直接走 squash/merge 流程。

Dev 自述"DONE_WITH_CONCERNS"的唯一隐忧(fork PR / CI 触发)已确认为 GitHub 默认行为而非缺陷,未发现额外隐忧。可以合并。

@juanjuandog
juanjuandog merged commit 10c5eec into juanjuandog:master May 24, 2026
2 checks passed
@juanjuandog

Copy link
Copy Markdown
Owner

已合并,感谢这次贡献,补充了本地后台部署和可复现启动流程,对项目可用性帮助很大。辛苦了!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants