Commit Graph

20 Commits

Author SHA1 Message Date
179f7ea85d Merge branch 'main' of git.waypeak.work:martial/martial-web
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-17 09:31:23 +08:00
d8730cc2c2 fix bugs 2025-12-17 09:31:14 +08:00
Developer
96f3b56eff fix: 修复 API 代理路径,去掉多余的 /api 前缀
All checks were successful
continuous-integration/drone/push Build is passing
🤖 Generated with Claude Code
2025-12-13 23:11:31 +08:00
1a99a45729 fix bugs
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-13 09:34:06 +08:00
669f29878b fix bugs
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-12 17:54:40 +08:00
5b806e29b7 fix bugs
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-11 16:56:19 +08:00
ab69968bda 修改前端页面
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-03 13:51:22 +08:00
aa6facf13a fix bugs
All checks were successful
continuous-integration/drone/push Build is passing
2025-11-30 12:15:21 +08:00
4e26a5089c fix bugs 2025-11-30 12:14:27 +08:00
n72595987@gmail.com
e77e73074a docs: 更新前端项目文档
All checks were successful
continuous-integration/drone/push Build is passing
- 修复字符编码问题(之前显示乱码)
- 添加完整的项目说明和技术栈介绍
- 记录 Docker 部署方法和 CI/CD 流程
- 添加常见问题解答(登录接口错误、容器启动失败等)
- 完善生产架构图和网络拓扑说明
- 补充开发规范和配置说明

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:24:05 +08:00
n72595987@gmail.com
a65daba7a9 fix: 修复 Drone 部署步骤使用正确的 Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
- 使用 Dockerfile.deploy 而非默认 Dockerfile
- 直接使用 docker run 而不是 docker-compose(避免依赖问题)
- 强制删除旧容器后创建新容器(确保使用新镜像)
- 修复镜像构建后容器没有更新的问题

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:05:01 +08:00
n72595987@gmail.com
134208d510 fix: 修复前端 nginx 配置和 API 基础路径
All checks were successful
continuous-integration/drone/push Build is passing
- 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
n72595987@gmail.com
cbf161048c fix: 修复前端 API 路径配置
All checks were successful
continuous-integration/drone/push Build is passing
- 移除 VITE_APP_API 的 /api 前缀
- BladeX 框架的端点已包含完整路径(/blade-auth, /blade-system 等)
- 修复登录时 "No endpoint POST /api/blade-auth/oauth/token" 错误

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:55:30 +08:00
n72595987@gmail.com
890218199b 修复前端 CI/CD:改为在部署服务器上构建镜像
All checks were successful
continuous-integration/drone/push Build is passing
问题:
- plugins/docker 尝试推送镜像到 Docker Hub
- 没有配置认证导致 'denied: requested access to resource is denied'

解决方案:
- 移除 plugins/docker 步骤
- 添加 drone-scp 步骤传输构建产物(dist、Dockerfile、nginx.conf)
- 在部署服务器上执行 docker build
- 直接使用本地镜像启动容器

优势:
- 不需要配置 Docker Hub 认证
- 不需要推送和拉取镜像,更快
- 镜像只存在于部署服务器本地
- 修正健康检查 URL 为 http://154.30.6.21/

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 18:04:56 +08:00
n72595987@gmail.com
36116e0973 修复前端构建:正确配置 BladeX 私有 npm registry
Some checks failed
continuous-integration/drone/push Build is failing
问题:
- Dockerfile 中 npm install 时未复制 .npmrc 文件
- 使用 --registry 参数覆盖了 .npmrc 中的私有 registry 配置
- 导致无法下载 @saber scope 的私有包,报 E401 认证错误

解决方案:
- Dockerfile: 在 npm install 前复制 .npmrc 文件
- Dockerfile: 移除 --registry 参数,使用 .npmrc 中的配置
- .drone.yml: 同样移除 --registry 参数

现在 npm 会正确使用:
- @saber 包 -> https://center.javablade.com (私有 registry)
- 其他包 -> npm 默认源

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:57:25 +08:00
n72595987@gmail.com
1d8d60ccaa 修复 Drone CI 配置:移除 host volumes 以解决 untrusted 仓库问题
Some checks failed
continuous-integration/drone/push Build is failing
- 移除 npm-cache volume 挂载
- 同一构建内的步骤仍可共享 node_modules
- 使用国内镜像加速依赖下载

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:45:39 +08:00
n72595987@gmail.com
40b1e48f11 添加 Drone CI/CD 前端自动化部署配置
Some checks failed
continuous-integration/drone/push Build encountered an error
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
n72595987@gmail.com
dd9927014e 修复Vite代理配置,解决前后端通信问题
1. 修复后端API代理配置
   - 更新代理目标端口从82改为8123(匹配实际后端端口)
   - 区分BladeX系统模块和业务模块的URL路径处理

2. 解决验证码接口404问题
   - 新增 ^/api/blade- 规则处理系统模块(blade-auth、blade-system等)
   - 系统模块需去掉 /api 前缀转发到后端 /blade-auth/* 路径
   - 业务模块保留 /api 前缀转发到后端 /api/martial/* 路径

3. 验证测试结果
   -  /api/blade-auth/oauth/captcha 验证码接口正常
   -  /api/blade-system/tenant/info 租户信息接口正常
   -  /api/martial/competition/list 比赛列表接口正常

现在前端登录页面可以正常获取验证码,所有API接口都能正确访问。

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:31:05 +08:00
0d4bbcd1f2 fix bug 2025-11-29 14:44:10 +08:00
135696ef93 fix bugs 2025-11-28 17:40:40 +08:00