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)