Skip to content

Instantly share code, notes, and snippets.

@allanlei
Created February 6, 2012 20:07
Show Gist options
  • Save allanlei/1754496 to your computer and use it in GitHub Desktop.
Save allanlei/1754496 to your computer and use it in GitHub Desktop.
Sample Gunicorn config for Django on Heroku. Usage: "gunicorn -b 0.0.0.0:$PORT --settings $DJANGO_SETTINGS_MODULE -c gunicorn.py"
import multiprocessing
workers = multiprocessing.cpu_count() * 2 + 1
worker_class = 'gevent'
loglevel = 'error'
secure_scheme_headers = {
'HTTP_X_FORWARDED_PROTO': 'https'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment