Skip to content

Commit

Permalink
Use waitress instead of gunicorn to work around a bug in heroku.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmispelon committed Nov 8, 2014
1 parent 0227daf commit 19df845
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We need to create a `requirements.txt` file to tell Heroku what Python packages

But first, Heroku needs us to install a few packages. Go to your console with `virtualenv` activated and type this:

(myvenv) $ pip install dj-database-url gunicorn whitenoise
(myvenv) $ pip install dj-database-url waitress whitenoise

After the installation is finished, go to the `djangogirls` directory and run this command:

Expand All @@ -34,9 +34,9 @@ This line is needed for your application to work on Heroku.
Another thing we need to create is a Procfile. This will let Heroku know which commands to run in order to start our website.
Open up your code editor, create a file called `Procfile` in `djangogirls` directory and add this line:

web: gunicorn mysite.wsgi
web: waitress-serve --port=$PORT mysite.wsgi:application

This line means that we're going to be deploying a `web` application, and we'll do that by running the command `gunicorn mysite.wsgi` (`gunicorn` is a program that's like a more powerful version of Django's `runserver` command).
This line means that we're going to be deploying a `web` application, and we'll do that by running the command `waitress-serve --port=$PORT mysite.wsgi:application` (`waitress-serve` is a program that's like a more powerful version of Django's `runserver` command).

Then save it. Done!

Expand Down

0 comments on commit 19df845

Please sign in to comment.