-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
69 lines (59 loc) · 3.38 KB
/
.env.example
File metadata and controls
69 lines (59 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# DocStudio 环境变量配置
# 使用方式:cp .env.example .env,然后修改下方所有变量
#
# ⚠️ 标注「必填」的项目不填写会导致服务无法启动
# ⚠️ 标注「构建时」的 NEXT_PUBLIC_* 变量在 Docker 镜像构建时烧入,修改后需重新 build
# ── 数据库(必填)────────────────────────────────────────────
POSTGRES_USER=postgres
POSTGRES_PASSWORD=change_me_strong_password
POSTGRES_DB=docstudio
# ── 服务地址(必填,填写你的实际域名)────────────────────────
# 本地测试用 http://localhost:3001 和 http://localhost:3000
API_URL=https://api.yourdomain.com
FRONTEND_URL=https://yourdomain.com
# ── 前端变量(必填 · 构建时烧入镜像)────────────────────────
# ⚠️ 这些变量在 docker build 时固化到前端代码,改了必须重新构建镜像
NEXT_PUBLIC_API_URL=https://api.yourdomain.com
NEXT_PUBLIC_WEBSOCKET_URL=wss://api.yourdomain.com:1234
NEXT_PUBLIC_CDN_URL=https://cdn.yourdomain.com
NEXT_PUBLIC_SITE_URL=https://yourdomain.com
# ── JWT(必填)──────────────────────────────────────────────
# 生成强密钥:openssl rand -base64 32
JWT_SECRET=change_this_to_a_strong_random_secret
JWT_EXPIRES_IN=7d
# ── 超级管理员(必填,首次启动自动创建)─────────────────────
SUPER_ADMIN_EMAIL=admin@yourdomain.com
SUPER_ADMIN_PASSWORD=change_me_strong_password
# ── MinIO 对象存储(必填)────────────────────────────────────
MINIO_ACCESS_KEY=change_me_minio_access_key
MINIO_SECRET_KEY=change_me_minio_secret_key
MINIO_BUCKET=avatars
MINIO_PUBLIC_ENDPOINT=https://cdn.yourdomain.com
MINIO_USE_SSL=false
# ── SMTP 邮件(可选,不填则禁用邮件功能)─────────────────────
# 支持:Gmail / QQ邮箱 / 企业邮箱 / SendGrid / 腾讯云SES 等
SMTP_HOST=smtp.yourdomain.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
SMTP_FROM="DocStudio" <noreply@yourdomain.com>
# ── AI 辅助写作(可选,不填则禁用 AI 功能)───────────────────
# 支持 MiniMax / OpenAI / 其他 OpenAI 兼容 API
AI_PROVIDER=minimax
AI_API_KEY=
AI_BASE_URL=https://api.minimax.io/v1
AI_MODEL=MiniMax-Text-01
AI_DAILY_LIMIT=50
# ── GitHub OAuth(可选)──────────────────────────────────────
# 创建地址:https://github.com/settings/developers
# ⚠️ 在 GitHub 后台填写的 Callback URL:{API_URL}/auth/github/callback
# 例如:https://api.yourdomain.com/auth/github/callback
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# ── Google OAuth(可选)──────────────────────────────────────
# 创建地址:https://console.cloud.google.com
# ⚠️ 在 Google Cloud 填写的授权重定向 URI:{API_URL}/auth/google/callback
# 例如:https://api.yourdomain.com/auth/google/callback
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=