landvex: Fixar och tester klara för alla komponenter
- Datafabrik: Dockerfile fix, agentorkestrering fungerar - Vision: Identify-modell, FAISS, OCR alla testade - API: Alla 7 integrationstester passerade - Upplösare: Entitetsupplösning verifierad
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
"""
|
||||
Konfiguration för LandveX Admin Backend (User Management + Tenant Management).
|
||||
"""
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
APP_NAME: str = "LandveX Admin Backend"
|
||||
DEBUG: bool = False
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/landvex"
|
||||
DATABASE_POOL_SIZE: int = 20
|
||||
DATABASE_MAX_OVERFLOW: int = 10
|
||||
|
||||
# Schema isolation
|
||||
DEFAULT_TENANT_SCHEMA: str = "public"
|
||||
TENANT_SCHEMA_PREFIX: str = "tenant_"
|
||||
|
||||
# JWT
|
||||
SECRET_KEY: str = "change-me-in-production-landvex-secret-key-2024"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
|
||||
# Invitation
|
||||
INVITATION_TOKEN_EXPIRE_HOURS: int = 48
|
||||
FRONTEND_SET_PASSWORD_URL: str = "https://admin.landvex.se/set-password"
|
||||
|
||||
# Password policy
|
||||
MIN_PASSWORD_LENGTH: int = 8
|
||||
|
||||
# Audit logging
|
||||
AUDIT_LOG_TABLE: str = "audit_logs"
|
||||
AUDIT_RETENTION_DAYS: int = 365
|
||||
|
||||
# Pagination
|
||||
DEFAULT_PAGE_SIZE: int = 20
|
||||
MAX_PAGE_SIZE: int = 100
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
case_sensitive=True,
|
||||
extra="allow"
|
||||
)
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user