2020-12-12 19:37:20 +01:00
|
|
|
"""
|
|
|
|
Configuration for Gunicorn
|
|
|
|
"""
|
|
|
|
import multiprocessing
|
|
|
|
|
2021-01-17 13:03:33 +01:00
|
|
|
|
2020-12-12 19:37:20 +01:00
|
|
|
bind = '127.0.0.1:__PORT__'
|
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#workers
|
|
|
|
workers = multiprocessing.cpu_count() * 2 + 1
|
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#logging
|
|
|
|
loglevel = 'info'
|
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#logging
|
|
|
|
accesslog = '__LOG_FILE__'
|
|
|
|
errorlog = '__LOG_FILE__'
|
|
|
|
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
2023-11-09 20:37:13 +01:00
|
|
|
pidfile = '__DATA_DIR__/gunicorn.pid' # /home/yunohost.app/$app/gunicorn.pid
|