summaryrefslogtreecommitdiff
path: root/openerp-wsgi.py
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-09-22 12:51:07 +0200
committerAntony Lesuisse <al@openerp.com>2012-09-22 12:51:07 +0200
commit4679680dba42a4071c8fbbc43a33e2e61bdb812e (patch)
tree27149f115fd94d508a394d673b447f96cff21206 /openerp-wsgi.py
parentf4a296e0289952f939d39b4b9836ca45dff9d247 (diff)
manual merge of multicorn
bzr revid: al@openerp.com-20120922105107-q02ogtsfudphzkl6
Diffstat (limited to 'openerp-wsgi.py')
-rw-r--r--openerp-wsgi.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/openerp-wsgi.py b/openerp-wsgi.py
new file mode 100644
index 00000000000..7382b90d3b7
--- /dev/null
+++ b/openerp-wsgi.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+# 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 --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 openerp:wsgi.core.application -c gunicorn.conf.py
+
+import openerp
+
+#----------------------------------------------------------
+# Common
+#----------------------------------------------------------
+# Equivalent of --load command-line option
+openerp.conf.server_wide_modules = ['web']
+conf = openerp.tools.config
+
+# Path to the OpenERP Addons repository (comma-separated for
+# multiple locations)
+conf['addons_path'] = '/home/openerp/addons/trunk,/home/openerp/web/trunk/addons'
+conf['addons_path'] = '/home/wis/stuff/version/openerp/source/addons/6.1,/home/wis/stuff/version/openerp/source/web/6.1/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 = openerp.service.wsgi_server.application
+
+#----------------------------------------------------------
+# Gunicorn
+#----------------------------------------------------------
+# Standard OpenERP XML-RPC port is 8069
+bind = '127.0.0.1:8069'
+pidfile = '.gunicorn.pid'
+workers = 4
+timeout = 240
+max_requests = 2000
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: