支持 Docker 启动 Web 测试服务

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Ubuntu 2026-08-03 18:49:17 +00:00
parent 1748d2d66a
commit 70f69b0683
2 changed files with 33 additions and 2 deletions

View File

@ -25,6 +25,35 @@ docker compose run --rm test
docker compose run --rm build docker compose run --rm build
``` ```
## Docker 启动 Web 测试服务
构建镜像并在后台启动:
```bash
docker compose up --build -d
```
浏览器访问 <http://127.0.0.1:1420>。查看状态和日志:
```bash
docker compose ps
docker compose logs -f web
```
停止服务:
```bash
docker compose down
```
默认只监听本机回环地址。需要让局域网测试设备访问时,显式设置监听地址和端口:
```bash
WEB_BIND_ADDRESS=0.0.0.0 WEB_PORT=1420 docker compose up --build -d
```
开放到局域网前请确认主机防火墙和测试网络范围Web 预览不包含认证能力。
## 当前范围 ## 当前范围
- 展示多 Teamserver 连接状态和独立工作区。 - 展示多 Teamserver 连接状态和独立工作区。

View File

@ -1,5 +1,6 @@
services: services:
test: test:
profiles: ["tools"]
build: build:
context: . context: .
target: test target: test
@ -8,15 +9,16 @@ services:
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
build: build:
profiles: ["tools"]
build: build:
context: . context: .
target: build target: build
preview: web:
build: build:
context: . context: .
target: preview target: preview
ports: ports:
- "127.0.0.1:8080:8080" - "${WEB_BIND_ADDRESS:-127.0.0.1}:${WEB_PORT:-1420}:8080"
read_only: true read_only: true
tmpfs: tmpfs:
- /tmp - /tmp