docs/wiki/开发部署/开发指南.md
如果需要频繁修改 app 或 frontend 代码,不需要每次都重新构建 Docker 镜像,可以使用本地开发模式。
详细的开发模式说明参见 快速开发模式
# 终端 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 |
| Jaeger UI | http://localhost:16686 |
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 # 启动生产环境
make dev-startvite.config.ts 中的代理配置sh scripts/build_images.sh -d更多排查建议参见 常见问题