Files
mnote/infra/convex/README.md
T
lix-2026 cdff672aa5 feat: align local-first workspace direction
Document the VSCode-like local-first product shape, demote Convex to a control-plane role, and retire stale architecture drafts.

Add local workspace migration/export references plus smoke coverage for no-Convex managed workspace startup, local markdown title/body/options persistence, asset upload behavior, and Convex fixture export.

Verification: git diff --cached --check; node scripts/check-local-first-convex-guard.js --staged; node scripts/task444-convex-workspace-export-local-fixture-smoke.js; node scripts/task166-local-first-managed-workspace-no-convex-smoke.js; node scripts/task167-local-markdown-title-body-options-no-convex-smoke.js
2026-05-19 08:11:58 +08:00

50 lines
1.5 KiB
Markdown
Raw 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.
# Convex 自托管(Windows 本机)
本目录用于在本机通过 Docker Compose 启动 Convex backend + dashboard,并使用 backend 自身的持久化卷存储(包含数据库与文件存储)。
在 local-first 方案下,这套 Convex 自托管环境定位为控制面、cloud source、compat 和可选 sync replica 运行底座;页面正文、默认附件和本地 AI 会话全文不再以它作为早期产品默认数据真相。
## 启动
1. 确保仓库根目录 `.env.all` 存在(全局唯一 env 文件)。
2. 在本目录执行:
```bash
docker compose up -d
```
## 生成 Dashboard / CLI admin key
在本目录执行:
```bash
docker compose exec backend ./generate_admin_key.sh
```
## 访问地址(默认)
- Dashboard`http://localhost:6791`
- Backend`http://127.0.0.1:3210`
- HTTP Actions`http://127.0.0.1:3211`
- 文件存储:由 Convex 管理(Dashboard 的 Files 页面可查看)
## 快速验证(可选)
### 1) 验证 Convex functions 可用
`wolai-frontend/` 执行:
```bash
npx convex dev --once --tail-logs disable --env-file ../.env.all --run ping:ping
```
### 2) 验证固定开发用户(阶段 3)
启动前端后访问:`http://127.0.0.1:3000/api/dev/whoami`
### 3) 验证异步任务骨架(阶段 5)
启动前端后:
- `POST http://127.0.0.1:3000/api/dev/jobs/demo`body 可选:`{ "ms": 800 }`)创建 demo job
- `GET http://127.0.0.1:3000/api/dev/jobs/demo?id=<jobId>` 查询状态(queued/running/succeeded/failed