This repository was archived by the owner on Jul 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathadhocracy.ini.in
More file actions
434 lines (328 loc) · 15 KB
/
adhocracy.ini.in
File metadata and controls
434 lines (328 loc) · 15 KB
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
#
# WARNING: Please make you changes in *.ini.in file and then run buildout to install it.
#
##############################################################
# Generated adhocracy settings
##############################################################
[DEFAULT]
# Uncomment and replace with the address which should receive any error reports
email_to = ${parts.adhocracy['email.to']}
smtp_server = ${parts.adhocracy['smtp_server']}
smtp_port = ${parts.adhocracy['smtp_port']}
error_email_from = ${parts.adhocracy['email.from']}
[server:main]
use = egg:Paste#http
host = ${parts.adhocracy.host}
port = ${parts.ports.main}
{% if parts.adhocracy.debug == 'True' %}use_threadpool = False {% end %}
{% if parts.adhocracy.debug != 'True' %}use_threadpool = True {% end %}
threadpool_workers = 20
{% if "uwsgi_conf" in parts %}
[uwsgi]
${parts.uwsgi_conf.conf}
{% end %}
{% if parts.adhocracy.themed == 'False' %}
###################not themed adhocracy ###################
[composite:main]
use = egg:Paste#urlmap
/ = default
[pipeline:default]
pipeline = content
{% end %}
{% if parts.adhocracy.themed == 'True' %}
###################diazo theme adhocracy ###################
[composite:main]
use = egg:Paste#urlmap
/static_theme = static
/_wordpress = wordpress_pipe
/ = default
# Serve the theme from disk from /static (as set up in [composite:main])
[app:static]
use = egg:Paste#static
document_root = ${parts.adhocracy_code.diazo_theme_rules_dir}
# Serve the Diazo-transformed content everywhere else
[pipeline:default]
pipeline = theme
content
#[filter:wsgirewrite]
#use = egg:WSGIRewrite
#rulesets = testurls
#[wsgirewrite:testurls]
#rule1 = ^/test$ /index
# Reference the rules file and the prefix applied to relative links
# (e.g. the stylesheet). We turn on debug mode so that the theme is
# re-built on each request, making it easy to experiment.
[filter:theme]
use = egg:diazo
read_network = True
rules = ${parts.adhocracy_code.diazo_theme_rules_dir}/rules.xml
prefix = /static_theme
doctype = <!DOCTYPE html>
{% if parts.adhocracy.debug == 'True' %}debug = true {% end %}
{% if parts.adhocracy.debug != 'True' %}debug = false {% end %}
wordpress_backend = ${parts.domains.blog}
wordpress_backend_startseite = ${parts.domains.blog}/startseite/
###################diazo theme wordpress ###################
[pipeline:wordpress_pipe]
pipeline = theme
_wordpress
# Proxy wordpress
[app:_wordpress]
use = egg:Paste#proxy
address = http://${parts.domains.blog}
suppress_http_headers = accept-encoding
{% end %}
###################Adhocracy conf ###################
#WARNING changed name: #[app:main]
[app:content]
use = egg:adhocracy
full_stack = true
static_files = true
cache_dir = ${parts.buildout.directory}/var/data
beaker.session.key = adhocracy_state
{% python
import random;
def randomhash(length):
return hex(random.SystemRandom().getrandbits(length))
%}
beaker.session.secret = {% if parts.adhocracy.secret == 'autogenerated' %}${randomhash(256)}{% end %}{% if parts.adhocracy.secret != 'autogenerated' %}${parts.adhocracy.secret}{% end %}
adhocracy.auth.secret = {% if parts.adhocracy.secret == 'autogenerated' %}${randomhash(256)}{% end %}{% if parts.adhocracy.secret != 'autogenerated' %}${parts.adhocracy.secret}{% end %}
adhocracy.crypto.secret = {% if parts.adhocracy.secret == 'autogenerated' %}${randomhash(256)}{% end %}{% if parts.adhocracy.secret != 'autogenerated' %}${parts.adhocracy.secret}{% end %}
# INSTALL: Use cookies instead of beaker(=file system) to store session values
# adhocracy.session.implementation = cookie
# INSTALL: Use URLs like /i/meta/proposal/foo instead of
# http://meta.adhocracy.lan:5001/proposal/foo
# If this is set, make sure to comment out beaker.session.cookie_domain
# and session.domain below.
adhocracy.relative_urls = ${parts.adhocracy.relative_urls}
# INSTALL: Insert your domain name here. Make sure to include the
# dot at the beginning of each domain to create wildcard cookies.
# Also make sure this is identical to the adhocracy.domains setting
# below.
# Should be commented out iff relative URLs are used.
{% if parts.adhocracy.relative_urls != 'True' %}beaker.session.cookie_domain = .${parts.domains.main}{% end %}
{% if parts.adhocracy.relative_urls != 'True' %}session.domain = .${parts.domains.main}{% end %}
# If you'd like to fine-tune the individual locations of the cache data dirs
# for the Cache data, or the Session saves, un-comment the desired settings
# here:
beaker.cache.data_dir = ${parts.buildout.directory}/var/data/cache
beaker.session.data_dir = ${parts.buildout.directory}/var/data/sessions
# INSTALL: Locate your Memcached server if installed. Otherwise comment this out.
memcached.server = 127.0.0.1:${parts.ports.memcached}
# INSTALL: SQLAlchemy database URL
sqlalchemy.url = ${parts.adhocracy['sqlalchemy.url']}
# INSTALL: Uncommenting this line will delete all locally saved data and drop
# the entire database. Please only use this if you have a backup ready.
# Yes, that's a magic string.
## adhocracy.setup.drop = KILL_EM_ALL
#
adhocracy.solr.url = http://${parts.solr.host}:${parts.solr.port}/solr
# If debug is enabled, an web-based interactive debugger can be executed from
# the HTTP500 error page, if the following option is set to true. This option
# doesn't have any effect if debug is false.
adhocracy.interactive_debugging = true
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
#set debug = false
{% if parts.adhocracy.debug != 'True' %}set debug = false {% end %}
# INSTALL: Set up the Adhocracy domain name. This will be used to determine the
# active instance, e.g. "Test Instance" for test.adhocracy.lan.
{% python
adhocracy_domain = parts['domains']['main']
if parts['domains'].get('main.force_port', None):
adhocracy_domain += ':%s' % parts['ports']['main']
%}
adhocracy.domain = ${adhocracy_domain}
adhocracy.protocol = ${parts.adhocracy.protocol}
{% if parts.adhocracy.protocol == 'https' %}beaker.session.secure = true {% end %}
# INSTALL: Set a site name for all instances. This will be used as a part of
# the html <title>, notification E-Mails etc.
adhocracy.site.name = ${parts.adhocracy['site.name']}
adhocracy.language = ${parts.adhocracy.language}
# INSTALL: Server timezone
# adhocracy.timezone = Europe/Berlin
# INSTALL: The site directory contains your site modifications of Adhocracy
# (e.g. logos, CSS, html pages). A skeleton site directory will be created
# by the "setup-app" paster command.
adhocracy.site.dir = ${parts.buildout.directory}/var/site
# INSTALL: Location of your custom client (overrides adhocracy defaults)
# adhocracy.client_location = ${parts.buildout.directory}/src/adhocracy.YOUR_theme/
# INSTALL: A nice E-Mail address.
adhocracy.email.from = ${parts.adhocracy['email.from']}
# INSTALL: Allow users to use the above email as sender address in mass messages
allow_system_email_in_mass_messages = True
# Show fallback icons in instance overview if no instance icon is defined
adhocracy.show_instance_fallback_icons = False
# INSTALL: Twitter. Since there is currently no option to take it out of the UI,
# you will want to use Twitter. Create an OAuth application to allow users to
# link their profiles: https://twitter.com/oauth_clients
adhocracy.twitter.username = ${parts.twitter.username}
adhocracy.twitter.key = ${parts.twitter.key}
adhocracy.twitter.secret = ${parts.twitter.secret}
adhocracy.twitter.consumer_key = ${parts.twitter.consumer_key}
adhocracy.twitter.consumer_secret = ${parts.twitter.consumer_key}
# INSTALL: Full path to a installation wide twitter profile which is used in
# follow-us link, e.g. http://twitter.com/liqd_de
adhocracy.twitter.profile_url = ${parts.twitter.profile_url}
# INSTALL: bit.ly is used as a URL shortener. Since their API requires auth, you
# can either leave the defaults here and give certain usage statistics to the
# Adhocracy developers, or you can create an account at http://api.bit.ly
#adhocracy.bitly.login =
#adhocracy.bitly.key =
# Redis is used to build a task queue that will be processed by the
# `worker` process.
# Note: host has to be an IP address, not a hostname
adhocracy.redis.host = ${parts.domains.redis}
adhocracy.redis.port = ${parts.ports.redis}
adhocracy.redis.queue = ${parts.adhocracy.queue}
# Background processing can be disabled entirely
adhocracy.background_processing = true
# INSTALL: If you want to use recaptcha uncomment these lines
#recaptcha.public_key = 6LcICcgSAAAAAKNYq9iM4lIpB_GSjYItF21wS4NS
#recaptcha.private_key = 6LcICcgSAAAAAEJL1zhVbX6N0TGb0zVXD_g2lXSo
# TUNING: Memcache page fragments?
adhocracy.cache_tiles = True
# adhocracy.instance = adhocracy
# INSTALL: Add an HTTP header that identifies the server we're running on
#adhocracy.include_machine_name_in_header = True
# INSTALL: Feedback instance settings.
# If feedback shall be used, users need to be member of the feedback instance.
# This can be achieved with the `adhocracy.instances.autojoin` option below. If
# the feedback instance is enabled later, existing users can be added to the
# feedback instance with the following command:
#
# `bin/adhocpy src/adhocracy/scripts/add_all_users_to_instances.py etc/adhocracy.ini feedback`
adhocracy.use_feedback_instance = true
adhocracy.feedback_instance_key = feedback
adhocracy.feedback_instance_label = Feedback
# INSTALL: Instances which new users automatically join. This can be a comma
# separated list of instances, or ALL. If feedback is enabled above, the
# corresponding instance key or ALL should be part of this list.
adhocracy.instances.autojoin = feedback
# INSTALL: Read client IP addresses from X-Forwarded-For header.
adhocracy.behind_proxy = ${parts.adhocracy.behind_proxy}
# INSTALL: Store statistic information about requests in the database
#adhocracy.requestlog_active = True
# ... but don't log IP addresses ('dontlog', default)
# ... but set the last 8 / 80 bits to zero ('anonymize')
# -.. but log the full IP address ('none')
#adhocracy.requestlog_ipanonymization = anonymize
# INSTALL: Redirect outgoing links so that we can see when a user leaves our site.
# adhocracy.track_outgoing_links = True
# Statistics via Piwik
piwik.site =
piwik.id =
# INSTALL: Allow select users to include HTML
# If this option is set to false, we only allow markdown input.
# If it is set, we make a best effort to filter unsafe HTML, but allow iframes
# and other complex constructs.
#adhocracy.allow_user_html = false
# INSTALL: Allow registration
#adhocracy.allow_registration = true
# INSTALL: If registration is disabled above, and adhocracy.login_style is
# "alternate", notify this address on registration attempts.
# adhocracy.registration_support_email = ${parts.adhocracy['email.to']}
# INSTALL: How can users login?
# Available options are openid, username+password, email+password, shibboleth
# Note that shibboleth needs additional configuration
#adhocracy.login_type = openid,username+password,email+password
# Allow password change for shibboleth users (default: false)
# adhocracy.allow_shibboleth_password_change = false
# Hide local login form (e.g. when using Shibboleth or OpenID primarily)
# The normal login can still be found under `/login?locallogin`
# adhocracy.hide_locallogin = true
# INSTALL: Allow administrators to let users log in from an invitation email
# adhocracy.enable_welcome = True
# INSTALL: Hide individual votes and only show aggregate results (EXPERIMENTAL)
# adhocracy.hide_individual_votes = true
# INSTALL: Allow users to lock themselves out of adhocracy
# adhocracy.allow_self_deletion = true
# In the case that no came_from parameter is set, users are redirected to the
# locations defined in the following settings. You can leave any of these
# commented out. If instance is given, the url of the given instance is used
# to build the URL, otherwise the current instance is used.
# adhocracy.post_register_url =
# adhocracy.post_register_instance =
# adhocracy.post_login_url = /proposal
# adhocracy.post_login_instance = test
# activate geo features
{% if parts.adhocracy.geo == 'True' %}
adhocracy.proposal_geotags = True
adhocracy.page_geotags = True
adhocracy.show_overview_map_on_index = True
adhocracy.show_overview_map_on_instance_index = False
{% end %}
# show tutorials
adhocracy.show_tutorials = True
# hide instance list in main navigation
adhocracy.hide_instance_list_in_navigation = False
# hide watchlist in main navigation and put it in user menu
adhocracy.put_watchlist_in_user_menu = False
# useful in settings where users can create instances
adhocracy.show_instance_creators = False
# show next milestones in instance overview
adhocracy.show_instance_overview_milestones = True
# number of upcoming milestones to show in instance overview
adhocracy.number_instance_overview_milestones = 3
# show newest proposals in instance overview
# adhocracy.show_instance_overview_proposals_new = False
# hide categories in facet navigation if no proposal is assigned to it
adhocracy.hide_empty_categories_in_facet_list = True
# Show global stats (user/proposal/comment count) on frontpage
#adhocracy.show_stats_on_frontpage = true
# number of newest proposals to show on frontpage (0 to hide the list)
adhocracy.startpage.proposals.list_length = 0
# Source for imprint, details etc. ("database" or "filesystem" (default))
#adhocracy.staticpage_backend = database
# Configure paths to static content which is inserted
# Static content path for start page (default: index)
adhocracy.static_index_path = index
# Static content path for login page (default: empty)
# adhocracy.static_login_path = login
# Static content path for shibboleth register page (default: empty)
# adhocracy.static_shibboleth_register_path = shibboleth_register
# Ask the user for email and then password, instead of form + links
# adhocracy.login_style = alternate
# Automatically set new permissions their default value. This should be
# set to false in restrictive environments.
# adhocracy.autoassign_permissions = true
# Turn on badge-specific UI modifications
# adhocracy.enable_behavior = True
# Show Facebook / Twitter / G+ buttons
# adhocracy.show_social_buttons = False
# Logging configuration
[loggers]
keys = root, adhocracy, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.
[logger_adhocracy]
{% if parts.adhocracy.debug == 'True' %}level = DEBUG {% end %}
{% if parts.adhocracy.debug != 'True' %}level = INFO {% end %}
handlers =
qualname = adhocracy
[logger_sqlalchemy]
level = WARN
handlers = console
qualname = sqlalchemy.engine
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
##############################################################
# Custom OVERRIDE adhocracy settings
##############################################################
${parts.adhocracy['settings_override']}