You can create your Procfile and setup.sh on visual studio code.
pip install pipreqs and -pipreqs command will create requirements.txt
If you select interpreter path the Streamlit will detect python version.
That is worked for a simple “hello world” app. I suggest you should solve your deployment issues with simple hello world types to see errors and needs etc.
I followed same steps as you mentioned above but I’m getting below error.
2021-04-11T02:32:15.929862+00:00 heroku[web.1]: Starting process with command sh setup.sh && streamlit run app.py
2021-04-11T02:32:18.558538+00:00 heroku[web.1]: Process exited with status 2
2021-04-11T02:32:18.622439+00:00 heroku[web.1]: State changed from starting to crashed
2021-04-11T02:32:18.518709+00:00 app[web.1]: setup.sh: 2:
2021-04-11T02:32:18.518744+00:00 app[web.1]: setup.sh: 3: cannot create /app/.streamlit/config.toml
I have already added a directory .streamlit/config.toml and put my custom theme configuration there. Kindly check my Github repo. It’s functioning okay in Streamlit Share. Now I want to deploy it on Heroku too. But I am getting confused about how to set up the setup.sh file. Kindly help me with it. Is it possible to directly connect my config.toml file to the Procfile? What should I do to keep both Streamlit Share and Heroku app functioning?
In Heroku you must have a [server] section in config.toml, with headless and port entries as shown. Also remove sh setup.sh && from the Procfile as you don’t have a setup.sh in your repo.
However, I would keep the setup.sh and Procfile. But, change the [server] line to have >> instead of >. This will append the lines to your existing config.toml file.
But another thing I want to know, what does enableCORS = true mean? I checked some use false there. Should I put true or false here? Also, What should I do if I like to show the credential info (my name, email) at the bottom beside Made with Streamlit in my Heroku app?
@rafisics You may not require CORS for your app, and it works hand in hand with your client app calling server in different domains and the request/response headers they send each other. Setting this switch does not magically enable CORS; it just tells Heroku’s proxies how to handle requests and responses. It’ll likely come into play when you use Streamlit’s iframe and custom components when making “cross-domain (origin)” requests. See: Cross-Origin Resource Sharing (CORS) - HTTP | MDN
So, it’s safe to remove te line, right? Heroku vs Streamlit Share - which is better now for deploying the web app on the basis of overall performance while staying in the free plan?
Heroku vs. Streamlit Sharing depends on what perf you need. Currently you can pay to increase perf on Heroku, but I expect Streamlit Sharing will be better when it goes into GA and you can pay for perf/resource upgrades. It’ll be highly tuned for Streamlit apps and have enterprise team features that other platforms won’t have.
I am interested to stay as a free user of both platforms now. My main target is to embed my app on my website/blog post. I don’t know for sure. But as I have deployed the same app (GitHub - rafisics/suvat_calculator: 'Newtonian equations of linear motion' calculator a.k.a. SUVAT calculator) on both platforms, it seems like my Heroku app is comparatively a bit slower. But I prefer using a short URL for my app which Heroku provides. Is there anything can you suggest to increase my Heroku app perf except paying? Also, is there any chance of getting a custom/short URL for my Streamlit Share app?
I’m not experienced in running Streamlit apps on Google Colab, but believe it’s possible, and the claim is there aren’t any perf. limits. Search on the web for “deploying streamlit on google colab” and look at @Jesse_JCharis’s article here.
I have a similar problem, but what worked for the original poster is still throwing an error for me. I already set-up a config.toml file, so I don’t want to overwrite it (i.e. I used >> instead of >). My files look like this: