zope.conf.in 3.7 KB
Newer Older
1 2
# Note: Environment is setup in running wrapper script, as zope.conf is read
# too late for some components.
3
%define INSTANCE {{ parameter_dict['instance'] }}
4 5
instancehome $INSTANCE
zserver-threads {{ parameter_dict['thread-amount'] }}
6 7 8 9 10 11 12 13
# When ownership checking is enabled, the roles a script runs as are the
# intersection between user's roles and script owner's roles. This means
# that revoking a code author's access to the system prevent all scripts
# owned by that user from being of much use.
# This is not how ERP5 approaches development: Managers write code,
# Managers must be trustable and trusted, and their past work should not be
# revoked when their account is terminated.
skip-ownership-checking true
14 15 16 17 18 19 20 21 22

lock-filename {{ parameter_dict['lock-file'] }}
pid-filename {{ parameter_dict['pid-file'] }}

default-zpublisher-encoding utf-8
rest-input-encoding utf-8
rest-output-encoding utf-8

# XXX: isn't this entry implicit ?
23
products {{ parameter_dict['instance-products'] }}
24

25
{% if parameter_dict['webdav'] -%}
26
<webdav-source-server>
27
  address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
28 29
  force-connection-close off
</webdav-source-server>
30 31 32 33 34
{% else %}
<http-server>
  address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
</http-server>
{%- endif %}
35 36 37 38 39 40

<zoperunner>
    program $INSTANCE/bin/runzope
</zoperunner>

<product-config DeadlockDebugger>
41 42
  dump_url {{ parameter_dict['deadlock-path'] }}
  secret {{ parameter_dict['deadlock-debugger-password'] }}
43 44
</product-config>

45 46 47 48 49 50 51 52
{% if 'longrequest-logger-interval' in parameter_dict -%}
<product-config LongRequestLogger>
  logfile {{ parameter_dict['longrequest-logger-file'] }}
  timeout {{ parameter_dict['longrequest-logger-timeout'] }}
  interval {{ parameter_dict['longrequest-logger-interval'] }}
</product-config>

{% endif -%}
53
{% if 'tidstorage-ip' in parameter_dict -%}
54
<product-config TIDStorage>
55
  backend-ip {{ parameter_dict['tidstorage-ip'] }}
56
  backend-port {{ parameter_dict['tidstorage-port'] }}
57 58 59
</product-config>

{% endif -%}
60 61 62 63
<product-config CMFActivity>
  node-id {{ parameter_dict['node-id'] }}
</product-config>

64
{% set timerserver_interval = parameter_dict['timerserver-interval'] -%}
65
{% if timerserver_interval -%}
66 67
%import timerserver
<timer-server>
68
  interval {{ timerserver_interval }}
69 70 71
</timer-server>

{% endif -%}
72
{% set promise_path = parameter_dict['promise-path'] -%}
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
{% if promise_path -%}
<product-config /{{ parameter_dict['site-id'] }}>
  promise_path {{ promise_path }}
</product-config>

{% endif -%}
<eventlog>
  level info
  <logfile>
    dateformat
    path {{ parameter_dict['event-log'] }}
  </logfile>
</eventlog>

<logger access>
  level WARN
  <logfile>
    dateformat
91
    format %(message)s
92 93 94 95 96 97 98 99 100 101 102 103
    path {{ parameter_dict['z2-log'] }}
  </logfile>
</logger>

<zodb_db temporary>
  <temporarystorage>
    name temporary storage for sessioning
  </temporarystorage>
  mount-point /temp_folder
  container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

104 105 106 107 108 109 110
{% set developer_list = parameter_dict['developer-list'] -%}
{% if developer_list -%}
%import Products.ERP5Type
<ERP5Type erp5>
  developers {{ developer_list | join(' ') }}
</ERP5Type>

111 112 113 114
{% endif -%}
{% for m in parameter_dict['import-list'] -%}
%import {{ m }}
{% endfor -%}
115 116 117 118 119
{% set type_dict = {'neo': 'NEOStorage', 'zeo': 'zeoclient'} %}
{% for name, zodb_dict in parameter_dict['zodb-dict'].iteritems() %}
<zodb_db {{ name }}>
{%- set storage_type = type_dict[zodb_dict.pop('type')] %}
{%- set storage_dict = zodb_dict.pop('storage-dict') %}
120 121 122
{%- for key, value in zodb_dict.iteritems() %}
  {{ key }} {{ value }}
{%-   endfor %}
123 124 125 126 127 128 129 130
  <{{ storage_type }}>
{%-   for key, value in storage_dict.iteritems() %}
    {{ key }} {{ value }}
{%-   endfor %}
  </{{ storage_type }}>
</zodb_db>

{% endfor -%}