2020-11-22 17:20:19 +00:00
|
|
|
"""
|
|
|
|
Configuration for Gunicorn
|
|
|
|
"""
|
2020-11-22 12:39:00 +00:00
|
|
|
import multiprocessing
|
|
|
|
|
|
|
|
|
2020-11-23 17:05:02 +00:00
|
|
|
bind = 'django:8000'
|
|
|
|
|
2020-11-22 17:20:19 +00:00
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#workers
|
2020-11-22 12:39:00 +00:00
|
|
|
workers = multiprocessing.cpu_count() * 2 + 1
|
2020-11-22 17:20:19 +00:00
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#logging
|
|
|
|
loglevel = 'info'
|
|
|
|
accesslog = '-' # log to stdout
|
|
|
|
errorlog = '-' # log to stdout
|
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
|
|
|
pidfile = '/tmp/gunicorn.pid'
|