gangvy a92599a3f5 feat: bootstrap jianhen VOC customer instance with company relay 4 روز پیش
..
README.md a92599a3f5 feat: bootstrap jianhen VOC customer instance with company relay 4 روز پیش
nginx.example.conf a92599a3f5 feat: bootstrap jianhen VOC customer instance with company relay 4 روز پیش

README.md

部署说明

1. 后端

  1. 复制 backend/config.example.jsonbackend/config.json 并填真实值。
  2. 编辑 backend/src/relay/relay-config.ts,将 sk-TARGET_RELAY_SK 换成公司发放的实例 sk。
  3. 安装依赖(按项目实际:npm/bun/deno + fmode-server)。
  4. 生产用 fmode-server 启动(自动挂 /parseapi/routes.ts/api)。
  5. 检查:
    • GET /health
    • GET /api/sorftime/health
    • GET /api/tikhub/health

2. 前端

  1. 编辑 frontend/src/assets/runtime-config.json
    • parse.appId / parse.serverUrl
    • apiBaseUrl(生产可空字符串走同源反代)
  2. npm ci && npm run build(或项目既有 build:prod)
  3. dist/ 发布到静态目录。

3. 反代

nginx.example.conf

/        → frontend dist
/api/*   → backend
/parse/* → backend Parse
/health  → backend

浏览器不得直连 server.fmode.cn 的上游 Token 接口;AI nova 如需公司 parse,仅用登录后 session,不写死 token。

4. 健康检查清单

curl -s https://TARGET_HOST/health
curl -s https://TARGET_HOST/api/sorftime/health
curl -s https://TARGET_HOST/api/tikhub/health
curl -s https://TARGET_HOST/api/ping

5. 回滚

保留上一版:

  • frontend dist
  • backend 提交 / 目录
  • config.json 备份
  • 数据库备份(若已初始化)