-
Notifications
You must be signed in to change notification settings - Fork 8
Deployment
ZZzzswszzZZ edited this page Apr 16, 2026
·
1 revision
# 1. 创建 .env 文件
cp .env.example .env
# 编辑 .env 填入实际配置
# 2. 构建前端
cd frontend && npm install && npm run build && cd ..
# 3. 启动服务
docker compose up -d容器内数据持久化通过 Docker volume router-data 挂载到 /app/data。
# 1. 安装依赖
npm install
cd frontend && npm install && npm run build && cd ..
# 2. 构建后端
npm run build
mkdir -p dist/db/migrations && cp src/db/migrations/*.sql dist/db/migrations/
# 3. 配置环境变量
cp .env.example .env
# 编辑 .env
# 4. 启动
FRONTEND_DIST=./frontend/dist npm start代理服务兼容 OpenAI / Anthropic SDK,将 base_url 指向路由器即可:
# OpenAI SDK 示例
from openai import OpenAI
client = OpenAI(
api_key="<你的 Router Key>",
base_url="http://<路由器地址>:3000/v1"
)管理后台地址:http://<路由器地址>:3000/admin