chore: retire remaining convex infrastructure
- move self-hosted Convex infra and root placeholder into recycle - update architecture docs to remove active infra/convex deployment guidance - extend local-first Convex guard to block retired infra regressions
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
# Convex 自托管(Windows 本机)
|
||||
|
||||
本目录用于在本机通过 Docker Compose 启动 Convex backend + dashboard,并使用 backend 自身的持久化卷存储(包含数据库与文件存储)。
|
||||
|
||||
在 local-first 方案下,这套 Convex 自托管环境只定位为历史数据导出、显式 cloud source / compat 和可选 sync replica 运行底座;默认 auth、授权、分享、同步状态、AI policy、ACP/Hermes runtime session 等控制面已由 Rust SQLite control-plane 承接。页面正文、默认附件和本地 AI 会话全文不再以它作为早期产品默认数据真相。
|
||||
|
||||
## 当前 functions 边界
|
||||
|
||||
- 仓库根 `convex/` 已退役并软删除到 `recycle/20260522-convex-runtime-retirement/convex/`;它只作为审计、迁移对照或历史恢复素材,不再是 active deploy source。
|
||||
- `recycle/wolai-frontend/convex/` 是退役前端随带的历史实现,不允许作为当前部署 fallback。
|
||||
- `scripts/run-convex-deploy.js` 已随根 functions 源码软删除到 `recycle/20260522-convex-runtime-retirement/scripts/run-convex-deploy.js`。如需重新部署 Convex functions,必须先明确新的 cloud/compat 部署边界,不应直接恢复旧根 `convex/` 作为默认控制面。
|
||||
|
||||
## 启动
|
||||
|
||||
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 源码
|
||||
|
||||
当前默认 hot 启动链路不应要求仓库根存在 `convex/`:
|
||||
|
||||
```bash
|
||||
test ! -d convex
|
||||
npm run desktop:hot
|
||||
```
|
||||
|
||||
### 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)
|
||||
@@ -1,38 +0,0 @@
|
||||
name: mnote-convex
|
||||
|
||||
services:
|
||||
backend:
|
||||
# 说明:官方自托管镜像。需要时可将 :latest 固定为特定版本。
|
||||
# local-first 下该卷只承载控制面、cloud source、compat 和 sync replica,
|
||||
# 不作为本地默认页面正文、附件或 AI 会话全文真相。
|
||||
image: ghcr.io/get-convex/convex-backend@sha256:2143ad479a997802e74ac52f5f1ce3d6e75309b1965e36069d1c939166e210eb
|
||||
stop_grace_period: 10s
|
||||
stop_signal: SIGINT
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 65535
|
||||
hard: 65535
|
||||
ports:
|
||||
- "3210:3210"
|
||||
- "3211:3211"
|
||||
volumes:
|
||||
- convex_data_v1:/convex/data
|
||||
env_file:
|
||||
- ../../.env.all
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3210/version"]
|
||||
interval: 5s
|
||||
start_period: 10s
|
||||
|
||||
dashboard:
|
||||
image: ghcr.io/get-convex/convex-dashboard@sha256:a1fa8df3d320d1691c74bb9df7bb2c536bdef91ff3f5307b717dba97eec793d1
|
||||
stop_grace_period: 10s
|
||||
stop_signal: SIGINT
|
||||
ports:
|
||||
- "6791:6791"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
convex_data_v1:
|
||||
Reference in New Issue
Block a user