-
Hello, Using uvicorn to run my fastAPI application and when I was dockerizing it I noticed that, without adding the "--host 0.0.0.0" for docker while running the server, I could not access localhost on host machine browser. This is because uvicorn defaults to 127.0.0.1. Is it possible to add a feature where uvicorn detects docker environments and switches to host 0.0.0.0? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
May 7, 2024
Replies: 1 comment
-
There's no way to do the detection properly. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's no way to do the detection properly.