-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
executable file
·53 lines (42 loc) · 1.58 KB
/
.env.example
File metadata and controls
executable file
·53 lines (42 loc) · 1.58 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
# ===============================
# 前端 Vite 环境变量
# ===============================
# 开发环境 API 配置
VITE_API_BASE_URL=/api
VITE_DEV_SERVER_URL=http://127.0.0.1:8000
VITE_DEV_LOGIN_API_URL=http://127.0.0.1:8000/auth/oauth2/token
# 登录接口 Basic Auth(可填完整 "Basic xxx" 或仅 base64 部分)
VITE_LOGIN_BASIC_AUTH=
# 生产环境 API 配置
VITE_PROD_API_BASE_URL=https://your-production-api.com
VITE_PROD_LOGIN_API_URL=https://your-production-api.com/auth/oauth2/token
# ===============================
# 后端 FastAPI 环境变量
# ===============================
# 运行环境: development | production
APP_ENV=development
# 数据库驱动: sqlite | postgres
APP_DB_DRIVER=postgres
# SQLite 文件路径(仅 sqlite 模式有效,默认 backend/local_app.db)
APP_SQLITE_PATH=
# PostgreSQL 连接(postgres 模式生效)
# 方式1:使用完整 DSN
APP_PG_DSN=
# 方式2:使用拆分参数(当 DSN 为空时生效)
APP_PG_HOST=127.0.0.1
APP_PG_PORT=5432
APP_PG_DATABASE=app_local
APP_PG_USER=postgres
APP_PG_PASSWORD=
# JWT 密钥(生产环境必须配置,建议使用 >= 32 位随机字符串)
APP_JWT_SECRET=please_replace_with_a_strong_random_secret_32_chars_min
# Token 有效期(秒)
APP_ACCESS_TOKEN_EXPIRE_SECONDS=28800
APP_REFRESH_TOKEN_EXPIRE_SECONDS=604800
# PBKDF2 密码哈希迭代次数
APP_PASSWORD_HASH_ITERATIONS=200000
# CORS 配置(二选一或同时配置)
# 1) 精确白名单,多个逗号分隔
APP_CORS_ORIGINS=http://localhost:5174,http://127.0.0.1:5174
# 2) 正则白名单(可选)
APP_CORS_ORIGIN_REGEX=