Skip to content

Instantly share code, notes, and snippets.

@kitak
Created October 16, 2016 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitak/b0397088a1097f1208490265d24c98f9 to your computer and use it in GitHub Desktop.
Save kitak/b0397088a1097f1208490265d24c98f9 to your computer and use it in GitHub Desktop.
gunicorn memo
import multiprocessing
bind = '0.0.0.0:8080'
workers = multiprocessing.cpu_count() * 2 + 1
daemon = True
pidfile = 'app.pid'
accesslog = 'logs/access.log'
errorlog = 'logs/error.log'
gunicorn -c gunicorn_config.py bookmark:app # launch
kill `cat app.pid` # shutdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment