4446.1.1
by Antony Lesuisse
manual merge of multicorn |
1 |
# WSGI Handler sample configuration file.
|
2 |
#
|
|
3 |
# Change the appropriate settings below, in order to provide the parameters
|
|
4 |
# that would normally be passed in the command-line.
|
|
5 |
# (at least conf['addons_path'])
|
|
6 |
#
|
|
7 |
# For generic wsgi handlers a global application is defined.
|
|
8 |
# For uwsgi this should work:
|
|
4448
by Antony Lesuisse
[FIX] wsgi wrapper |
9 |
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
4446.1.1
by Antony Lesuisse
manual merge of multicorn |
10 |
#
|
11 |
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
|
12 |
# Then the following command should run:
|
|
4450
by Antony Lesuisse
[FIX] gunicorn wsgi wrapper instructions |
13 |
# $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py
|
4446.1.1
by Antony Lesuisse
manual merge of multicorn |
14 |
|
15 |
import openerp |
|
16 |
||
17 |
#----------------------------------------------------------
|
|
18 |
# Common
|
|
19 |
#----------------------------------------------------------
|
|
4448
by Antony Lesuisse
[FIX] wsgi wrapper |
20 |
openerp.multi_process = True # Nah! |
21 |
||
4446.1.1
by Antony Lesuisse
manual merge of multicorn |
22 |
# Equivalent of --load command-line option
|
23 |
openerp.conf.server_wide_modules = ['web'] |
|
24 |
conf = openerp.tools.config |
|
25 |
||
26 |
# Path to the OpenERP Addons repository (comma-separated for
|
|
27 |
# multiple locations)
|
|
28 |
||
4448
by Antony Lesuisse
[FIX] wsgi wrapper |
29 |
conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons' |
4446.1.1
by Antony Lesuisse
manual merge of multicorn |
30 |
|
31 |
# Optional database config if not using local socket
|
|
32 |
#conf['db_name'] = 'mycompany'
|
|
33 |
#conf['db_host'] = 'localhost'
|
|
34 |
#conf['db_user'] = 'foo'
|
|
35 |
#conf['db_port'] = 5432
|
|
36 |
#conf['db_password'] = 'secret'
|
|
37 |
||
38 |
#----------------------------------------------------------
|
|
39 |
# Generic WSGI handlers application
|
|
40 |
#----------------------------------------------------------
|
|
41 |
application = openerp.service.wsgi_server.application |
|
42 |
||
43 |
#----------------------------------------------------------
|
|
44 |
# Gunicorn
|
|
45 |
#----------------------------------------------------------
|
|
46 |
# Standard OpenERP XML-RPC port is 8069
|
|
47 |
bind = '127.0.0.1:8069' |
|
48 |
pidfile = '.gunicorn.pid' |
|
49 |
workers = 4 |
|
50 |
timeout = 240 |
|
51 |
max_requests = 2000 |
|
52 |
||
53 |
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|