diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-09-30 17:23:30 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-09-30 17:23:30 +0200 |
| commit | c8cc54559b75a621e4444ecdca6abd901b45e494 (patch) | |
| tree | 92141325d4dbbf70bbfb8e0c040d4435c8d2378f /setup/odoo-wsgi.example.py | |
| parent | b2804b1d2ae5fd7ec5c0eca79a8db77476badc84 (diff) | |
| parent | 91a14488250bc2bb405cc6d300359aa272642484 (diff) | |
[MERGE] forward port branch 10.0 up to 91a1448
Diffstat (limited to 'setup/odoo-wsgi.example.py')
| -rw-r--r-- | setup/odoo-wsgi.example.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/setup/odoo-wsgi.example.py b/setup/odoo-wsgi.example.py new file mode 100644 index 00000000000..7bc9c7f95e5 --- /dev/null +++ b/setup/odoo-wsgi.example.py @@ -0,0 +1,53 @@ +# 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: +# $ gunicorn odoo:service.wsgi_server.application -c openerp-wsgi.py + +import odoo + +#---------------------------------------------------------- +# Common +#---------------------------------------------------------- +odoo.multi_process = True # Nah! + +# Equivalent of --load command-line option +odoo.conf.server_wide_modules = ['web'] +conf = odoo.tools.config + +# 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 +#---------------------------------------------------------- +application = odoo.service.wsgi_server.application + +odoo.service.server.load_server_wide_modules() + +#---------------------------------------------------------- +# Gunicorn +#---------------------------------------------------------- +# Standard OpenERP XML-RPC port is 8069 +bind = '127.0.0.1:8069' +pidfile = '.gunicorn.pid' +workers = 4 +timeout = 240 +max_requests = 2000 |
