Hammad712 commited on
Commit
5715faa
·
1 Parent(s): 52f18dd

Updated main file

Browse files
Files changed (1) hide show
  1. app/main.py +5 -7
app/main.py CHANGED
@@ -149,14 +149,12 @@ async def internal_error_handler(request, exc):
149
  if __name__ == "__main__":
150
  import uvicorn
151
 
152
- # Force Cloud Run compatible host/port
153
- host = os.getenv("HOST", "0.0.0.0")
154
- port = int(os.getenv("PORT", settings.port if settings.port else 8080))
155
 
156
- logger.info(f"Starting Uvicorn with host={host}, port={port}")
157
  uvicorn.run(
158
  "app.main:app",
159
- host=host,
160
- port=port,
161
- reload=settings.debug
162
  )
 
 
149
  if __name__ == "__main__":
150
  import uvicorn
151
 
152
+ import os
 
 
153
 
154
+ port = int(os.environ.get("PORT", 8080))
155
  uvicorn.run(
156
  "app.main:app",
157
+ host="0.0.0.0",
158
+ port=port
 
159
  )
160
+