Commit Graph

3 Commits

Author SHA1 Message Date
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