-
Notifications
You must be signed in to change notification settings - Fork 4
/
onegov.yml.example
383 lines (331 loc) · 11.6 KB
/
onegov.yml.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# OneGov Cloud Example Configuration
# ----------------------------------
# Mail Queues
# Each queue will need to have its own unique directory specified.
# The queues will make no attempt to split up or balance the load
# between each other if they share the same directory.
# Use yaml anchors/aliases to refer to the mail queue in the app
# config
mail_queues:
# Postmark mailer will use the mail category to determine the
# MessageStream that's used. Currently 'transactional' will be
# transformed to 'outbound' i.e. the default stream. As such
# the same queue can be used for both categories.
# postmark: &postmark
# mailer: postmark
# token: postmark-server-token
# directory: '/usr/local/var/onegov/mail/postmark'
# SMTP mailer will ignore the mail category. If you wish to use
# separate SMTP servers for separate categories, then you will
# need to specify different queues for them.
local_smtp: &local_smtp
mailer: smtp
directory: '/usr/local/var/onegov/mail/smtp'
host: localhost
port: 1025
force_tls: false
username:
password:
# The following block is shared with all applications below, though each
# application may override any or all values.
configuration: &global-config
# OneGov only accepts requests with URLs matching the following expression,
# in addition to localhost, which is always allowed.
allowed_hosts_expression: '^[a-z0-9-\.]+.(dev|test|io)'
# Additional exceptions to the host expressions can be listed one by one
# here (those are not expressions, but full host names)
# allowed_hosts:
# - example.org
# The DSN to the postgres serve in use. The database has to exist and onegov
# processes must have access. To create the db in the following example, you
# can simply use 'createdb onegov' on a host with postgres installed.
dsn: postgresql://localhost:5432/onegov
# Set this to true for production deployments. It ensures that cookies are
# only sent over a secure connection (TLS)
identity_secure: false
# The secrets with which cookie identities and CSRF tokens are created.
#
# If not given, a random secret will be created every time the host reboots.
# Has to be different for each application and should be configured
# explicitly on production systems.
#
# identity_secret: very-secret-key
# csrf_secret: another-very-secret-key
# OneGov knows two kinds of file storage. The first is called 'filestorage'
# and it only supports very simple storage without links to the database.
filestorage: fs.osfs.OSFS
filestorage_options:
root_path: '/usr/local/var/onegov/files'
create: true
dir_mode: 0755
# The second kind of storage is depot, which is linked with the database
# and is used more often and is the default for new deployments
depot_backend: 'depot.io.local.LocalFileStorage'
depot_storage_path: '/usr/local/var/onegov/depot'
# Theme compilation is quick and in development it is possible to always
# compile theme on every request.
always_compile_theme: false
# Some browsers send a special header when a user clicks on refresh while
# holding down shift. The following setting will recompile themes whenever
# that happens.
allow_shift_f5_compile: true
# OneGov keeps track of queries run against postgres and reports the
# redundant ones when 'redundant' is selected. Other possible values are
# 'all' and 'summary', to either get a print of all queries or just the
# number of queries. Either comment out or set to False to disable reporting.
sql_query_report: summary
# If this is set to true, each request will create a cprofile in the
# profiles folder. This slows down requests significantly.
profile: false
# Configures signing services (digital PDF signing), can be left out
# signing_services: './signing-services'
# Configures sentry tracebacks, usually only used in production or if
# the sentry integration needs to be tested.
# sentry_dsn: https://foo@sentry.io/bar
# OneGov holds two sorts of mail. Transactional, non-spammy e-mail or
# marketing e-mail. Though they can both have different configurations
# Each mail config can write to one of the mail_queues defined in
# global scope. This could all be the same queue. Use *aliases
# to refer to the mail queue &anchors declared above.
mail:
transactional:
sender: service@onegovcloud.ch
<<: *local_smtp
marketing:
sender: newsletters@onegovcloud.ch
<<: *local_smtp
# SMS delivery works a little differently from mail delivery, from the onset
# we assume that each schema has its own queue with its own ASPSM account and
# it is optional. They all share the same base directory though, each schema
# has its own subdirectory. We still allow defining a shared account at the
# application level however.
sms:
directory: '/usr/local/var/onegov/sms'
user:
password:
originator: OneGov
# tenants:
# "onegov_town6/meggen":
# user:
# password:
# originator: Meggen
# To test yubikey integration, a yubikey API access token has to be provided
# yubikey_client_id:
# yubikey_secret_key:
# To test mTAN second factor, enable it here
# mtan_second_factor_enabled: true
# mtan_automatic_setup: true
# To test mapbox integration, a mapbox token has to be provided
# mapbox_token:
# API rate limit, default is 100 requests per 15 Minutes
# api_rate_limit:
# requests: 100
# expiration: 900
# Websocket server configuration.
websockets:
client_url: ws://localhost:8765
client_csp: ws://localhost:8765
manage_url: ws://localhost:8765
manage_token: super-secret-token
# Install https://github.com/seantis/d3-renderer
# d3_renderer: 'http://localhost:1337'
# For Swissvotes, the Museum für Gestatlung has an api
# mfg_api_token:
# for org app, disable the password reset view (case the users have their own auth providers)
# disable_password_reset: true
# How long a user can fill out a form before we consider it too old
csrf_time_limit: 3600 # in minutes
# True if payment provider integration is used
payment_providers_enabled: false
# Stripe configuration with oauth gateway
payment_provider_defaults:
stripe_connect:
client_id: foo
client_secret: bar
# the gateway through which the redirects go
oauth_gateway: https://oauth.example.org
# the key needed to authenticate oneself with the gateway
oauth_gateway_auth: foobar
# the client-specific secret that is used to authenticate the
oauth_gateway_secret: barfoo
# Alternative login providers
# authentication_providers:
# msal:
# tenants:
# "onegov_agency/bs":
# tenant_id: ''
# client_id: ''
# client_secret: ''
# attributes:
# source_id: 'sub'
# username: 'email'
# groups: 'groups'
# first_name: 'given_name'
# last_name: 'family_name'
# roles:
# "onegov_agency/bs":
# admins: ''
# editors: ''
# members: ''
# # Login with LDAP, using Kerberos as authentication
# ldap_kerberos:
#
# # If set to true, the provider will automatically log in users that
# # hit the root page (/) if they have an account
# auto_login: true
#
# # Kerberos configuration
# kerberos_keytab: /etc/keytab
# kerberos_hostname: ogc.example.org
# kerberos_service: HTTP
#
# # LDAP configuration (TLS is required!)
# ldap_url: ldaps://ldap.example.org
# ldap_username: 'cn=service,ou=service,dc=seantis,dc=ch'
# ldap_password: 'hunter2'
#
# # LDAP attributes
# name_attribute: cn
# mails_attribute: mail
# groups_attribute: memberOf
#
# # This suffix is stripped from all user names if found.
# # For example, if Kerberos returns foo@example.org, but LDAP only
# # contains, 'foo', then setting the suffix to '@example.org' will help.
# suffix: '@example.org'
#
# # Role mapping
# roles:
#
# # For all applications
# "__default__":
# admin: admins
# editor: editors
# member: members
#
# # For applications of a specific namespace
# "onegov_org":
# admin: admins
# editor: editors
# member: members
#
# # For applications of a specific application id
# "onegov_org/govikon":
# admin: admins
# editor: editors
# member: members
# All supported applications
applications:
- path: /onegov_town6/*
application: onegov.town6.TownApp
namespace: onegov_town6
configuration:
<<: *global-config
- path: /onegov_agency/*
application: onegov.agency.AgencyApp
namespace: onegov_agency
configuration:
<<: *global-config
- path: /onegov_org/*
application: onegov.org.OrgApp
namespace: onegov_org
configuration:
<<: *global-config
- path: /events/*
application: onegov.org.OrgApp
namespace: events
configuration:
<<: *global-config
- path: /onegov_feriennet/*
application: onegov.feriennet.FeriennetApp
namespace: onegov_feriennet
configuration:
<<: *global-config
- path: /onegov_fsi/*
application: onegov.fsi.FsiApp
namespace: fsi
configuration:
<<: *global-config
- path: /onegov_election_day/*
application: onegov.election_day.ElectionDayApp
namespace: onegov_election_day
configuration:
<<: *global-config
- path: /onegov_gazette/*
application: onegov.gazette.GazetteApp
namespace: onegov_gazette
configuration:
<<: *global-config
- path: /onegov_intranet/*
application: onegov.intranet.IntranetApp
namespace: onegov_intranet
configuration:
<<: *global-config
- path: /onegov_landsgemeinde/*
application: onegov.landsgemeinde.LandsgemeindeApp
namespace: onegov_landsgemeinde
configuration:
<<: *global-config
- path: /onegov_winterthur/*
application: onegov.winterthur.WinterthurApp
namespace: onegov_winterthur
configuration:
<<: *global-config
- path: /onegov_swissvotes/*
application: onegov.swissvotes.SwissvotesApp
namespace: onegov_swissvotes
configuration:
<<: *global-config
- path: /onegov_translator_directory/*
application: onegov.translator_directory.TranslatorDirectoryApp
namespace: translator_directory
configuration:
<<: *global-config
- path: /onegov_pas/*
application: onegov.pas.PasApp
namespace: onegov_pas
configuration:
<<: *global-config
- path: /onegov_onboarding
application: onegov.onboarding.OnboardingApp
namespace: onegov_onboarding
configuration:
<<: *global-config
onboarding:
onegov.town6:
namespace: onegov_town6
domain: onegov.test
configuration:
depot_backend: depot.io.local.LocalFileStorage
depot_storage_path: /usr/local/var/onegov/depot
# Default logging output
logging:
disable_existing_loggers: true
formatters:
default:
format: '%(asctime)s - %(levelname)s: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
handlers:
console:
class: logging.StreamHandler
formatter: default
level: DEBUG
stream: ext://sys.stdout
index_log:
class: logging.FileHandler
formatter: default
level: DEBUG
filename: /usr/local/var/onegov/logs/onegov-search-reindex.log
mode: w
loggers:
onegov:
level: DEBUG
handlers: [console]
propagate: False
onegov.search.index:
level: DEBUG
handlers: [index_log]
propagate: False
stripe:
level: INFO
handlers: [console]