-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
124 lines (110 loc) · 2.88 KB
/
.env.example
File metadata and controls
124 lines (110 loc) · 2.88 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# ===================================
# 应用配置
# ===================================
NODE_ENV=development
PORT=8000
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:8000
# ===================================
# 数据库配置
# ===================================
# PostgreSQL
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/online_compiler?schema=public
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=online_compiler
# ===================================
# Redis配置
# ===================================
REDIS_URL=redis://localhost:6379
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# ===================================
# JWT认证
# ===================================
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRES_IN=7d
JWT_REFRESH_EXPIRES_IN=30d
# ===================================
# Docker配置
# ===================================
DOCKER_HOST=unix:///var/run/docker.sock
# Docker API版本
DOCKER_API_VERSION=1.41
# ===================================
# 代码执行限制
# ===================================
# 最大执行时间(秒)
MAX_EXECUTION_TIME=10
# 最大内存限制(MB)
MAX_MEMORY=256
# 最大CPU核心数
MAX_CPU_CORES=0.5
# 最大磁盘空间(MB)
MAX_DISK_SPACE=100
# 最大输出大小(KB)
MAX_OUTPUT_SIZE=1024
# ===================================
# 任务队列配置
# ===================================
# 并发Worker数量
WORKER_CONCURRENCY=5
# 任务超时时间(ms)
TASK_TIMEOUT=30000
# 最大重试次数
MAX_RETRY_ATTEMPTS=3
# ===================================
# 速率限制
# ===================================
# 每个IP每分钟最大请求数
RATE_LIMIT_MAX=100
# 时间窗口(分钟)
RATE_LIMIT_WINDOW=1
# 单用户每天最大执行次数
MAX_EXECUTIONS_PER_DAY=500
# ===================================
# 文件存储
# ===================================
# 临时文件目录
TEMP_DIR=./tmp
# 上传文件最大大小(MB)
MAX_FILE_SIZE=10
# ===================================
# 邮件配置(可选)
# ===================================
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM=noreply@example.com
# ===================================
# 日志配置
# ===================================
LOG_LEVEL=info
LOG_FILE=./logs/app.log
# ===================================
# 安全配置
# ===================================
# CORS允许的源
CORS_ORIGIN=http://localhost:3000
# Cookie安全(生产环境设为true)
COOKIE_SECURE=false
# Cookie SameSite设置
COOKIE_SAMESITE=lax
# ===================================
# 监控配置(可选)
# ===================================
# Sentry DSN
SENTRY_DSN=
# ===================================
# 第三方服务(可选)
# ===================================
# GitHub OAuth
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Google OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=