refactor(config): use pydantic-settings
This commit is contained in:
34
.env.example
Normal file
34
.env.example
Normal file
@@ -0,0 +1,34 @@
|
||||
# 数据库 URL
|
||||
DATABASE_URL="mysql+aiomysql://root:password@127.0.0.1:3306/osu_api"
|
||||
# Redis URL
|
||||
REDIS_URL="redis://127.0.0.1:6379/0"
|
||||
|
||||
# JWT 密钥,使用 openssl rand -hex 32 生成
|
||||
JWT_SECRET_KEY="your_jwt_secret_here"
|
||||
# JWT 算法
|
||||
ALGORITHM="HS256"
|
||||
# JWT 过期时间
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES=1440
|
||||
|
||||
# 服务器地址
|
||||
HOST="0.0.0.0"
|
||||
PORT=8000
|
||||
# 调试模式,生产环境请设置为 false
|
||||
DEBUG=false
|
||||
|
||||
# osu!lazer 登录设置
|
||||
OSU_CLIENT_ID="5"
|
||||
OSU_CLIENT_SECRET="FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk"
|
||||
|
||||
# SignalR 服务器设置
|
||||
SIGNALR_NEGOTIATE_TIMEOUT=30
|
||||
SIGNALR_PING_INTERVAL=15
|
||||
|
||||
# Fetcher 设置
|
||||
FETCHER_CLIENT_ID=""
|
||||
FETCHER_CLIENT_SECRET=""
|
||||
FETCHER_SCOPES=["public"]
|
||||
FETCHER_CALLBACK_URL="http://localhost:8000/fetcher/callback"
|
||||
|
||||
# 日志设置
|
||||
LOG_LEVEL="INFO"
|
||||
Reference in New Issue
Block a user