From 1c468f4a81e17b0281875af0b25ef6e2b298f2eb Mon Sep 17 00:00:00 2001 From: Abdelrahman-17 Date: Sun, 26 Jul 2026 15:42:56 +0300 Subject: [PATCH] Fix: Add Dockerfile to root directory and set host to 0.0.0.0 --- Dockerfile | 4 ++-- app.py | 4 ---- q1-deploy-monitor/app.py | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6f3cb8..6e5b102 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ WORKDIR /app RUN pip install --no-cache-dir fastapi uvicorn -COPY app.py . +COPY q1-deploy-monitor/app.py . EXPOSE 8000 -CMD ["python", "app.py"] +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/app.py b/app.py index 20c4ee8..6b73f43 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,5 @@ from fastapi import FastAPI from fastapi.responses import HTMLResponse -import uvicorn import time app = FastAPI() @@ -67,6 +66,3 @@ def get_dashboard(): """ - -if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8000) diff --git a/q1-deploy-monitor/app.py b/q1-deploy-monitor/app.py index 20c4ee8..6b73f43 100644 --- a/q1-deploy-monitor/app.py +++ b/q1-deploy-monitor/app.py @@ -1,6 +1,5 @@ from fastapi import FastAPI from fastapi.responses import HTMLResponse -import uvicorn import time app = FastAPI() @@ -67,6 +66,3 @@ def get_dashboard(): """ - -if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8000)