2012-01-06 13:36:47 +00:00
|
|
|
# Gunicorn sample configuration file.
|
|
|
|
# See http://gunicorn.org/configure.html for more details.
|
|
|
|
#
|
2012-02-10 15:25:21 +00:00
|
|
|
# To run the OpenERP server via Gunicorn, change the appropriate
|
2012-01-06 13:36:47 +00:00
|
|
|
# settings below, in order to provide the parameters that
|
|
|
|
# would normally be passed in the command-line,
|
|
|
|
# (at least `bind` and `conf['addons_path']`), then execute:
|
2012-02-10 14:36:09 +00:00
|
|
|
# $ gunicorn openerp:wsgi.core.application -c gunicorn.conf.py
|
2012-02-10 15:25:21 +00:00
|
|
|
# or if you want to run it behind a reverse proxy, add the line
|
|
|
|
# import openerp.wsgi.proxied
|
|
|
|
# in this file and execute:
|
2012-02-10 14:36:09 +00:00
|
|
|
# $ gunicorn openerp:wsgi.proxied.application -c gunicorn.conf.py
|
2012-01-06 13:36:47 +00:00
|
|
|
|
2011-08-19 13:02:48 +00:00
|
|
|
import openerp
|
2012-01-06 13:36:47 +00:00
|
|
|
|
|
|
|
# Standard OpenERP XML-RPC port is 8069
|
2011-08-19 13:02:48 +00:00
|
|
|
bind = '127.0.0.1:8069'
|
2012-01-06 13:36:47 +00:00
|
|
|
|
2011-08-24 13:22:20 +00:00
|
|
|
pidfile = '.gunicorn.pid'
|
2012-01-06 13:36:47 +00:00
|
|
|
|
|
|
|
# Gunicorn recommends 2-4 x number_of_cpu_cores, but
|
|
|
|
# you'll want to vary this a bit to find the best for your
|
|
|
|
# particular work load.
|
|
|
|
workers = 4
|
|
|
|
|
2011-08-24 13:22:20 +00:00
|
|
|
# Some application-wide initialization is needed.
|
2012-02-10 14:36:09 +00:00
|
|
|
on_starting = openerp.wsgi.core.on_starting
|
|
|
|
when_ready = openerp.wsgi.core.when_ready
|
|
|
|
pre_request = openerp.wsgi.core.pre_request
|
|
|
|
post_request = openerp.wsgi.core.post_request
|
2011-09-12 10:21:47 +00:00
|
|
|
|
2012-01-06 13:36:47 +00:00
|
|
|
# openerp request-response cycle can be quite long for
|
|
|
|
# big reports for example
|
|
|
|
timeout = 240
|
|
|
|
|
2012-01-20 15:00:50 +00:00
|
|
|
max_requests = 2000
|
2012-01-20 11:46:12 +00:00
|
|
|
|
2012-01-06 13:36:47 +00:00
|
|
|
# Equivalent of --load command-line option
|
|
|
|
openerp.conf.server_wide_modules = ['web']
|
|
|
|
|
|
|
|
# internal TODO: use openerp.conf.xxx when available
|
2011-09-12 10:21:47 +00:00
|
|
|
conf = openerp.tools.config
|
2012-01-06 13:36:47 +00:00
|
|
|
|
|
|
|
# Path to the OpenERP Addons repository (comma-separated for
|
|
|
|
# multiple locations)
|
2012-01-12 08:48:42 +00:00
|
|
|
conf['addons_path'] = '/home/openerp/addons/trunk,/home/openerp/web/trunk/addons'
|
2012-01-06 13:36:47 +00:00
|
|
|
|
|
|
|
# Optional database config if not using local socket
|
|
|
|
#conf['db_name'] = 'mycompany'
|
|
|
|
#conf['db_host'] = 'localhost'
|
|
|
|
#conf['db_user'] = 'foo'
|
|
|
|
#conf['db_port'] = 5432
|
|
|
|
#conf['db_password'] = 'secret'
|
|
|
|
|
|
|
|
# OpenERP Log Level
|
|
|
|
# DEBUG=10, DEBUG_RPC=8, DEBUG_RPC_ANSWER=6, DEBUG_SQL=5, INFO=20,
|
|
|
|
# WARNING=30, ERROR=40, CRITICAL=50
|
|
|
|
# conf['log_level'] = 20
|
|
|
|
|
|
|
|
# If --static-http-enable is used, path for the static web directory
|
|
|
|
#conf['static_http_document_root'] = '/var/www'
|
|
|
|
|
2011-11-22 08:58:48 +00:00
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|