2018-01-16 06:58:15 +01:00
|
|
|
# WSGI Handler sample configuration file.
|
|
|
|
#
|
|
|
|
# Change the appropriate settings below, in order to provide the parameters
|
|
|
|
# that would normally be passed in the command-line.
|
|
|
|
# (at least conf['addons_path'])
|
|
|
|
#
|
|
|
|
# For generic wsgi handlers a global application is defined.
|
|
|
|
# For uwsgi this should work:
|
|
|
|
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
|
|
|
#
|
|
|
|
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
|
|
|
# Then the following command should run:
|
2018-01-16 11:34:37 +01:00
|
|
|
# $ gunicorn flectra:service.wsgi_server.application -c openerp-wsgi.py
|
2018-01-16 06:58:15 +01:00
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
import flectra
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Common
|
|
|
|
#----------------------------------------------------------
|
2018-01-16 11:34:37 +01:00
|
|
|
flectra.multi_process = True # Nah!
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
# Equivalent of --load command-line option
|
2018-01-16 11:34:37 +01:00
|
|
|
flectra.conf.server_wide_modules = ['web']
|
|
|
|
conf = flectra.tools.config
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
# Path to the OpenERP Addons repository (comma-separated for
|
|
|
|
# multiple locations)
|
|
|
|
|
|
|
|
conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Generic WSGI handlers application
|
|
|
|
#----------------------------------------------------------
|
2018-01-16 11:34:37 +01:00
|
|
|
application = flectra.service.wsgi_server.application
|
2018-01-16 06:58:15 +01:00
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
flectra.service.server.load_server_wide_modules()
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Gunicorn
|
|
|
|
#----------------------------------------------------------
|
2018-01-16 11:34:37 +01:00
|
|
|
# Standard OpenERP XML-RPC port is 7073
|
|
|
|
bind = '127.0.0.1:7073'
|
2018-01-16 06:58:15 +01:00
|
|
|
pidfile = '.gunicorn.pid'
|
|
|
|
workers = 4
|
|
|
|
timeout = 240
|
|
|
|
max_requests = 2000
|