Comment on page
Deploying to Heroku
Posted on 15 Oct, 2019
- 1.
heroku login
- 2.
touch Procfile
Create Procfile for deployment. For a Django Web-App the contents of Procfile would be.
gunicorn djangoherokuapp.wsgi --log-file -
- 3.
touch runtime.txt
Specify your Python version here. For example
python-3.6.8
- 4.
heroku create herokuAPPName
Before running this, Make sure to addappname.herokuapp.com
in ALLOWED_HOSTS and yourrequirements.txt
is updated.
- 1.
heroku login
Login with your e-mail and password. - 2.
heroku git:remote -a <app-name>
Whereapp-name
is the name of app on heroku. - 3.
git push heroku master
Push new changes to heroku.