Initial Plast Track MVP
This commit is contained in:
21
backend/app/config.py
Normal file
21
backend/app/config.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from functools import lru_cache
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
||||
|
||||
app_name: str = "Plast Track MVP"
|
||||
database_url: str = "postgresql+psycopg://plasttrack:plasttrack@database:5432/plasttrack"
|
||||
mqtt_host: str = "mqtt"
|
||||
mqtt_port: int = 1883
|
||||
mqtt_topic: str = "plasttrack/machines/+/events"
|
||||
mqtt_client_id: str = "plast-track-backend"
|
||||
frontend_origin: str = "http://localhost:5173"
|
||||
downtime_check_interval_sec: int = 5
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user