Deploy Django Website to Heroku Server/Website
How to Deploy Django Website to Heroku???
In this post, i am going to share some steps to deploy your first django application for free without using credit card. In this method, we will use Heroku Website.
Setups:
1. Create Account on Heroku
2. Create an app inside heroku website
3. Download & install HEROKU CLI on your system
COMMANDS:
Login to heroku:
heroku login
create an app:
heroku create app_name
4. Create requirments.txt on your project directory using
"pip freeze > requirements.txt"
5. Create runtime.txt and write the version of Python that you are using on your system in my case it is:
"python-3.8.6"
6. Create Procfile without any extension. This is only for deploying applications on Heroku. Write the following line in Procfile
"web: gunicorn coding_blog.wsgi --log-file -"
7. Initialize empty Git on the project
8. Add and commit all files using git commands
9. Run the following command to end the deploy process
"git push heroku master"
10. Your website is now successfully deployed to the Heroku website
Comments
Post a Comment