Run multi Uvicorn API on same server #1393
-
Hi, I've search for result on GG but none work so I create a discussion, please help. from uvicorn import run
if __name__ == "__main__":
run("API_B0_MOB123:app", host="127.0.0.1", port=5000, reload=True)
run("API_B0_GTE4:app", host="127.0.0.1", port=7000, reload=True)
run("API_B0_GTE6:app", host="127.0.0.1", port=8000, reload=True)
run("API_B1:app", host="127.0.0.1", port=9000, reload=True)
run("API_B2:app", host="127.0.0.1", port=3000, reload=True) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor |
Beta Was this translation helpful? Give feedback.
-
Not sure what your goal is but you could supervisord to manage your processes : http://supervisord.org/ |
Beta Was this translation helpful? Give feedback.
Not sure what your goal is but you could supervisord to manage your processes : http://supervisord.org/
Containers would be a good solution too