Streamlit - Docker App
Hello, I'm testing how to deploy a Python Streamlit app using docker. I have tested locally and it works, however I'm having an issue where I cannot access the actual website.
This is my docker file:
I have set the $PORT variable in railway. It deploys sucessfully but when it's trying to excecute the streamlit app it gives me this error:
Solution:Jump to solution
remove the
ENTRYPOINT
line and replace it with
read more about this command and all its flags here https://github.com/brody192/streamlit-hello?tab=readme-ov-file#what-makes-this-work-on-railway...11 Replies
Project ID:
N/A
PROJECT ID: 84cb72e2-0b70-4a72-9763-be101ea3eaca
Project ID: 84cb72e2-0b70-4a72-9763-be101ea3eaca
please use tripple backticks for these code blocks
Done! thanks for catching that
Solution
remove the
ENTRYPOINT
line and replace it with
read more about this command and all its flags here https://github.com/brody192/streamlit-hello?tab=readme-ov-file#what-makes-this-work-on-railwayThanks! I tried that and it now builds. However, when I try to access it it https://streamlittest-production.up.railway.app:8501, it never loads
dont specify the port https://streamlittest-production.up.railway.app/
Thank you so much! this is working now!
just as a curiosity, why the entry point line in my docker file wasn't working?
that was ran in exec mode, so the environment variable
$PORT
wasn't be escaped to it's set value and thus the literal string $PORT
was being passed into the streamlit cliI see... Thank you so much for your help @Brody !
no problem!