Skip to content

Commit

Permalink
🚀 add some port specs for deploying to azure
Browse files Browse the repository at this point in the history
  • Loading branch information
jadewang26 committed Dec 6, 2024
1 parent ae86d8c commit 8edccfe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ opencv-python
Pylette
mediapipe
imutils
fastapi
fastapi[all]
uvicorn
sqlmodel
gunicorn
SQLAlchemy
Binary file added requirements2.txt
Binary file not shown.

0 comments on commit 8edccfe

Please sign in to comment.