Add docker-ip-addr-manager initial app
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
import os
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
state_file: str
|
||||
docker_api_url: str
|
||||
docker_timeout_seconds: float
|
||||
app_port: int
|
||||
|
||||
|
||||
def get_settings() -> Settings:
|
||||
return Settings(
|
||||
state_file=os.getenv("STATE_FILE", "/data/entries.json"),
|
||||
docker_api_url=os.getenv("DOCKER_API_URL", "unix:///var/run/docker.sock"),
|
||||
docker_timeout_seconds=float(os.getenv("DOCKER_TIMEOUT_SECONDS", "3")),
|
||||
app_port=int(os.getenv("APP_PORT", "31810")),
|
||||
)
|
||||
Reference in New Issue
Block a user