Skip to content

A lightweight Django wsgi server ready for deployment on Heroku.

License

Notifications You must be signed in to change notification settings

elmarzouki/minimal-django-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimal-django-heroku

A lightweight Django server ready for deployment on Heroku.

Getting Started

Clone this repository: git clone git@github.com:iSuperMostafa/minimal-django-heroku.git

Setup the environment

  1. Create virtualenv: virtualenv env
  2. Activate env: source env/bin/activate
  3. Install pipenv: pip install pipenv
  4. Install requirements: pipenv install

Run the application locally

Run the server: gunicorn app.wsgi

Start with Heroku

Signup to Heroku here.

Install Heroku-CLI

sudo apt-get update
sudo apt-get install ruby-full
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku
heroku login

Deploy to Heroku

heroku create --buildpack heroku/python
heroku config:set DISABLE_COLLECTSTATIC=1
git push heroku master
heroku logs