collabrix/backend/app/config.py
DGSoft 93b98cfb5c Initial commit: Team Chat System with Code Snippet Library
- Complete chat application similar to Microsoft Teams
- Code snippet library with syntax highlighting
- Real-time messaging with WebSockets
- File upload with Office integration
- Department-based permissions
- Dark/Light theme support
- Production deployment with SSL/Reverse Proxy
- Docker containerization
- PostgreSQL database with SQLModel ORM
2025-12-09 22:25:03 +01:00

29 lines
704 B
Python

from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
# Database
database_url: str = "postgresql://user:password@localhost:5432/teamchat"
test_database_url: str = "postgresql://user:password@localhost:5432/teamchat_test"
# JWT
secret_key: str = "your-secret-key-change-this"
algorithm: str = "HS256"
access_token_expire_minutes: int = 30
# File Upload
upload_dir: str = "./uploads"
max_upload_size: int = 20 * 1024 * 1024 # 20 MB
# CORS
frontend_url: str = "http://localhost:5173"
class Config:
env_file = ".env"
@lru_cache()
def get_settings():
return Settings()