Created
October 16, 2016 02:28
-
-
Save kitak/b0397088a1097f1208490265d24c98f9 to your computer and use it in GitHub Desktop.
gunicorn memo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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