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:
35
docker-compose.frontend.yml
Normal file
35
docker-compose.frontend.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# ============================================
|
||||
# AIoT IoT UI - 部署 Compose
|
||||
# 由 Jenkins 在部署阶段同步到 ${DEPLOY_PATH}
|
||||
# 通过环境变量注入:
|
||||
# IMAGE_TAG 镜像版本号
|
||||
# REGISTRY_HOST 镜像仓库地址(含端口)
|
||||
# HOST_PORT 宿主机暴露端口
|
||||
# ============================================
|
||||
version: '3.8'
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: 1panel-network
|
||||
external: true
|
||||
|
||||
services:
|
||||
aiot-iot-ui:
|
||||
image: ${REGISTRY_HOST:-172.17.16.7:5000}/aiot-iot-ui:${IMAGE_TAG:-latest}
|
||||
container_name: aiot-iot-ui
|
||||
restart: on-failure:5
|
||||
ports:
|
||||
- "${HOST_PORT:-90}:80"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O- http://localhost/ >/dev/null 2>&1 || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
start_period: 15s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256m
|
||||
cpus: '0.5'
|
||||
Reference in New Issue
Block a user