Files
platform-api/app/core/config.py
Platform CI f9bfc3afbd init
2026-02-21 17:54:44 -05:00

44 lines
1.3 KiB
Python

from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
# Database
DATABASE_URL: str = "postgresql+asyncpg://platform:Platform@DB2024!@platform-db.platform-db:5432/platform"
# Keycloak
KEYCLOAK_URL: str = "https://auth.platform.dlytica.com"
KEYCLOAK_ADMIN_USER: str = "admin"
KEYCLOAK_ADMIN_PASSWORD: str = "Architecture@9988#"
KEYCLOAK_MASTER_REALM: str = "master"
KEYCLOAK_PLATFORM_CLIENT: str = "platform-api"
KEYCLOAK_PLATFORM_SECRET: str = ""
# Platform
DOMAIN: str = "platform.dlytica.com"
DATA_PLANE_DOMAIN: str = "platform.dlytica.com"
DEFAULT_TRIAL_DAYS: int = 30
SECRET_KEY: str = "change-me-in-production"
# Kubernetes (in-cluster)
VCLUSTER_NAMESPACE: str = "tenant-vclusters"
DATA_PLANE_KUBECONFIG: str = "" # path to DP kubeconfig; empty = in-cluster
GITOPS_REPO_URL: str = "http://gitea_admin:ChangeMe123!@gitea.platform.dlytica.com/platform/gitops.git"
GITOPS_BRANCH: str = "main"
GITOPS_LOCAL_PATH: str = "/tmp/gitops"
# Email
SMTP_HOST: str = ""
SMTP_PORT: int = 587
SMTP_USER: str = ""
SMTP_PASSWORD: str = ""
SMTP_FROM: str = "noreply@dlytica.com"
class Config:
env_file = ".env"
@lru_cache
def get_settings() -> Settings:
return Settings()