支持 Docker 启动 Web 测试服务
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
parent
1748d2d66a
commit
70f69b0683
29
README.md
29
README.md
@ -25,6 +25,35 @@ docker compose run --rm test
|
||||
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 连接状态和独立工作区。
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
services:
|
||||
test:
|
||||
profiles: ["tools"]
|
||||
build:
|
||||
context: .
|
||||
target: test
|
||||
@ -8,15 +9,16 @@ services:
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
build:
|
||||
profiles: ["tools"]
|
||||
build:
|
||||
context: .
|
||||
target: build
|
||||
preview:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
target: preview
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
- "${WEB_BIND_ADDRESS:-127.0.0.1}:${WEB_PORT:-1420}:8080"
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
|
||||
Loading…
Reference in New Issue
Block a user