In trying to deploy my streamlit app, the site returns an HTTP error 502
even when the VM and app is live (I can see the “You can now view your Streamlit app in your browser.” in the logs)
The mistake happens here:
- Streamlit starts the app on port 8501 by default.
- In my
fly.toml
file, my internal port was specified as 8080.
Solution:
The problem was resolved after I had changed that to 8501!
Also, this was helpful: Listening Ports · Fly Docs