From 8edccfe6e163ee2d2c9ae1f4fd66832e96549174 Mon Sep 17 00:00:00 2001 From: Jade Wang Date: Fri, 6 Dec 2024 00:49:29 -0800 Subject: [PATCH] :rocket: add some port specs for deploying to azure --- main.py | 5 +++++ requirements.txt | 3 ++- requirements2.txt | Bin 0 -> 6392 bytes 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 requirements2.txt diff --git a/main.py b/main.py index 8e80b6dc..79629da2 100644 --- a/main.py +++ b/main.py @@ -56,6 +56,11 @@ def get_session(): app = FastAPI() +# Ensure the app listens on the correct port +if __name__ == "__main__": + import uvicorn + uvicorn.run(app, host="0.0.0.0", port=int(os.getenv("PORT", 8000))) + app.add_middleware( CORSMiddleware, allow_origins=["*"], # Allow all origins diff --git a/requirements.txt b/requirements.txt index 6c71807d..7bdd04b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,8 @@ opencv-python Pylette mediapipe imutils -fastapi +fastapi[all] uvicorn sqlmodel gunicorn +SQLAlchemy \ No newline at end of file diff --git a/requirements2.txt b/requirements2.txt new file mode 100644 index 0000000000000000000000000000000000000000..d4d483cb4b872ab1e2971cdfd3879abd43194c25 GIT binary patch literal 6392 zcmchb&2Az`6oqRYDesUMU<}4!7%5UF*+m&?qEQxEA^vO_+l>v_n0fdl=c_|e-3@ri zW`w}tuDbW!bAPM;{bv|PVHNH}BRqy}_*t*Z@Gi9UZiXMj4`CSQVG(Zhc^{@)`BV5s z@AUh9xQMUc0^k19^J!S>^CC?2?L|_D`u3pRh5q-rd&(2m4fWr#zFGG=%%rK%uTgl8 z`X>7Q9M;-7*6M{`e6J%K2yHj?^}5pgTKGHqypF#w!bZE6;cjP3A-OC4r>7lF?K^JG zT8JN|DdV`%j;3UGq+=-S`w>T7nvt}$=31+JdbPC@JsqvDBiRbeA~Jp@w!3=6{G0BU_RA=u#m@sFn&{n?g@rU-MZ2o}j!IG++VdFY zueG-&yReR3?f45GuY{;-9X?$O_dLeQagGm>wX}L8Ez|HCo+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