Files
enigFM/backend/app/config.py

33 lines
757 B
Python
Raw Normal View History

2025-12-12 13:30:09 +03:00
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
# Database
database_url: str = "postgresql://postgres:postgres@localhost:5432/enigfm"
# JWT
secret_key: str = "your-secret-key-change-in-production"
algorithm: str = "HS256"
access_token_expire_minutes: int = 60 * 24 * 7 # 7 days
# S3 (FirstVDS)
s3_endpoint_url: str = ""
s3_access_key: str = ""
s3_secret_key: str = ""
s3_bucket_name: str = "enigfm"
s3_region: str = "ru-1"
# Limits
max_file_size_mb: int = 10
max_storage_gb: int = 90
max_room_participants: int = 50
class Config:
env_file = ".env"
@lru_cache()
def get_settings() -> Settings:
return Settings()