Files
iot-device-management-frontend/docker-compose.frontend.yml
lzh 2fa613fd44 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 一致)
2026-04-28 14:40:47 +08:00

36 lines
938 B
YAML

# ============================================
# 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'