build(ci): 新增 Jenkinsfile + docker-compose 部署模板
- Jenkinsfile:master→PROD(172.17.16.14)、release/next→STAGING(172.17.16.7) 镜像推 172.17.16.7:5000/aiot-platform-ui,宿主机暴露 80 - docker-compose.frontend.yml:nginx 容器加入 1panel-network 走后端 aiot-gateway 反代
This commit is contained in:
35
docker-compose.frontend.yml
Normal file
35
docker-compose.frontend.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# ============================================
|
||||
# AIoT Platform UI (vben) - 部署 Compose
|
||||
# 由 Jenkins 在部署阶段同步到 ${DEPLOY_PATH}
|
||||
# 通过环境变量注入:
|
||||
# IMAGE_TAG 镜像版本号
|
||||
# REGISTRY_HOST 镜像仓库地址(含端口)
|
||||
# HOST_PORT 宿主机暴露端口
|
||||
# ============================================
|
||||
version: '3.8'
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: 1panel-network
|
||||
external: true
|
||||
|
||||
services:
|
||||
aiot-platform-ui:
|
||||
image: ${REGISTRY_HOST:-172.17.16.7:5000}/aiot-platform-ui:${IMAGE_TAG:-latest}
|
||||
container_name: aiot-platform-ui
|
||||
restart: on-failure:5
|
||||
ports:
|
||||
- "${HOST_PORT:-80}: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