28 lines
792 B
Python
28 lines
792 B
Python
from pydantic_settings import BaseSettings
|
|
from typing import List
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str = "postgresql+asyncpg://dikasterion:dikasterion_secret@localhost:5432/dikasterion"
|
|
SECRET_KEY: str = "super-secret-key-change-in-production"
|
|
ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
CORS_ORIGINS: List[str] = ["http://localhost:3000", "http://localhost"]
|
|
|
|
# OAuth
|
|
GOOGLE_CLIENT_ID: str = ""
|
|
GOOGLE_CLIENT_SECRET: str = ""
|
|
GITHUB_CLIENT_ID: str = ""
|
|
GITHUB_CLIENT_SECRET: str = ""
|
|
|
|
# Notifications
|
|
TELEGRAM_BOT_TOKEN: str = ""
|
|
SMTP_HOST: str = ""
|
|
SMTP_PORT: int = 587
|
|
SMTP_USER: str = ""
|
|
SMTP_PASSWORD: str = ""
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
settings = Settings()
|