SETTINGS.main_{host,port}

This commit is contained in:
Jörn-Michael Miehe 2022-09-09 02:41:42 +00:00
parent f36272a6c0
commit 3926729e0c
2 changed files with 4 additions and 2 deletions

View file

@ -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,
)

View file

@ -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"