From 3926729e0c0db84bc1993e84247b06dd5e5939d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 9 Sep 2022 02:41:42 +0000 Subject: [PATCH] SETTINGS.main_{host,port} --- api/ovdashboard_api/main.py | 4 ++-- api/ovdashboard_api/settings.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/ovdashboard_api/main.py b/api/ovdashboard_api/main.py index f715f5f..74881b8 100644 --- a/api/ovdashboard_api/main.py +++ b/api/ovdashboard_api/main.py @@ -40,8 +40,8 @@ def main() -> None: if webdav_check(): uvicorn_run( app="ovdashboard_api.main:app", - host="0.0.0.0", - port=8000, + host=SETTINGS.main_host, + port=SETTINGS.main_port, reload=not SETTINGS.production_mode, ) diff --git a/api/ovdashboard_api/settings.py b/api/ovdashboard_api/settings.py index 0afbf80..292ffcc 100644 --- a/api/ovdashboard_api/settings.py +++ b/api/ovdashboard_api/settings.py @@ -56,6 +56,8 @@ class Settings(BaseSettings): ping_host: str = "10.0.0.0" ping_port: int = 1 + main_host: str = "0.0.0.0" + main_port: int = 8000 api_prefix: str = "api/v1" openapi_url: str = "/openapi.json" docs_url: Optional[str] = None if production_mode else "/docs"