mirror of
https://github.com/OHV-IT/collabrix.git
synced 2025-12-15 16:48:36 +01:00
- 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
29 lines
704 B
Python
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()
|