Polish generic NAS deployment template

- Rework docker-compose-Nas.yaml as a QNAP/NAS-friendly generic template with placeholders for NAS IP, public domain, proxy, and secrets.

- Preserve QNAP-specific fixes including relative build context, api network alias, NAS persistent paths, and 127.0.0.1 health checks.

- Keep optional frpc profile while avoiding real server addresses or tokens in the reusable template.

- Replace residual deployment examples with generic your-domain.example, NAS_IP, PROXY_IP, and LAN_CIDR placeholders in README and Docker docs.
This commit is contained in:
2026-05-09 03:46:56 +08:00
parent 95a4678340
commit e159d18f01
4 changed files with 38 additions and 39 deletions

View File

@@ -106,7 +106,7 @@ docker-compose up -d --build
推荐链路:
```text
浏览器 https://sstwbg.example.com
浏览器 https://your-domain.example
-> 公网服务器 Nginx Proxy Manager
-> frps/frpc 映射端口
-> 本机 Docker web:4002
@@ -127,7 +127,7 @@ docker-compose --profile frpc up -d --build
docker-compose logs -f frpc
```
Nginx Proxy Manager 代理 `sstwbg.example.com` 时:
Nginx Proxy Manager 代理 `your-domain.example` 时:
- 代理目标指向 frpc 暴露的 `4002` 映射端口。
- 开启 `Websockets Support`,否则 `/api/speech/iat` 语音 WebSocket 会失败。

View File

@@ -85,7 +85,7 @@ curl http://127.0.0.1:4002/api/health
SESSION_SECRET=替换为足够长的随机字符串
SESSION_COOKIE_SECURE=true
TRUST_PROXY=true
CORS_ORIGIN=http://192.168.31.5:4002,https://sstwbg.example.com
CORS_ORIGIN=http://NAS_IP:4002,https://your-domain.example
```
启用 NAS 上的 frpc 隧道:
@@ -149,9 +149,9 @@ https://localhost:4443
## 公网域名反向代理
<!-- # XXX 公网部署新增:适用于本机 Docker 4002 端口经 frpc 映射到公网服务器,再由 Nginx Proxy Manager 绑定 sstwbg.example.com。 -->
<!-- # XXX 公网部署新增:适用于本机 Docker 4002 端口经 frpc 映射到公网服务器,再由 Nginx Proxy Manager 绑定 your-domain.example。 -->
如果使用 `本机 Docker 4002 -> frpc -> 公网服务器 Nginx Proxy Manager -> sstwbg.example.com`,推荐流程:
如果使用 `本机 Docker 4002 -> frpc -> 公网服务器 Nginx Proxy Manager -> your-domain.example`,推荐流程:
```bash
# XXX 使用公网 HTTPS 入口时compose 变量可从 shell 或 .env 覆盖。
@@ -166,7 +166,7 @@ docker-compose logs -f frpc
Nginx Proxy Manager 配置要点:
- `Domain Names` 使用 `sstwbg.example.com`
- `Domain Names` 使用 `your-domain.example`
- `Forward Hostname / IP` 指向 frpc 在公网服务器暴露的地址。
- `Forward Port` 填 frpc 暴露的端口,例如 `4002`
- 开启 `Websockets Support`,保证 `/api/speech/iat` 语音听写 WebSocket 可升级。
@@ -175,7 +175,7 @@ Nginx Proxy Manager 配置要点:
`# XXX` 公网正式访问只映射 `4002` 即可;不要把本机自签名 HTTPS 演示入口 `4443` 直接映射为公网域名入口。公网 HTTPS 应由 Nginx Proxy Manager 负责。
公网验收先访问 `https://sstwbg.example.com/api/health`再登录并测试报告保存、视频抽帧、AI 对话和语音听写。
公网验收先访问 `https://your-domain.example/api/health`再登录并测试报告保存、视频抽帧、AI 对话和语音听写。
## 生产部署前必须修改