feat: FastAPI skeleton with config, database, health endpoint
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""应用配置 — 从环境变量 / .env 读取。"""
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
database_url: str = "postgresql+asyncpg://hive_admin:changeme@localhost:5432/hive_manage_v3"
|
||||
jwt_secret: str = "change-me"
|
||||
jwt_algorithm: str = "HS256"
|
||||
jwt_expire_minutes: int = 1440
|
||||
hermes_cli_path: str = "/home/enzo/.local/bin/hermes"
|
||||
hermes_profiles_root: str = "/home/enzo/.hermes/profiles"
|
||||
admin_email: str = "admin@zhiwei.local"
|
||||
admin_password: str = "admin123"
|
||||
|
||||
model_config = {"env_file": ".env"}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user