-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy path.env.example
More file actions
50 lines (41 loc) · 1.24 KB
/
.env.example
File metadata and controls
50 lines (41 loc) · 1.24 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
# Python Path Configuration
PYTHONPATH=src
# 应用配置
VERSION=1.0.0
APP_TITLE=企业级FastAPI后端模板
PROJECT_NAME=YourProject
APP_DESCRIPTION=企业级FastAPI后端模板 - 开箱即用
# 安全配置 (必须修改)
SECRET_KEY=your_secret_key_here_generate_with_openssl_rand_hex_32
SWAGGER_UI_USERNAME=admin
SWAGGER_UI_PASSWORD=your_swagger_password_here
# 应用配置
APP_ENV=development
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=240
# Database Configuration
DB_ENGINE=sqlite
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_database_password_here
DB_NAME=your_database_name
# CORS配置 - 根据实际情况修改
CORS_ORIGINS=http://localhost:3000,http://localhost:8080,http://127.0.0.1:3000
# 调试模式 (生产环境设置为False)
DEBUG=True
# Redis 缓存
REDIS_URL=redis://localhost:6379/0
CACHE_TTL=300
# 可观测性
# /metrics 端点 IP 白名单(CIDR 列表,逗号分隔),默认仅本机+内网
METRICS_ALLOWED_IPS=127.0.0.1,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
# Sentry:留空则不启用
SENTRY_DSN=
SENTRY_TRACES_SAMPLE_RATE=0.1
# arq 任务队列(与 cache 共用 Redis,但隔离 db)
ARQ_REDIS_DB=1
ARQ_QUEUE_NAME=arq:queue
ARQ_MAX_JOBS=10
ARQ_JOB_TIMEOUT=300
ARQ_KEEP_RESULT=3600