Files
crm-ai/twenty/README.md

51 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Twenty 部署说明(全新实例 :3100)
本目录**不需要源码**:使用官方镜像 `twentycrm/twenty:v2.30.1`,由顶层 `docker-compose.yml` 编排。
## 与旧实例的区别
| | 旧实例(crm-ai-demo) | 新实例(crm-new) |
|---|---|---|
| 端口 | 3000 | **3100** |
| 数据库 | crm-postgres / `twenty` | crmnew-postgres:5440 / `twenty` |
| Redis | crm-redis db1 | crmnew-redis db1 |
| 镜像 | `twentycrm/twenty:flywheel`(定制前端) | `twentycrm/twenty:v2.30.1`(官方) |
| 数据 | 旧数据保留 | **全新,无旧数据** |
## 首次使用
1. 浏览器打开 `http://localhost:3100`
2. 注册第一个 workspace(邮箱 + 密码),工作区名建议 `Yehwang`
3. 进入 **Settings → Developers → API Keys** 创建 API key(JWT 形式)
4. 把 API key 和 workspace id 写入顶层 `.env`:
```ini
TWENTY_WORKSPACE_ID=<workspace uuid>
TWENTY_API_KEY=<jwt>
```
5. 重建 bridge 让配置生效:
```bash
cd /home/dev/code/crm-new
docker compose up -d --force-recreate bridge
```
6. 验证工具:
```bash
bash scripts/smoke.sh
curl -s http://localhost:4100/healthz
```
## 数据存储
- 业务数据:`crmnew-postgres` 的 `twenty` 库
- 文件:Docker volume `crm-new_twenty-data`(容器内 `.local-storage`)
## 注意
- `ENCRYPTION_KEY` / `APP_SECRET` 首次生成后**不要随意更换**,否则已加密数据(API key、连接配置)会失效。
- Twenty 首次启动会跑数据库迁移,约 1–3 分钟;`bootstrap.sh` 已内置等待。
- 如果需要旧项目的“数据飞轮”定制页,需要另做前端构建,本新栈暂不包含。