docs: replace environment-specific IPs with localhost
This commit is contained in:
@@ -48,8 +48,8 @@ LibreDesk 创建会话 → Automation 分配给 AI Assistant
|
||||
| LibreDesk / Chatwoot | 9000 | 3001 |
|
||||
| Twenty | 3100 | 3000 |
|
||||
| bridge | 4100 | 4000 |
|
||||
| Postgres | 127.0.0.1:5440 | 127.0.0.1:5432 |
|
||||
| Redis | 127.0.0.1:6390 | 127.0.0.1:6379 |
|
||||
| Postgres | localhost:5440 | localhost:5432 |
|
||||
| Redis | localhost:6390 | localhost:6379 |
|
||||
|
||||
新栈 Postgres 内含三个库:`libredesk` / `twenty` / `bridge`;Redis 分 db:LibreDesk=2、Twenty=1、bridge=3。
|
||||
|
||||
|
||||
+9
-9
@@ -57,14 +57,14 @@ Email (inbox 2) / WhatsApp (inbox 3)
|
||||
|
||||
| 服务 | 地址 | 备注 |
|
||||
|---|---|---|
|
||||
| LibreDesk | `http://192.168.31.61:9000` | 管理端 / 工作台 |
|
||||
| Twenty CRM | `http://192.168.31.61:3100` | CRM |
|
||||
| bridge | `http://192.168.31.61:4100` | 内部工具/健康检查 |
|
||||
| Widget 测试页 | `http://192.168.31.61:8088/demo.html` | 本机测试用 |
|
||||
| LibreDesk | `http://localhost:9000` | 管理端 / 工作台 |
|
||||
| Twenty CRM | `http://localhost:3100` | CRM |
|
||||
| bridge | `http://localhost:4100` | 内部工具/健康检查 |
|
||||
| Widget 测试页 | `http://localhost:8088/demo.html` | 本机测试用 |
|
||||
| 公网入口 | `.env` 的 `PUBLIC_BASE_URL` | Cloudflare Quick Tunnel,**URL 会变** |
|
||||
| Postgres | `127.0.0.1:5440` | 仅本机 |
|
||||
| Redis | `127.0.0.1:6390` | 仅本机 |
|
||||
| IMAP proxy | `127.0.0.1:1993` | 仅本机 |
|
||||
| Postgres | `localhost:5440` | 仅本机 |
|
||||
| Redis | `localhost:6390` | 仅本机 |
|
||||
| IMAP proxy | `localhost:1993` | 仅本机 |
|
||||
|
||||
---
|
||||
|
||||
@@ -190,8 +190,8 @@ Cloudflare Quick Tunnel URL 每次重启可能变化,需要同步:
|
||||
### 7.1 基础健康
|
||||
|
||||
```bash
|
||||
curl -s http://127.0.0.1:4100/healthz
|
||||
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:3100/healthz
|
||||
curl -s http://localhost:4100/healthz
|
||||
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:3100/healthz
|
||||
cd bridge && npm test
|
||||
```
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
```bash
|
||||
bash scripts/bootstrap.sh # LibreDesk 已启动
|
||||
bash scripts/start-tools.sh # 另开终端,tools 服务 :4010
|
||||
curl -s http://127.0.0.1:4100/healthz
|
||||
curl -s http://localhost:4100/healthz
|
||||
```
|
||||
|
||||
## 1. AI Provider(必须先配)
|
||||
@@ -33,7 +33,7 @@ curl -s http://127.0.0.1:4100/healthz
|
||||
|
||||
本栈已把旧 `customer-service-kb` 导入为**帮助中心文章**(而不是 snippets),原因:只有文章能被 AI 引用(`[[cite:id]]`),并且同时进入帮助中心站内搜索。
|
||||
|
||||
公开地址:`http://192.168.31.61:9000/hc/yehwang-help/en`(1 个帮助中心 / 9 个 collection / 108 篇文章,全部 `published + ai_enabled`)。
|
||||
公开地址:`http://localhost:9000/hc/yehwang-help/en`(1 个帮助中心 / 9 个 collection / 108 篇文章,全部 `published + ai_enabled`)。
|
||||
|
||||
重新导入(幂等):
|
||||
|
||||
@@ -50,7 +50,7 @@ node scripts/import-kb-helpcenter.js # 登录 System 并导入
|
||||
3. **API 批量导入**(迁移旧 KB 时用):
|
||||
|
||||
```bash
|
||||
curl -X POST http://192.168.31.61:9000/api/v1/ai/snippets \
|
||||
curl -X POST http://localhost:9000/api/v1/ai/snippets \
|
||||
-H "Authorization: token ${LIBREDESK_API_KEY}:${LIBREDESK_API_SECRET}" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"title":"Minimum order","content":"The minimum order value is €30.","enabled":true}'
|
||||
@@ -88,7 +88,7 @@ curl -X POST http://192.168.31.61:9000/api/v1/ai/snippets \
|
||||
| Copilot / Generate reply | 开 | 开 | 开 | 开 |
|
||||
| Require agent approval | 否 | 否 | 否 | 否 |
|
||||
|
||||
`GET http://127.0.0.1:4100/tools/manifest`(带 `X-Tools-Key`)会输出每个工具的完整 JSON Schema,可直接复制。
|
||||
`GET http://localhost:4100/tools/manifest`(带 `X-Tools-Key`)会输出每个工具的完整 JSON Schema,可直接复制。
|
||||
|
||||
## 4. 创建 AI Assistant
|
||||
|
||||
@@ -152,11 +152,11 @@ Assistant **只有被分配给会话才会回复**。配置:
|
||||
```html
|
||||
<script>
|
||||
window.LibredeskSettings = {
|
||||
baseURL: 'http://192.168.31.61:9000',
|
||||
baseURL: 'http://localhost:9000',
|
||||
inboxID: 'YOUR_INBOX_UUID'
|
||||
};
|
||||
</script>
|
||||
<script async src="http://192.168.31.61:9000/widget.js"></script>
|
||||
<script async src="http://localhost:9000/widget.js"></script>
|
||||
```
|
||||
|
||||
### 登录用户身份锚定(已实现)
|
||||
@@ -220,7 +220,7 @@ const payload = {
|
||||
- [ ] widget 能开聊,收到 AI 回复
|
||||
- [ ] 未验证时问订单 → AI 引导验证;验证后能查单
|
||||
- [ ] 说“我要人工” → handoff 到 Support 团队
|
||||
- [ ] `curl -s http://127.0.0.1:4100/healthz` 正常
|
||||
- [ ] `curl -s http://localhost:4100/healthz` 正常
|
||||
|
||||
## 10. 常见问题
|
||||
|
||||
|
||||
+5
-5
@@ -27,9 +27,9 @@ docker compose logs -f --tail=100 twenty-server
|
||||
docker compose logs -f --tail=100 bridge
|
||||
|
||||
# 健康
|
||||
curl -s http://192.168.31.61:9000/health
|
||||
curl -s http://192.168.31.61:3100/healthz
|
||||
curl -s http://192.168.31.61:4100/healthz
|
||||
curl -s http://localhost:9000/health
|
||||
curl -s http://localhost:3100/healthz
|
||||
curl -s http://localhost:4100/healthz
|
||||
```
|
||||
|
||||
## 内容与 AI 配置脚本
|
||||
@@ -90,7 +90,7 @@ node scripts/configure-email.js
|
||||
node scripts/add-email-inbox.js
|
||||
|
||||
# 本地静态测试页(widget 接入演示)
|
||||
bash scripts/serve-web.sh # http://192.168.31.61:8088/demo.html
|
||||
bash scripts/serve-web.sh # http://localhost:8088/demo.html
|
||||
|
||||
# 端到端验证 widget JWT(登录用户可查订单)
|
||||
node scripts/e2e-widget-jwt.js "Can you check the status of my order SO-1?"
|
||||
@@ -159,7 +159,7 @@ ss -ltnp | grep -E ':(9000|3100|4100|5440|6390)\s'
|
||||
| 现象 | 原因 | 处理 |
|
||||
|---|---|---|
|
||||
| 容器启动报 `database "xxx" does not exist` | 首次初始化脚本未执行 | `docker exec crmnew-postgres psql -U crmnew -d postgres -c 'CREATE DATABASE xxx;'` |
|
||||
| bridge 健康检查 `connection refused` | 容器内 `localhost` 解析到 IPv6 | 健康检查已改用 `127.0.0.1` |
|
||||
| bridge 健康检查 `connection refused` | 容器内 `localhost` 解析到 IPv6 | 健康检查固定用回环地址(避免 IPv6) |
|
||||
| LibreDesk 反复重启 | System 密码不满足强度(10–72 位、大小写+数字+特殊字符) | 改 `.env` 的 `LIBREDESK_SYSTEM_USER_PASSWORD` 后重建 |
|
||||
| 工具 401 | `X-Tools-Key` 与 `TOOLS_SHARED_KEY` 不一致 | 核对 `.env` 与 LibreDesk 工具 Header |
|
||||
| 工具 403 verification_required | 联系人未验证 | 先走平台 OTP 验证,或该工具不需要验证时关闭 `requires_verification` |
|
||||
|
||||
Reference in New Issue
Block a user