37 lines
950 B
Python
37 lines
950 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
extra="ignore",
|
|
)
|
|
|
|
app_name: str = "Headquarter API"
|
|
debug: bool = False
|
|
api_v1_prefix: str = "/api/v1"
|
|
|
|
# Authentik OIDC
|
|
authentik_issuer_url: str = ""
|
|
authentik_client_id: str = ""
|
|
authentik_client_secret: str = ""
|
|
|
|
# Database
|
|
database_url: str = "postgresql://postgres:postgres@localhost:5432/headquarter"
|
|
|
|
# CORS
|
|
cors_origins: str = "http://localhost:5173,http://localhost:3000"
|
|
|
|
# Deployment
|
|
root_domain: str = "localhost"
|
|
tool_subdomain_pattern: str = "{tool}-{project}-{user}.tools.{root_domain}"
|
|
|
|
# Auth & encryption
|
|
secret_encryption_key: str = "change-me-in-production"
|
|
access_token_expire_minutes: int = 60
|
|
auth_dev_bypass: bool = False
|
|
|
|
|
|
settings = Settings()
|