File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ services:
8181 max-size : " 100m"
8282 max-file : " 5"
8383
84+ networks :
85+ - monai-network
86+
8487 # FastAPI Authentication & Gateway Service
8588 auth-gateway :
8689 build :
Original file line number Diff line number Diff line change 2929
3030settings = Settings ()
3131
32- REST_API_HOST = os .getenv ('REST_API_HOST' )
33- REST_API_PORT = int ( os .getenv ('REST_API_PORT' ) )
32+ REST_API_HOST = os .getenv ('REST_API_HOST' , '0.0.0.0' )
33+ REST_API_PORT_STR = os .getenv ('REST_API_PORT' , '8090' )
3434
35- if not REST_API_HOST or not REST_API_PORT :
36- print ("REST_API_HOST and/or REST_API_PORT must be set in environment variables" )
35+ try :
36+ REST_API_PORT = int (REST_API_PORT_STR )
37+ except (ValueError , TypeError ):
38+ print ("REST_API_PORT must be a valid integer" )
39+ sys .exit (1 )
40+
41+ if not REST_API_HOST :
42+ print ("REST_API_HOST must be set in environment variables" )
3743 sys .exit (1 )
3844
3945
@@ -427,8 +433,6 @@ async def not_found_handler(request, exc):
427433 print ("=" * 60 )
428434 print ("🔐 MONAI Authentication & Gateway Service" )
429435 print ("=" * 60 )
430- print (f"👤 Username: { settings .USERNAME } " )
431- print (f"🔑 Password: { settings .PASSWORD } " )
432436 print (f"🌐 Server: http://{ REST_API_HOST } :{ REST_API_PORT } " )
433437 print (f"🎯 TorchServe: { TORCHSERVE_URL } " )
434438 print (f"📂 Tokens: /app/tokens/key_file.json" )
You can’t perform that action at this time.
0 commit comments