GithubHelp home page GithubHelp logo

revel109 / django-heroku-deploy Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 6 KB

The simplest way to deploy your django app in the heroku sky.

Python 100.00%
heroku django-heroku heroku-deployment django-production

django-heroku-deploy's Introduction

django-heroku-deploy

The simplest way to deploy your django app in the heroku sky.

Deploying in heroku is super easy now. I have almost 10 running applications surve by heroku. Here is the most simplified steps that i did follow everytime.

Step 1: Create a Procfile in your project root(linux: touch Procfile) add this inside the Procfile.

web: gunicorn project_name.wsgi

Step 2: Add this in your app/settings.py

# add this under import os
import django_heroku 
# Then all the way at the bottom of the file
# ... 
django_heroku.settings(locals())

step-3: add this in your requirements.txt:

django
gunicorn
django-heroku
psycopg2
psycopg2-binary

** psycopg2 will be need for postgres db setup in production.

step-4: login to your heroku cli heroku login

step-5: create new app if one doesn't yet exist heroku create my-app-name

step-6: create a new postgres database for your app heroku addons:create heroku-postgresql:hobby-dev

step-7: run: ./manage.py makemigrations You never need to makemigrations on the heroku server. You should always makemigrations locally then push them to the server. You should only have to migrate on the server.

step-8:

git add .
git commit -m "My application gonna fly in the heroku sky"
pit push heroku master

step-9: After successfull deploy, run: heroku run python manage.py migrate

step-10: create super-admin: heroku run python manage.py createsuperuser

Here you go. Your app is live now. Yaaaayy....

If you got something helpful here hit on the star button for this project. And if there has any issue with your deploying, feel free to Create an Issue. Cheers!

django-heroku-deploy's People

Contributors

revel109 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shifat151

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.