When looking for options to host this app, I mainly considered two factors
- Service hosting cost
- Data transfer cost (mostly S3 egress costs)
For a demo app like this with almost no traffic, it wouldn’t have been reasonable for the costs to be more than a few cents per month.
Being specifically designed to host streamlit projects, Streamlit Cloud was the first option I considered. By simply connecting the project’s github repo to streamlit cloud I was able to quickly deploy my app in there. There were, however, a couple of drawbacks that eventually made me consider other options
- The level of customization for the build, deploy and run process was limited
It is GCP hosted, which meant that I would’ve eventually incurred in noticeable egress costs
AWS App Runner
App Runner seemed like an interesting alternative, considering the app uses S3 as its storage service. However it proved to be a dead end for me, mainly because of two reasons
Finally, I looked at Heroku and realised that it seemed quite a fit
What was even better was that Heroku is hosted in AWS, so provided I was able to deploy the app to the right AWS region I could cut off most of those egress costs. Luckily for me, the generic Heroku
eu region maps to
eu-west-1, which was exactly what I needed
curl -n -X GET https://api.heroku.com/regions/eu -H "Accept: application/vnd.heroku+json; version=3"
In the end I was able to deploy the app by doing some little adjustments to the project’s
Dockerfile and conveniently using Herkou CLI to build and release the image.
docker build --tag registry.heroku.com/transfermarkt-datasets/web
docker push registry.heroku.com/transfermarkt-datasets/web
heroku container:release web