build(ci): 新增 CI/CD 配置 + 修复 3 个部署 bug

新增:
- Jenkinsfile:master→PROD(172.17.16.14)、release/next→STAGING(172.17.16.7)
  镜像推 172.17.16.7:5000/aiot-iot-ui,宿主机暴露 90
- docker-compose.frontend.yml:nginx 容器加入 1panel-network
- 根 Dockerfile + apps/web-antd/nginx.conf:与 vben 前端结构对齐
  nginx 反代 /admin-api → http://aiot-gateway:48080

修复:
- .env.production VITE_GLOB_API_URL 硬编码 127.0.0.1 → /admin-api(走 nginx 反代)
- scripts/deploy/Dockerfile 引用不存在的 playground/dist → apps/web-antd/dist
  并改用 turbo 单 filter 构建(与根 Dockerfile 一致)
This commit is contained in:
lzh
2026-04-28 14:40:47 +08:00
parent e783d40a31
commit 2fa613fd44
6 changed files with 503 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ COPY . /app
# 安装依赖
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build --filter=\!./docs
RUN pnpm exec turbo build --filter=@vben/web-antd --concurrency=1
RUN echo "Builder Success 🎉"
@@ -25,8 +25,8 @@ FROM nginx:stable-alpine AS production
RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf \
&& rm -rf /etc/nginx/conf.d/default.conf
# 复制构建产物
COPY --from=builder /app/playground/dist /usr/share/nginx/html
# 复制构建产物vben monorepo 主入口为 apps/web-antd
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html
# 复制 nginx 配置
COPY --from=builder /app/scripts/deploy/nginx.conf /etc/nginx/nginx.conf