Chepuhagram/srv/app/core/config.py

25 lines
717 B
Python

import os
from dotenv import load_dotenv
load_dotenv()
class Config:
# Database
DATABASE_URL: str = os.getenv("DATABASE_URL", "sqlite:///./chepuhagram.db")
# Security
JWT_KEY: str = os.getenv("JWT_KEY", "")
if not JWT_KEY:
raise RuntimeError("JWT_KEY environment variable not set")
# Firebase
FIREBASE_CREDENTIALS_PATH: str = os.getenv("FIREBASE_CREDENTIALS_PATH", "chepuhagram-6ca5d-firebase-adminsdk-fbsvc-cf8a5ad2f3.json")
# Server
HOST: str = os.getenv("HOST", "0.0.0.0")
PORT: int = int(os.getenv("PORT", "8000"))
# CORS
ALLOWED_ORIGINS: list = os.getenv("ALLOWED_ORIGINS", "http://localhost:3000,http://127.0.0.1:3000").split(",")
config = Config()