-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
158 lines (127 loc) · 4.33 KB
/
.env.example
File metadata and controls
158 lines (127 loc) · 4.33 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# 生产环境配置模板
# 复制此文件为 .env.production 并填入实际值
# ===========================================
# 应用基础配置
# ===========================================
NODE_ENV=production
PORT=3001
# ===========================================
# 数据库配置
# ===========================================
# MongoDB 连接字符串 (必需)
MONGODB_URI=mongodb://username:password@hostname:27017/inner-cosmos
# Redis 连接配置 (必需)
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=your-strong-redis-password
# ===========================================
# JWT 身份认证配置 (必需)
# ===========================================
# 主 JWT 密钥 (建议使用 64 位随机字符串)
JWT_SECRET=your-super-strong-jwt-secret-key-at-least-64-characters-long
# 刷新令牌密钥
JWT_REFRESH_SECRET=your-refresh-token-secret-key-different-from-main-secret
# JWT 过期时间
JWT_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
# ===========================================
# AI API 配置 (必需)
# ===========================================
# OpenAI API
OPENAI_API_KEY=sk-your-openai-api-key-here
OPENAI_MODEL=gpt-4
OPENAI_MAX_TOKENS=2000
# 硅基流动 API (八卦算运功能)
SILICONFLOW_API_KEY=sk-gfgqiwgqsxzurzcgfbatascayzkbctguoskbnioxvjfyekeg
SILICONFLOW_MODEL=deepseek-ai/deepseek-v3
SILICONFLOW_BASE_URL=https://api.siliconflow.cn/v1
# ===========================================
# 邮件服务配置 (可选)
# ===========================================
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your-email@example.com
SMTP_PASS=your-email-password
SMTP_FROM=noreply@inner-cosmos.com
# ===========================================
# 文件上传配置
# ===========================================
UPLOAD_MAX_SIZE=10485760
UPLOAD_ALLOWED_TYPES=image/jpeg,image/png,image/webp
# ===========================================
# 安全配置
# ===========================================
# CORS 允许的源 (生产环境应设置具体域名)
CORS_ORIGIN=https://your-domain.com
# 会话密钥
SESSION_SECRET=your-session-secret-key
# 密码加密强度
BCRYPT_ROUNDS=12
# ===========================================
# 监控配置 (可选)
# ===========================================
# Grafana 管理员密码
GRAFANA_PASSWORD=your-grafana-admin-password
# Prometheus 配置
PROMETHEUS_RETENTION=30d
# ===========================================
# SSL/TLS 配置
# ===========================================
# SSL 证书路径 (如果使用自签名证书)
SSL_CERT_PATH=/etc/nginx/ssl/cert.pem
SSL_KEY_PATH=/etc/nginx/ssl/key.pem
# ===========================================
# 第三方服务配置 (可选)
# ===========================================
# 百度地图 API (用于地理位置服务)
BAIDU_MAP_AK=your-baidu-map-api-key
# 微信登录配置 (如果启用)
WECHAT_APP_ID=your-wechat-app-id
WECHAT_APP_SECRET=your-wechat-app-secret
# 阿里云OSS配置 (文件存储)
ALICLOUD_ACCESS_KEY_ID=your-alicloud-access-key-id
ALICLOUD_ACCESS_KEY_SECRET=your-alicloud-access-key-secret
ALICLOUD_OSS_REGION=oss-cn-hangzhou
ALICLOUD_OSS_BUCKET=your-bucket-name
ALICLOUD_OSS_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
# PostgreSQL配置 (可选,如果使用PostgreSQL)
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=inner_cosmos
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your-postgres-password
# ===========================================
# 应用特定配置
# ===========================================
# 应用域名
APP_DOMAIN=your-domain.com
APP_URL=https://your-domain.com
# API 基础 URL
API_BASE_URL=https://your-domain.com/api
# ===========================================
# 调试和日志配置
# ===========================================
# 日志级别 (error, warn, info, debug)
LOG_LEVEL=info
# 日志文件路径
LOG_FILE_PATH=/app/logs/app.log
# 是否启用详细日志
VERBOSE_LOGGING=false
# ===========================================
# 性能配置
# ===========================================
# 缓存过期时间 (秒)
CACHE_TTL=3600
# API 速率限制 (每分钟请求数)
RATE_LIMIT_MAX=100
# 数据库连接池大小
DB_POOL_SIZE=10
# ===========================================
# 备份配置
# ===========================================
# 自动备份启用
AUTO_BACKUP_ENABLED=true
# 备份保留天数
BACKUP_RETENTION_DAYS=30
# 备份存储路径
BACKUP_STORAGE_PATH=/app/backups