Merge branch 'master' of https://github.com/odoo/odoo
[odoo/odoo.git] / openerp-wsgi.py
1 # -*- coding: utf-8 -*-
2
3 """
4 WSGI Handler sample configuration file.
5 =======================================
6
7 Change the appropriate settings below, in order to provide the parameters
8 that would normally be passed in the command-line.
9
10 * For uwsgi this should work:
11
12     $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
13
14 For gunicorn additional globals need to be defined in the Gunicorn section.
15
16     $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py
17 """
18
19 import openerp
20
21 #----------------------------------------------------------
22 # Common
23 #----------------------------------------------------------
24 openerp.multi_process = True
25
26 # Equivalent of --load command-line option
27 openerp.conf.server_wide_modules = ['web']
28 conf = openerp.tools.config
29
30 # Path to the OpenERP Addons repository (comma-separated for
31 # multiple locations)
32
33 conf['addons_path'] = '/opt/odoo/addons,/opt/odoo/include/custom/8.0'
34
35 #conf['admin_passwd'] = 'TrucSuperCompliquĂ©EtVachementSecret'
36
37 # Optional database config if not using local socket
38 #conf['db_name'] = 'TODO'
39 #conf['dbfilter'] = 'TODO'
40 #conf['list_db'] = 'TODO'
41 #conf['db_host'] = 'localhost'
42 #conf['db_user'] = 'foo'
43 #conf['db_port'] = 5432
44 #conf['db_password'] = 'secret'
45
46 #----------------------------------------------------------
47 # Generic WSGI handlers application
48 #----------------------------------------------------------
49 application = openerp.service.wsgi_server.application
50
51 openerp.service.server.load_server_wide_modules()
52
53 #----------------------------------------------------------
54 # Gunicorn
55 #----------------------------------------------------------
56 # Standard OpenERP XML-RPC port is 8069
57 #bind = '127.0.0.1:8069'
58 #pidfile = '.gunicorn.pid'
59 #workers = 4
60 #timeout = 240
61 #max_requests = 2000
62
63 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: