/streamlit-hello

Primary LanguagePythonApache License 2.0Apache-2.0

The streamlit hello multipage demo app, on Railway!

Deploy on Railway

This project highlights Streamlit's new multipage app functionality. Now deployable directly to Railway!

In-use Animation

How to run this project locally

  • pip install -r requirements.txt
  • streamlit run Hello.py
  • open your browser to http://127.0.0.1:8501

Learn more

What makes this work on Railway?

For this project to run on Railway I have added a railway.json file with a custom start command, let me break the start command down:

  • streamlit run Hello.py tells streamlit to run Hello.py
  • --server.address 0.0.0.0 listen on host 0.0.0.0 so that streamlit is accessible externally
  • --server.port $PORT configures streamlit to listen on the auto assigned PORT variable that railway expects the app to listen on
  • --server.fileWatcherType none turns off the file watcher, code changes can't be made after the deployment so starting a file watcher uses unnecessary resources and can cause instabilities
  • --browser.gatherUsageStats false disables telemetry reporting
  • --client.showErrorDetails false disables showing debug messages in the browser
  • --client.toolbarMode minimal removes the 3-dot debug menu from the deployed site

Documentation for additional configurations can be found here

I have also updated the dependencies in the requirements.txt file, and added a .python-version file that tells Railway to build this project with Python 3.10

Questions? Comments? - Streamlit

Please ask in the community forum

Questions? Comments? - Railway

Join our discord server and open a #Help thread!