How to Deploy your Dash App on Heroku | by François St-Amant | Towards Data Science

You just spent weeks developing your Dash app. It now looks great and you want the world to see it? This tutorial will show you how to do just that using Heroku.
Heroku is a cloud application platform that allows you to run your apps, completely free of charge.
For this tutorial, you will need to install a few things:
Heroku account: https://id.heroku.com/login
Git Bash: https://git-scm.com/download/win
Virtualenv, which can be installed with pip: pip install virtualenv.
You should also download 4 files, all available right here: https://github.com/francoisstamant/dash_heroku_deployment.
App.py is the file that contains your Dash appplication. That’s the file that you should be changing if you want to update/improve the app.
requirements.txt contains the Python dependencies needed to run the app itself.
Alright, now that you got everything needed, here is the step-by-step tutorial that will get you to deploy your Dash app for everyone else to see!
Open Git. From there, type the following code to create a folder for the project and make that folder the current directory.
Open Git. From there, type the following code to create a folder for the project and make that folder the current directory.
$mkdir dash_app_deployment$cd dash_app_deployment
2. Initialize the folder with an empty Git repository with $ git init .
3. Create a virtual environment called venv with $ virtualenv venv .
4. If you are using Git Bash In order to activate the environment, you need to make the Scripts folder the current directory first. Then, you can activate the environment. Here are the commands:
5. Then, install Dash and Gunicorn in the virtual environment:
$ pip install dash$ pip install gunicorn
Just a heads up, it can take a while to install dash (took about 4 minutes for me).
5. Then, make sure to change the directory back to the repository, using in this case $ cd ~/dash_app_deployment.
6. Now, make sure the 4 files from earlier are actually copied in the current location and once they are, initialize the folder by adding them one by one, like this:
$ git add app.py$ git add Procfile$ git add requirements.txt$ git add .gitignore
7. You can now create the heroku app with the name you want for it. That name needs to be unique. It will let you know if the name is not available. Then, you can deploy your code to heroku.
$ heroku create francois-st-amant-app    $ git add .                              $ git commit -m 'Initial app template'$ git push heroku master
8. Finally, run the app on one dyno by doing $ heroku ps:scale web=1. Dynos are “containers” for running apps/code. Assuming you want to keep everything free, you are allowed 2 running dynos, each with 512MB of RAM.
The URL of your app should be visible after step 7. Basically, it will be https://name-of-your-app.herokuapp.com.
Here is my app: https://francois-st-amant-app.herokuapp.com/
You will notice that if you go on your Heroku account now, you will see your app page. From there, you can manage the app settings, add collaborators, etc.
To change the app, simply modify the app.py file. Then, the following 4 commands will allow you to push the changes to your Heroku app.
I hope this helped. Feel free to reach out should you have any questions. Thanks for reading!