Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-weknora) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (latest, advisory) (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Build & Publish (dsh-weknora) / Publish to npm (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
2.1 KiB
2.1 KiB
title, tags, aliases, source
| title | tags | aliases | source | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 快速开发模式 |
|
|
快速开发模式说明.md |
快速开发模式
解决开发流程中,每次修改 app(后端)或 frontend(前端)代码后,都需要打包 Docker 镜像的问题,实现这两个模块的热更新。
本页是 开发指南 的补充,提供更详细的架构说明
使用方法
方式 1:Make 命令(推荐)
make dev-start # 终端 1:启动基础设施
make dev-app # 终端 2:启动后端
make dev-frontend # 终端 3:启动前端
方式 2:开发脚本
./scripts/dev.sh start # 终端 1
./scripts/dev.sh app # 终端 2
./scripts/dev.sh frontend # 终端 3
方式 3:一键启动
./scripts/quick-dev.sh
使用 Air 实现后端热重载
go install github.com/air-verse/air@latest
make dev-app # 自动检测 Air 并使用
架构对比
开发模式
本地后端 App (:8080) ← 本地前端 UI (:5173) → Docker 基础设施容器
(PostgreSQL/Redis/MinIO/Neo4j/DocReader)
- 后端/前端在本地直接运行,修改后秒级生效
- 基础设施仍使用 Docker 容器
生产模式
容器后端 App (:8080) ← 容器前端 UI (:80) → 基础设施容器
- 所有服务均运行在 Docker 容器中
- 每次修改需要重新构建镜像
效率对比
| 方式 | 每次修改耗时 |
|---|---|
| 旧方式(重建镜像) | 2-5 分钟 |
| 新方式(本地开发) | 后端 5-10 秒,前端实时热重载 |