refactor: DevTools → ethend 重命名 + 加入生产环境
- 目录 devtools/ → ethend/ - CLI 脚本 devtools.sh/.bat → ethend.sh/.bat - 环境变量 DEVTOOLS_PORT → ETHEND_PORT - docker-compose.yml 新增 ethend 服务(生产部署) - 同步更新全部文档、注释和配置文件 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Cyrene 部署指南
|
||||
|
||||
三种方式启动开发环境:**DevTools 一键**(推荐)、**手动逐服务**、**Docker Compose**。
|
||||
三种方式启动开发环境:**ethend 一键**(推荐)、**手动逐服务**、**Docker Compose**。
|
||||
|
||||
---
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
| 依赖 | 版本 | 用途 |
|
||||
|------|------|------|
|
||||
| Go | 1.21+ | 编译后端服务 |
|
||||
| Node.js | 20+ (LTS) | 前端 / DevTools |
|
||||
| Node.js | 20+ (LTS) | 前端 / ethend |
|
||||
| Docker & Docker Compose | — | 数据库 & 基础设施 |
|
||||
| Git Bash (Windows) | — | 运行 devtools.sh |
|
||||
| Git Bash (Windows) | — | 运行 ethend.sh |
|
||||
|
||||
### Windows 额外要求
|
||||
|
||||
@@ -23,14 +23,14 @@ Windows 提供两个启动脚本:
|
||||
|
||||
| 脚本 | 终端 | 适用场景 |
|
||||
|------|------|----------|
|
||||
| `devtools.bat` | CMD / PowerShell | 双击运行,无需 Git Bash |
|
||||
| `devtools.sh` | Git Bash | 完整 CLI 体验(推荐) |
|
||||
| `ethend.bat` | CMD / PowerShell | 双击运行,无需 Git Bash |
|
||||
| `ethend.sh` | Git Bash | 完整 CLI 体验(推荐) |
|
||||
|
||||
两者支持相同的命令集,日常开发推荐使用 Git Bash 运行 `./devtools.sh`;快速启动可直接双击 `devtools.bat`。
|
||||
两者支持相同的命令集,日常开发推荐使用 Git Bash 运行 `./ethend.sh`;快速启动可直接双击 `ethend.bat`。
|
||||
|
||||
---
|
||||
|
||||
## 方式一:DevTools 一键启动(推荐)
|
||||
## 方式一:ethend 一键启动(推荐)
|
||||
|
||||
### 1. 配置环境变量
|
||||
|
||||
@@ -44,13 +44,13 @@ cp backend/.env.example backend/.env
|
||||
### 2. 启动数据库
|
||||
|
||||
```bash
|
||||
./devtools.sh db:start
|
||||
./ethend.sh db:start
|
||||
```
|
||||
|
||||
### 3. 编译并启动全部服务
|
||||
|
||||
```bash
|
||||
./devtools.sh start --build
|
||||
./ethend.sh start --build
|
||||
```
|
||||
|
||||
首次运行会编译全部后端 Go 服务(约 1-2 分钟),之后按依赖顺序启动全部服务,每步等待健康检查通过。
|
||||
@@ -59,10 +59,10 @@ cp backend/.env.example backend/.env
|
||||
|
||||
| 地址 | 说明 |
|
||||
|------|------|
|
||||
| `http://localhost:9090` | DevTools 管理面板 |
|
||||
| `http://localhost:9090` | ethend 管理面板 |
|
||||
| `http://localhost:5173` | 前端聊天界面 |
|
||||
|
||||
详细 CLI 用法见 [docs/api/devtools.md](docs/api/devtools.md)。
|
||||
详细 CLI 用法见 [docs/api/ethend.md](docs/api/ethend.md)。
|
||||
|
||||
---
|
||||
|
||||
@@ -111,7 +111,7 @@ cd frontend/web && npm install && npx vite --host 0.0.0.0
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
启动服务:postgres, redis, qdrant, minio, searxng, memory-service, voice-service, iot-debug-service, ai-core, gateway, devtools。前端需本地启动。
|
||||
启动服务:postgres, redis, qdrant, minio, searxng, memory-service, voice-service, iot-debug-service, ai-core, gateway, ethend。前端需本地启动。
|
||||
|
||||
### 生产环境
|
||||
|
||||
@@ -140,16 +140,16 @@ Cyrene/
|
||||
│ ├── voice-service/ # 语音服务 (DashScope STT + Edge-TTS)
|
||||
│ ├── iot-debug-service/ # IoT 调试服务 (8 个模拟智能家居设备)
|
||||
│ └── pkg/ # 共享包 (logger, plugins — 15 个通用插件/工具)
|
||||
├── devtools/ # DevTools 管理面板 (Express + WebSocket)
|
||||
├── ethend/ # ethend 管理面板 (Express + WebSocket)
|
||||
├── scripts/ # 辅助脚本 (migrate / tunnel / whisper-setup / pg-backup)
|
||||
├── searxng/ # SearXNG 搜索引擎配置
|
||||
├── backups/ # 数据库备份文件
|
||||
├── test/ # E2E 测试
|
||||
├── docs/ # 文档
|
||||
├── docker-compose.dev.db.yml # 开发基础设施
|
||||
├── docker-compose.dev.yml # 开发环境 (DB + 后端 + DevTools + SearXNG)
|
||||
├── docker-compose.dev.yml # 开发环境 (DB + 后端 + ethend + SearXNG)
|
||||
├── docker-compose.yml # 生产环境 (+ Caddy)
|
||||
└── devtools.sh # DevTools CLI
|
||||
└── ethend.sh # ethend CLI
|
||||
```
|
||||
|
||||
---
|
||||
@@ -165,7 +165,7 @@ Cyrene/
|
||||
| 8091 | Memory Service | 否 |
|
||||
| 8088 | SearXNG | 否 |
|
||||
| 8093 | Voice Service | 否 |
|
||||
| 9090 | DevTools | 是 |
|
||||
| 9090 | ethend | 是 |
|
||||
| 5432 | PostgreSQL | 否 |
|
||||
| 6379 | Redis | 否 |
|
||||
| 6333 | Qdrant HTTP | 否 |
|
||||
@@ -239,10 +239,10 @@ Cyrene/
|
||||
## 数据库管理
|
||||
|
||||
```bash
|
||||
# 通过 DevTools CLI
|
||||
./devtools.sh db:start # 启动
|
||||
./devtools.sh db:stop # 停止
|
||||
./devtools.sh db:status # 状态检查
|
||||
# 通过 ethend CLI
|
||||
./ethend.sh db:start # 启动
|
||||
./ethend.sh db:stop # 停止
|
||||
./ethend.sh db:status # 状态检查
|
||||
|
||||
# 直接 Docker Compose
|
||||
docker compose -f docker-compose.dev.db.yml up -d
|
||||
@@ -280,23 +280,23 @@ docker exec -it cyrene_postgres psql -U cyrene -d cyrene_ai
|
||||
|
||||
| 脚本 | 终端 | 说明 |
|
||||
|------|------|------|
|
||||
| `devtools.bat` | CMD / PowerShell | 双击即可运行,无需 Git Bash |
|
||||
| `devtools.sh` | Git Bash | 完整 CLI(推荐) |
|
||||
| `ethend.bat` | CMD / PowerShell | 双击即可运行,无需 Git Bash |
|
||||
| `ethend.sh` | Git Bash | 完整 CLI(推荐) |
|
||||
|
||||
```cmd
|
||||
:: CMD 中直接运行
|
||||
devtools.bat start --build
|
||||
devtools.bat status
|
||||
devtools.bat logs gateway
|
||||
ethend.bat start --build
|
||||
ethend.bat status
|
||||
ethend.bat logs gateway
|
||||
|
||||
:: Git Bash 中运行
|
||||
./devtools.sh start --build
|
||||
./devtools.sh status
|
||||
./ethend.sh start --build
|
||||
./ethend.sh status
|
||||
```
|
||||
|
||||
### 编译差异
|
||||
|
||||
Windows 下 Go 编译产物为 `main.exe` 而非 `main`。DevTools 已自动处理此差异,手动编译时需要注意:
|
||||
Windows 下 Go 编译产物为 `main.exe` 而非 `main`。ethend 已自动处理此差异,手动编译时需要注意:
|
||||
|
||||
```bash
|
||||
# Windows (Git Bash / PowerShell)
|
||||
@@ -325,9 +325,9 @@ netstat -ano | findstr ":8080"
|
||||
# 杀进程 (PowerShell)
|
||||
powershell -Command "Stop-Process -Id <PID> -Force"
|
||||
|
||||
# 或者直接用 DevTools CLI(跨平台兼容)
|
||||
./devtools.sh status # 查看各服务端口状态
|
||||
./devtools.sh stop # 停止 DevTools
|
||||
# 或者直接用 ethend CLI(跨平台兼容)
|
||||
./ethend.sh status # 查看各服务端口状态
|
||||
./ethend.sh stop # 停止 ethend
|
||||
```
|
||||
|
||||
### Docker Desktop
|
||||
@@ -361,7 +361,7 @@ export PATH="$PATH:/c/Program Files/nodejs"
|
||||
| 症状 | 可能原因 | 解决 |
|
||||
|------|----------|------|
|
||||
| `go: command not found` | Go 未加入 PATH | 重启 Git Bash 或手动 `export PATH` |
|
||||
| `Only one usage of each socket address` | 端口被占用 | `./devtools.sh stop` 或用 PowerShell 杀进程 |
|
||||
| `Only one usage of each socket address` | 端口被占用 | `./ethend.sh stop` 或用 PowerShell 杀进程 |
|
||||
| `docker: error during connect` | Docker Desktop 未启动 | 启动 Docker Desktop 等待就绪 |
|
||||
| `GOWORK` 相关编译错误 | 未设置 GOWORK=off | `export GOWORK=off` 或在命令前加 `GOWORK=off` |
|
||||
| `npm install` 卡住 | Windows 下 npm 网络问题 | 设置镜像 `npm config set registry https://registry.npmmirror.com` |
|
||||
|
||||
Reference in New Issue
Block a user