chore: ensure app joins 1panel-network"
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 5m22s

This commit is contained in:
lzh
2025-12-18 15:05:45 +08:00
parent 179afea2e1
commit 3260ec0e99
2 changed files with 6 additions and 5 deletions

View File

@@ -43,10 +43,11 @@ jobs:
git log -1 --format='%h - %s'
# 2. 准备 Docker 网络
# 确保所有服务在同一个网络下,方便互相访问 (e.g. 前端反向代理到后端)
- name: Create Docker Network
# 使用 1Panel 的默认网络,确保所有服务在同一个网络下,方便互相访问
- name: Check Docker Network
run: |
docker network create aiot-net || true
# 检查 1panel-network 是否存在,如果不存在则创建
docker network inspect 1panel-network > /dev/null 2>&1 || docker network create 1panel-network || true
# 3. 构建并部署
- name: Build & Deploy Web UI
@@ -93,7 +94,7 @@ jobs:
# -p: 端口映射 宿主机:容器
docker run -d \
--name $CONTAINER_NAME \
--network aiot-net \
--network 1panel-network \
--restart always \
-p ${HOST_PORT}:80 \
"${IMAGE_NAME}:latest"