chore: ensure app joins 1panel-network"
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 5m22s
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 5m22s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user