chore: CRM-NEW baseline

This commit is contained in:
wangliang
2026-10-23 10:35:28 +08:00
commit aa499f6dbf
111 changed files with 15126 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# 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://192.168.31.61: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://192.168.31.61:4100/healthz
```
## 数据存储
- 业务数据:`crmnew-postgres` 的 `twenty` 库
- 文件:Docker volume `crm-new_twenty-data`(容器内 `.local-storage`)
## 注意
- `ENCRYPTION_KEY` / `APP_SECRET` 首次生成后**不要随意更换**,否则已加密数据(API key、连接配置)会失效。
- Twenty 首次启动会跑数据库迁移,约 1–3 分钟;`bootstrap.sh` 已内置等待。
- 如果需要旧项目的“数据飞轮”定制页,需要另做前端构建,本新栈暂不包含。