init
This commit is contained in:
32
backend/app/config.py
Normal file
32
backend/app/config.py
Normal file
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user