-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
65 lines (58 loc) · 2.15 KB
/
.env.example
File metadata and controls
65 lines (58 loc) · 2.15 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
# ===========================================
# CodeMockLab 环境配置文件
# ===========================================
# 数据库配置 (必需)
# 本地开发: postgresql://user:password@localhost:5432/codemocklab
# Supabase: postgresql://postgres:[PASSWORD]@[HOST]:5432/postgres
# Railway: postgresql://postgres:[PASSWORD]@[HOST]:[PORT]/railway
DATABASE_URL="postgresql://user:password@localhost:5432/codemocklab"
# NextAuth 认证配置 (必需)
# 生产环境请替换为实际域名
NEXTAUTH_URL="http://localhost:3000"
# 使用 openssl rand -base64 32 生成
NEXTAUTH_SECRET="your-nextauth-secret-key-here-min-32-chars"
# AI 服务配置 (至少配置一个)
# Kimi API (Moonshot AI - 推荐)
KIMI_API_KEY="sk-your-kimi-api-key"
# DeepSeek API (性价比高)
DEEPSEEK_API_KEY="sk-your-deepseek-api-key"
# 备用AI服务 (可选)
OPENAI_API_KEY="sk-your-openai-api-key"
ANTHROPIC_API_KEY="sk-ant-your-anthropic-api-key"
# 应用配置
NODE_ENV="development"
# 文件上传限制 (字节),默认10MB
UPLOAD_MAX_SIZE=10485760
# 面试配置
INTERVIEW_DURATION_DEV=120 # 开发环境面试时长(秒) - 2分钟
INTERVIEW_DURATION_PROD=3600 # 生产环境面试时长(秒) - 60分钟
# Redis 缓存 (可选)
# 本地: redis://localhost:6379
# Upstash: rediss://:[PASSWORD]@[HOST]:[PORT]
REDIS_URL="redis://localhost:6379"
# ===========================================
# Vercel 部署环境变量设置指南
# ===========================================
#
# 在 Vercel Dashboard → Settings → Environment Variables 中设置:
#
# 1. DATABASE_URL (必需)
# - Supabase: 从 Settings → Database 获取连接字符串
# - 格式: postgresql://postgres:[PASSWORD]@[HOST]:5432/postgres
#
# 2. NEXTAUTH_URL (必需)
# - 设置为: https://your-project.vercel.app
# - 如有自定义域名: https://your-domain.com
#
# 3. NEXTAUTH_SECRET (必需)
# - 生成命令: openssl rand -base64 32
# - 复制生成的随机字符串
#
# 4. DEEPSEEK_API_KEY (必需)
# - 从 https://platform.deepseek.com 获取
# - 格式: sk-xxxxxxxxxx
#
# 5. NODE_ENV (自动设置)
# - Vercel 会自动设置为 "production"
#
# ===========================================