1778c5ac7b
This commit removes Jaeger tracing support from the project, including the associated Docker configurations, Go modules, and middleware. The changes simplify the codebase by eliminating unused tracing functionality, which was previously integrated for observability. Documentation and scripts have also been updated to reflect the removal of Jaeger references.
2.6 KiB
2.6 KiB
title, tags, aliases, source
| title | tags | aliases | source | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 开发指南 |
|
|
开发指南.md |
开发指南
快速开发模式(推荐)
如果需要频繁修改 app 或 frontend 代码,不需要每次都重新构建 Docker 镜像,可以使用本地开发模式。
详细的开发模式说明参见 快速开发模式
方式一:使用 Make 命令(推荐)
# 终端 1:启动基础设施
make dev-start
# 终端 2:启动后端
make dev-app
# 终端 3:启动前端
make dev-frontend
方式二:使用脚本命令
./scripts/dev.sh start # 启动基础设施
./scripts/dev.sh app # 启动后端
./scripts/dev.sh frontend # 启动前端
访问地址
| 服务 | 地址 |
|---|---|
| 前端开发服务器 | http://localhost:5173 |
| 后端 API | http://localhost:8080 |
| PostgreSQL | localhost:5432 |
| Redis | localhost:6379 |
| MinIO Console | http://localhost:9001 |
| Neo4j Browser | http://localhost:7474 |
使用 Air 实现后端热重载
go install github.com/air-verse/air@latest
air # 修改 Go 代码后自动重新编译和重启
前端独立开发
cd frontend
npm run dev # 连接到 http://localhost:8080 的后端 API
生产环境部署
sh scripts/build_images.sh # 构建所有镜像
sh scripts/start_all.sh # 启动生产环境
常见问题
- 启动 dev-app 时报错连接不到数据库:确保先运行了
make dev-start - 前端 CORS 错误:检查
vite.config.ts中的代理配置 - DocReader 需要重新构建:
sh scripts/build_images.sh -d
更多排查建议参见 常见问题