Commit Graph
3 Commits
Author SHA1 Message Date
Z-WICK fa53b19052 fix: 修复 API 代理路径,去掉多余的 /api 前缀
🤖 Generated with Claude Code
2025-12-13 23:11:31 +08:00
Z-WICKandClaude 60b4144276 fix: 修复前端 nginx 配置和 API 基础路径
- nginx.conf: 将后端代理地址从 martial-backend 改为 172.21.0.1:8123(宿主机网关)
- .env.production: 移除 VITE_APP_API 的 /api 前缀
- 修复登录时 "No endpoint POST /api/blade-auth/oauth/token" 错误
- 修复容器启动失败 "host not found in upstream martial-backend" 错误

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:01:30 +08:00
Z-WICKandClaude d77baf0687 添加 Drone CI/CD 前端自动化部署配置
1. 新增 .drone.yml 配置文件
   - 自动安装 npm 依赖
   - 自动构建生产版本
   - 构建 Docker 镜像
   - 自动部署到生产服务器
   - 健康检查验证部署成功

2. 新增 Dockerfile
   - 多阶段构建:Node 编译 + Nginx 运行
   - 优化镜像体积,使用 alpine 基础镜像
   - 配置静态资源缓存
   - 添加健康检查

3. 新增 nginx.conf
   - 配置前端路由支持(Vue Router history 模式)
   - 代理 API 请求到后端服务
   - 优化 Gzip 压缩和静态资源缓存
   - 支持 BladeX 系统模块路径代理

现在推送代码后,前端会自动部署到生产环境!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:04:57 +08:00