调整文档路径
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""配置:环境变量读取"""
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Settings:
|
||||
AUTH_DB_HOST: str = os.getenv("AUTH_DB_HOST", "10.100.154.100")
|
||||
AUTH_DB_PORT: int = int(os.getenv("AUTH_DB_PORT", "5432"))
|
||||
AUTH_DB_USER: str = os.getenv("AUTH_DB_USER", "postgres")
|
||||
AUTH_DB_PASSWORD: str = os.getenv("AUTH_DB_PASSWORD", "digiwin")
|
||||
AUTH_DB_NAME: str = os.getenv("AUTH_DB_NAME", "mcp_auth")
|
||||
|
||||
# 鼎捷云 IAM 配置
|
||||
IAM_BASE_URL: str = os.getenv("IAM_BASE_URL", "https://iam.digiwincloud.com.cn")
|
||||
# 应用 apptoken(digi-middleware-auth-app)
|
||||
IAM_APP_TOKEN: str = os.getenv(
|
||||
"IAM_APP_TOKEN",
|
||||
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImRhdGEtYnVzaW5lc3MtZGVtbyIsInNpZCI6MH0.Spo64LstbWxjYNefVFAbEbgfjzZoQGNcqKSGuYUOCRk",
|
||||
)
|
||||
# IAM token 校验缓存秒数
|
||||
IAM_CACHE_TTL: int = int(os.getenv("IAM_CACHE_TTL", "30"))
|
||||
|
||||
# 前端静态文件目录(Docker 构建后注入)
|
||||
STATIC_DIR: str = os.getenv("STATIC_DIR", "../frontend/dist")
|
||||
|
||||
# Redis 配置
|
||||
REDIS_HOST: str = os.getenv("REDIS_HOST", "10.100.154.100")
|
||||
REDIS_PORT: int = int(os.getenv("REDIS_PORT", "6379"))
|
||||
REDIS_DB: int = int(os.getenv("REDIS_DB", "0"))
|
||||
REDIS_PASSWORD: str = os.getenv("REDIS_PASSWORD", "digiwin")
|
||||
|
||||
# 反向代理路径前缀(让 Swagger / OpenAPI 在带前缀的代理后正确生成 URL)
|
||||
# 生产经外层 nginx 暴露在 https://<host>/mcp-auth-api/ 下时设为 /mcp-auth-api;直连 8003 时留空
|
||||
ROOT_PATH: str = os.getenv("ROOT_PATH", "")
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user