Switch gunicorn to using a config file, which allows command line parameters to be changed without restarting the master process.
This commit is contained in:
parent
2d0a61b6c2
commit
867a3e38c1
2 changed files with 6 additions and 1 deletions
|
@ -21,7 +21,7 @@ running:
|
|||
|
||||
```
|
||||
sudo mkdir -p /mnt/nginx/ && sudo nginx -c `pwd`/nginx.conf
|
||||
STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class gevent -t 2000 application:application
|
||||
STACK=prod gunicorn -c gunicorn_config.py
|
||||
```
|
||||
|
||||
start the workers:
|
||||
|
|
5
gunicorn_config.py
Normal file
5
gunicorn_config.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
bind = 'unix:/tmp/gunicorn.sock'
|
||||
workers = 8
|
||||
worker_class = 'gevent'
|
||||
timeout = 2000
|
||||
daemon = True
|
Reference in a new issue