Multi-tenant Claude Code monitoring dashboard. FastAPI + PostgreSQL + Docker + SSE real-time updates. Montserrat font, black/#FFC407 color scheme. Apache reverse proxy config at /cc-dashboard/. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
786 B
Python
30 lines
786 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
# DB
|
|
DB_PASSWORD: str = "postgres"
|
|
DATABASE_URL: str = ""
|
|
|
|
# JWT
|
|
SECRET_KEY: str = "dev_secret_key_change_in_production"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
|
|
|
# App
|
|
BASE_PATH: str = "/cc-dashboard"
|
|
APP_TITLE: str = "CC Dashboard"
|
|
DEBUG: bool = False
|
|
|
|
def model_post_init(self, __context):
|
|
if not self.DATABASE_URL:
|
|
object.__setattr__(
|
|
self,
|
|
"DATABASE_URL",
|
|
f"postgresql+asyncpg://cc_app:{self.DB_PASSWORD}@db:5432/cc_dashboard",
|
|
)
|
|
|
|
|
|
settings = Settings()
|