Phase 0 Complete by ClaudeCode
This commit is contained in:
33
backend/config.py
Normal file
33
backend/config.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import List
|
||||
import json
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Firebase
|
||||
firebase_service_account_path: str = "./firebase-service-account.json"
|
||||
|
||||
# JWT
|
||||
jwt_secret_key: str = "change-me-in-production"
|
||||
jwt_algorithm: str = "HS256"
|
||||
jwt_expiration_minutes: int = 480
|
||||
|
||||
# MQTT
|
||||
mqtt_broker_host: str = "localhost"
|
||||
mqtt_broker_port: int = 1883
|
||||
mqtt_admin_username: str = "admin"
|
||||
mqtt_admin_password: str = ""
|
||||
mosquitto_password_file: str = "/etc/mosquitto/passwd"
|
||||
|
||||
# App
|
||||
backend_cors_origins: str = '["http://localhost:5173"]'
|
||||
debug: bool = True
|
||||
|
||||
@property
|
||||
def cors_origins(self) -> List[str]:
|
||||
return json.loads(self.backend_cors_origins)
|
||||
|
||||
model_config = {"env_file": ".env", "extra": "ignore"}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user