Commit 1fa33a91 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

wip

parent af089ec5
......@@ -111,6 +111,11 @@
},
"type": "object"
},
"wsgi": {
"description": "If set to true, will run Zope as a WSGI application, otherwise will run Zope using the Medusa HTTP server.",
"type": "boolean",
"default": false
},
"zope-partition-dict": {
"description": "Zope layout definition",
"default": {
......
......@@ -110,6 +110,7 @@ parts +=
eggs-all-scripts
testrunner
test_suite_runner
zopewsgi
# basic Xorg
libXdmcp
......@@ -439,6 +440,16 @@ initialization =
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
[zopewsgi]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
# expose entry point for test runner
recipe = zc.recipe.egg
eggs = ${eggs:eggs}
extra-paths = ${eggs:extra-paths}
entry-points =
runwsgi=erp5.util.zopewsgi:runwsgi
scripts=runwsgi
[eggs]
<= neoppod
eggs = ${neoppod:eggs}
......
......@@ -34,7 +34,7 @@ md5sum = fe6ae121134a0e5bdb060073478be44e
[template-zope-conf]
filename = zope.conf.in
md5sum = adb25a1ab15c8aecf40a3952528f81c2
md5sum = 14ede94f4e0d146c14e6ecc6b086dac1
[site-zcml]
filename = site.zcml
......@@ -74,7 +74,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = acd108217ff7a1b02b338c01c9c4aa27
md5sum = c5007595dc58e516f1d43a2d9fd32b7c
[template-zeo]
filename = instance-zeo.cfg.in
......@@ -82,7 +82,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
[template-zope]
filename = instance-zope.cfg.in
md5sum = 1a06ffa9f54e59604d4fedac0f6a99e7
md5sum = e3c9c3e28914c8e4d72f5aaf0f8222fe
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -196,6 +196,7 @@ config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longreques
config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-wsgi = {{ dumps(zope_parameter_dict.get('wsgi', False)) }}
{% if test_runner_enabled -%}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
{% endif -%}
......
{% set wsgi = slapparameter_dict['wsgi'] -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set site_id = slapparameter_dict['site-id'] -%}
......@@ -218,7 +219,11 @@ pem = {{dumps(storage_dict.pop(k))}}
[runzope-base]
<= run-common
instance-home = ${directory:instance}
{% if wsgi -%}
wrapped-command-line = '{{ bin_directory }}/runwsgi' '${:configuration-file}'
{% else -%}
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
{%- endif %}
private-dev-shm = {{ slapparameter_dict['private-dev-shm'] }}
[{{ section('zcml') }}]
......@@ -292,6 +297,7 @@ webdav = {{ dumps(webdav) }}
{% else -%}
{% set timerserver_interval = slapparameter_dict['timerserver-interval'] -%}
{%- endif %}
wsgi = {{ dumps(wsgi) }}
timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base]
......
......@@ -28,9 +28,13 @@ products {{ parameter_dict['instance-products'] }}
force-connection-close off
</webdav-source-server>
{% else %}
{% if parameter_dict['wsgi'] -%}
foobarbaz
{% else %}
<http-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
</http-server>
{% endif %}
{%- endif %}
<zoperunner>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment