Initial commit: InfoUser Monitor with FastAPI, agent, Docker, JWT auth, notifications, filters and CSV export
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
APP_NAME: str = "InfoUser Monitor"
|
||||
SECRET_KEY: str = "change-me-in-production"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
AGENT_TOKEN: str = "agent-secret-token"
|
||||
DATABASE_URL: str = "sqlite:///./data/monitor.db"
|
||||
ADMIN_USERNAME: str = "admin"
|
||||
ADMIN_PASSWORD: str = "admin"
|
||||
CREATE_ADMIN_ON_STARTUP: bool = True
|
||||
OFFLINE_THRESHOLD_MINUTES: int = 130
|
||||
NOTIFICATION_WEBHOOK_URL: str = ""
|
||||
NOTIFICATION_TELEGRAM_BOT_TOKEN: str = ""
|
||||
NOTIFICATION_TELEGRAM_CHAT_ID: str = ""
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user