-
Notifications
You must be signed in to change notification settings - Fork 10
/
gunicorn.conf.py
23 lines (22 loc) · 1 KB
/
gunicorn.conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import multiprocessing
import os
_basedir = os.path.dirname(__file__)
_logdir = os.path.join(_basedir, 'logs')
#bind = "unix:///tmp/gunicorn.socket"
bind = "0.0.0.0:8001"
# this is a busy machine, so don't overdo it
workers = multiprocessing.cpu_count()
max_requests = 100 #maximum number of requests before a worker is restarted
preload_app = True
chdir = os.path.dirname(__file__)
# daemon mode does not work with supervisord; see http://gunicorn-docs.readthedocs.org/en/latest/deploy.html
daemon = False
debug = False
accesslog = os.path.join(_logdir, 'access.log')
errorlog = os.path.join(_logdir, 'error.log')
pidfile = os.path.join(_logdir, 'gunicorn.pid')
loglevel = 'debug'
timeout = 60
# somehow these don't work -- the real IP is not captured in the gunicorn logfile
forwarded_allow_ips = '127.0.0.1,131.142.185.38,131.142.185.39,131.142.185.10,131.142.184.211,131.142.198.201,131.142.198.202'
proxy_allow_ips = '127.0.0.1,131.142.185.38,131.142.185.39,131.142.185.10,131.142.184.211,131.142.198.201,131.142.198.202'