mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-10-04 06:11:07 +01:00
feat(docker): add support for HOST env
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
@@ -21,4 +22,5 @@ app.include_router(router=router)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(app, host="0.0.0.0", port=8191, log_level=LOG_LEVEL) # noqa: S104
|
||||
host = os.getenv("HOST", "0.0.0.0")
|
||||
uvicorn.run(app, host="host", port=8191, log_level=LOG_LEVEL) # noqa: S104
|
||||
|
||||
Reference in New Issue
Block a user