added dockerfile and removed cxfreeze from web_monitor requirements due to it breaking the docker setup

This commit is contained in:
UpstreamData
2022-03-08 09:09:28 -07:00
parent 7e91fe12e7
commit 7ba8044564
7 changed files with 40 additions and 4 deletions

View File

@@ -1,5 +1,10 @@
from tools.web_monitor.app import app
import uvicorn
def main():
uvicorn.run("app:app", host="0.0.0.0", port=80)
if __name__ == "__main__":
uvicorn.run("app:app", host="127.0.0.1", port=11115)
main()

View File

@@ -17,8 +17,8 @@ from tools.web_monitor.web_settings import get_current_settings, update_settings
app = FastAPI()
app.mount("/static", StaticFiles(directory="static"), name="static")
templates = Jinja2Templates(directory="templates")
app.mount("/static", StaticFiles(directory=os.path.join(os.path.dirname(__file__), "static")), name="static")
templates = Jinja2Templates(directory=os.path.join(os.path.dirname(__file__), "templates"))
@app.get("/")
@@ -322,4 +322,4 @@ async def do_websocket_scan(websocket: WebSocket, network_ip: str):
if __name__ == "__main__":
uvicorn.run("app:app", host="127.0.0.1", port=11115)
uvicorn.run("app:app", host="0.0.0.0", port=80)

Binary file not shown.