38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
from typing import List
|
|
import os
|
|
|
|
class Settings:
|
|
# Database
|
|
DATABASE_URL: str = os.getenv("DATABASE_URL", "postgresql://lediscord_user:lediscord_password@postgres:5432/lediscord")
|
|
|
|
# JWT
|
|
JWT_SECRET_KEY: str = "your-super-secret-jwt-key-change-me"
|
|
JWT_ALGORITHM: str = "HS256"
|
|
JWT_EXPIRATION_MINUTES: int = 10080 # 7 days
|
|
|
|
# Upload
|
|
UPLOAD_PATH: str = "/app/uploads"
|
|
MAX_UPLOAD_SIZE: int = 100 * 1024 * 1024 # 100MB
|
|
ALLOWED_IMAGE_TYPES: List[str] = ["image/jpeg", "image/png", "image/gif", "image/webp"]
|
|
ALLOWED_VIDEO_TYPES: List[str] = ["video/mp4", "video/mpeg", "video/quicktime", "video/webm"]
|
|
|
|
# CORS - Fixed list, no environment parsing
|
|
CORS_ORIGINS: List[str] = ["http://localhost:5173", "http://localhost:3000"]
|
|
|
|
# Email
|
|
SMTP_HOST: str = "smtp.gmail.com"
|
|
SMTP_PORT: int = 587
|
|
SMTP_USER: str = ""
|
|
SMTP_PASSWORD: str = ""
|
|
SMTP_FROM: str = "noreply@lediscord.com"
|
|
|
|
# Admin
|
|
ADMIN_EMAIL: str = "admin@lediscord.com"
|
|
ADMIN_PASSWORD: str = "admin123"
|
|
|
|
# App
|
|
APP_NAME: str = "LeDiscord"
|
|
APP_URL: str = "http://localhost:5173"
|
|
|
|
settings = Settings()
|