##// END OF EJS Templates
e-mail: clarify that smtp_use_ssl defaults to false...
Thomas De Schampheleire -
r5301:8479cf44 default
parent child Browse files
Show More
@@ -1,588 +1,588 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - Development config: #
4 4 # listening on *:5000 #
5 5 # sqlite and kallithea.db #
6 6 # initial_repo_scan = true #
7 7 # set debug = true #
8 8 # verbose and colorful logging #
9 9 # #
10 10 # The %(here)s variable will be replaced with the parent directory of this file#
11 11 ################################################################################
12 12 ################################################################################
13 13
14 14 [DEFAULT]
15 15 debug = true
16 16 pdebug = false
17 17
18 18 ################################################################################
19 19 ## Uncomment and replace with the address which should receive ##
20 20 ## any error reports after application crash ##
21 21 ## Additionally those settings will be used by Kallithea mailing system ##
22 22 ################################################################################
23 23 #email_to = admin@localhost
24 24 #error_email_from = paste_error@localhost
25 25 #app_email_from = kallithea-noreply@localhost
26 26 #email_prefix = [Kallithea]
27 27
28 28 #smtp_server = mail.server.com
29 29 #smtp_username =
30 30 #smtp_password =
31 31 #smtp_port =
32 32 #smtp_use_tls = false
33 #smtp_use_ssl = true
33 #smtp_use_ssl = false
34 34 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
35 35 #smtp_auth =
36 36
37 37 [server:main]
38 38 ## PASTE ##
39 39 #use = egg:Paste#http
40 40 ## nr of worker threads to spawn
41 41 #threadpool_workers = 5
42 42 ## max request before thread respawn
43 43 #threadpool_max_requests = 10
44 44 ## option to use threads of process
45 45 #use_threadpool = true
46 46
47 47 ## WAITRESS ##
48 48 use = egg:waitress#main
49 49 ## number of worker threads
50 50 threads = 5
51 51 ## MAX BODY SIZE 100GB
52 52 max_request_body_size = 107374182400
53 53 ## use poll instead of select, fixes fd limits, may not work on old
54 54 ## windows systems.
55 55 #asyncore_use_poll = True
56 56
57 57 ## GUNICORN ##
58 58 #use = egg:gunicorn#main
59 59 ## number of process workers. You must set `instance_id = *` when this option
60 60 ## is set to more than one worker
61 61 #workers = 1
62 62 ## process name
63 63 #proc_name = kallithea
64 64 ## type of worker class, one of sync, eventlet, gevent, tornado
65 65 ## recommended for bigger setup is using of of other than sync one
66 66 #worker_class = sync
67 67 #max_requests = 1000
68 68 ## ammount of time a worker can handle request before it gets killed and
69 69 ## restarted
70 70 #timeout = 3600
71 71
72 72 ## UWSGI ##
73 73 ## run with uwsgi --ini-paste-logged <inifile.ini>
74 74 #[uwsgi]
75 75 #socket = /tmp/uwsgi.sock
76 76 #master = true
77 77 #http = 127.0.0.1:5000
78 78
79 79 ## set as deamon and redirect all output to file
80 80 #daemonize = ./uwsgi_kallithea.log
81 81
82 82 ## master process PID
83 83 #pidfile = ./uwsgi_kallithea.pid
84 84
85 85 ## stats server with workers statistics, use uwsgitop
86 86 ## for monitoring, `uwsgitop 127.0.0.1:1717`
87 87 #stats = 127.0.0.1:1717
88 88 #memory-report = true
89 89
90 90 ## log 5XX errors
91 91 #log-5xx = true
92 92
93 93 ## Set the socket listen queue size.
94 94 #listen = 256
95 95
96 96 ## Gracefully Reload workers after the specified amount of managed requests
97 97 ## (avoid memory leaks).
98 98 #max-requests = 1000
99 99
100 100 ## enable large buffers
101 101 #buffer-size=65535
102 102
103 103 ## socket and http timeouts ##
104 104 #http-timeout=3600
105 105 #socket-timeout=3600
106 106
107 107 ## Log requests slower than the specified number of milliseconds.
108 108 #log-slow = 10
109 109
110 110 ## Exit if no app can be loaded.
111 111 #need-app = true
112 112
113 113 ## Set lazy mode (load apps in workers instead of master).
114 114 #lazy = true
115 115
116 116 ## scaling ##
117 117 ## set cheaper algorithm to use, if not set default will be used
118 118 #cheaper-algo = spare
119 119
120 120 ## minimum number of workers to keep at all times
121 121 #cheaper = 1
122 122
123 123 ## number of workers to spawn at startup
124 124 #cheaper-initial = 1
125 125
126 126 ## maximum number of workers that can be spawned
127 127 #workers = 4
128 128
129 129 ## how many workers should be spawned at a time
130 130 #cheaper-step = 1
131 131
132 132 ## COMMON ##
133 133 host = 0.0.0.0
134 134 port = 5000
135 135
136 136 ## middleware for hosting the WSGI application under a URL prefix
137 137 #[filter:proxy-prefix]
138 138 #use = egg:PasteDeploy#prefix
139 139 #prefix = /<your-prefix>
140 140
141 141 [app:main]
142 142 use = egg:kallithea
143 143 ## enable proxy prefix middleware
144 144 #filter-with = proxy-prefix
145 145
146 146 full_stack = true
147 147 static_files = true
148 148 ## Available Languages:
149 149 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
150 150 lang =
151 151 cache_dir = %(here)s/data
152 152 index_dir = %(here)s/data/index
153 153
154 154 ## perform a full repository scan on each server start, this should be
155 155 ## set to false after first startup, to allow faster server restarts.
156 156 #initial_repo_scan = false
157 157 initial_repo_scan = true
158 158
159 159 ## uncomment and set this path to use archive download cache
160 160 archive_cache_dir = %(here)s/tarballcache
161 161
162 162 ## change this to unique ID for security
163 163 app_instance_uuid = development-not-secret
164 164
165 165 ## cut off limit for large diffs (size in bytes)
166 166 cut_off_limit = 256000
167 167
168 168 ## use cache version of scm repo everywhere
169 169 vcs_full_cache = true
170 170
171 171 ## force https in Kallithea, fixes https redirects, assumes it's always https
172 172 force_https = false
173 173
174 174 ## use Strict-Transport-Security headers
175 175 use_htsts = false
176 176
177 177 ## number of commits stats will parse on each iteration
178 178 commit_parse_limit = 25
179 179
180 180 ## path to git executable
181 181 git_path = git
182 182
183 183 ## git rev filter option, --all is the default filter, if you need to
184 184 ## hide all refs in changelog switch this to --branches --tags
185 185 #git_rev_filter = --branches --tags
186 186
187 187 ## RSS feed options
188 188 rss_cut_off_limit = 256000
189 189 rss_items_per_page = 10
190 190 rss_include_diff = false
191 191
192 192 ## options for showing and identifying changesets
193 193 show_sha_length = 12
194 194 show_revision_number = false
195 195
196 196 ## gist URL alias, used to create nicer urls for gist. This should be an
197 197 ## url that does rewrites to _admin/gists/<gistid>.
198 198 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
199 199 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
200 200 gist_alias_url =
201 201
202 202 ## white list of API enabled controllers. This allows to add list of
203 203 ## controllers to which access will be enabled by api_key. eg: to enable
204 204 ## api access to raw_files put `FilesController:raw`, to enable access to patches
205 205 ## add `ChangesetController:changeset_patch`. This list should be "," separated
206 206 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
207 207 ## Recommended settings below are commented out:
208 208 api_access_controllers_whitelist =
209 209 # ChangesetController:changeset_patch,
210 210 # ChangesetController:changeset_raw,
211 211 # FilesController:raw,
212 212 # FilesController:archivefile
213 213
214 214 ## default encoding used to convert from and to unicode
215 215 ## can be also a comma seperated list of encoding in case of mixed encodings
216 216 default_encoding = utf8
217 217
218 218 ## issue tracker for Kallithea (leave blank to disable, absent for default)
219 219 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
220 220
221 221 ## issue tracking mapping for commits messages
222 222 ## comment out issue_pat, issue_server, issue_prefix to enable
223 223
224 224 ## pattern to get the issues from commit messages
225 225 ## default one used here is #<numbers> with a regex passive group for `#`
226 226 ## {id} will be all groups matched from this pattern
227 227
228 228 issue_pat = (?:\s*#)(\d+)
229 229
230 230 ## server url to the issue, each {id} will be replaced with match
231 231 ## fetched from the regex and {repo} is replaced with full repository name
232 232 ## including groups {repo_name} is replaced with just name of repo
233 233
234 234 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
235 235
236 236 ## prefix to add to link to indicate it's an url
237 237 ## #314 will be replaced by <issue_prefix><id>
238 238
239 239 issue_prefix = #
240 240
241 241 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
242 242 ## multiple patterns, to other issues server, wiki or others
243 243 ## below an example how to create a wiki pattern
244 244 # wiki-some-id -> https://mywiki.com/some-id
245 245
246 246 #issue_pat_wiki = (?:wiki-)(.+)
247 247 #issue_server_link_wiki = https://mywiki.com/{id}
248 248 #issue_prefix_wiki = WIKI-
249 249
250 250
251 251 ## instance-id prefix
252 252 ## a prefix key for this instance used for cache invalidation when running
253 253 ## multiple instances of kallithea, make sure it's globally unique for
254 254 ## all running kallithea instances. Leave empty if you don't use it
255 255 instance_id =
256 256
257 257 ## alternative return HTTP header for failed authentication. Default HTTP
258 258 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
259 259 ## handling that. Set this variable to 403 to return HTTPForbidden
260 260 auth_ret_code =
261 261
262 262 ## locking return code. When repository is locked return this HTTP code. 2XX
263 263 ## codes don't break the transactions while 4XX codes do
264 264 lock_ret_code = 423
265 265
266 266 ## allows to change the repository location in settings page
267 267 allow_repo_location_change = True
268 268
269 269 ## allows to setup custom hooks in settings page
270 270 allow_custom_hooks_settings = True
271 271
272 272
273 273 ####################################
274 274 ### CELERY CONFIG ####
275 275 ####################################
276 276
277 277 use_celery = false
278 278 broker.host = localhost
279 279 broker.vhost = rabbitmqhost
280 280 broker.port = 5672
281 281 broker.user = rabbitmq
282 282 broker.password = qweqwe
283 283
284 284 celery.imports = kallithea.lib.celerylib.tasks
285 285
286 286 celery.result.backend = amqp
287 287 celery.result.dburi = amqp://
288 288 celery.result.serialier = json
289 289
290 290 #celery.send.task.error.emails = true
291 291 #celery.amqp.task.result.expires = 18000
292 292
293 293 celeryd.concurrency = 2
294 294 #celeryd.log.file = celeryd.log
295 295 celeryd.log.level = DEBUG
296 296 celeryd.max.tasks.per.child = 1
297 297
298 298 ## tasks will never be sent to the queue, but executed locally instead.
299 299 celery.always.eager = false
300 300
301 301 ####################################
302 302 ### BEAKER CACHE ####
303 303 ####################################
304 304
305 305 beaker.cache.data_dir=%(here)s/data/cache/data
306 306 beaker.cache.lock_dir=%(here)s/data/cache/lock
307 307
308 308 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
309 309
310 310 beaker.cache.super_short_term.type=memory
311 311 beaker.cache.super_short_term.expire=10
312 312 beaker.cache.super_short_term.key_length = 256
313 313
314 314 beaker.cache.short_term.type=memory
315 315 beaker.cache.short_term.expire=60
316 316 beaker.cache.short_term.key_length = 256
317 317
318 318 beaker.cache.long_term.type=memory
319 319 beaker.cache.long_term.expire=36000
320 320 beaker.cache.long_term.key_length = 256
321 321
322 322 beaker.cache.sql_cache_short.type=memory
323 323 beaker.cache.sql_cache_short.expire=10
324 324 beaker.cache.sql_cache_short.key_length = 256
325 325
326 326 beaker.cache.sql_cache_med.type=memory
327 327 beaker.cache.sql_cache_med.expire=360
328 328 beaker.cache.sql_cache_med.key_length = 256
329 329
330 330 beaker.cache.sql_cache_long.type=file
331 331 beaker.cache.sql_cache_long.expire=3600
332 332 beaker.cache.sql_cache_long.key_length = 256
333 333
334 334 ####################################
335 335 ### BEAKER SESSION ####
336 336 ####################################
337 337 ## Type of storage used for the session, current types are
338 338 ## dbm, file, memcached, database, and memory.
339 339 ## The storage uses the Container API
340 340 ## that is also used by the cache system.
341 341
342 342 ## db session ##
343 343 #beaker.session.type = ext:database
344 344 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
345 345 #beaker.session.table_name = db_session
346 346
347 347 ## encrypted cookie client side session, good for many instances ##
348 348 #beaker.session.type = cookie
349 349
350 350 ## file based cookies (default) ##
351 351 #beaker.session.type = file
352 352
353 353 ## beaker.session.key should be unique for a given host, even when running
354 354 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
355 355 beaker.session.key = kallithea
356 356 beaker.session.secret = development-not-secret
357 357
358 358 ## Secure encrypted cookie. Requires AES and AES python libraries
359 359 ## you must disable beaker.session.secret to use this
360 360 #beaker.session.encrypt_key = <key_for_encryption>
361 361 #beaker.session.validate_key = <validation_key>
362 362
363 363 ## sets session as invalid if it haven't been accessed for given amount of time
364 364 beaker.session.timeout = 2592000
365 365 beaker.session.httponly = true
366 366 #beaker.session.cookie_path = /<your-prefix>
367 367
368 368 ## uncomment for https secure cookie
369 369 beaker.session.secure = false
370 370
371 371 ## auto save the session to not to use .save()
372 372 beaker.session.auto = False
373 373
374 374 ## default cookie expiration time in seconds `true` expire at browser close ##
375 375 #beaker.session.cookie_expires = 3600
376 376
377 377
378 378 ############################
379 379 ## ERROR HANDLING SYSTEMS ##
380 380 ############################
381 381
382 382 ####################
383 383 ### [errormator] ###
384 384 ####################
385 385
386 386 ## Errormator is tailored to work with Kallithea, see
387 387 ## http://errormator.com for details how to obtain an account
388 388 ## you must install python package `errormator_client` to make it work
389 389
390 390 ## errormator enabled
391 391 errormator = false
392 392
393 393 errormator.server_url = https://api.errormator.com
394 394 errormator.api_key = YOUR_API_KEY
395 395
396 396 ## TWEAK AMOUNT OF INFO SENT HERE
397 397
398 398 ## enables 404 error logging (default False)
399 399 errormator.report_404 = false
400 400
401 401 ## time in seconds after request is considered being slow (default 1)
402 402 errormator.slow_request_time = 1
403 403
404 404 ## record slow requests in application
405 405 ## (needs to be enabled for slow datastore recording and time tracking)
406 406 errormator.slow_requests = true
407 407
408 408 ## enable hooking to application loggers
409 409 # errormator.logging = true
410 410
411 411 ## minimum log level for log capture
412 412 # errormator.logging.level = WARNING
413 413
414 414 ## send logs only from erroneous/slow requests
415 415 ## (saves API quota for intensive logging)
416 416 errormator.logging_on_error = false
417 417
418 418 ## list of additonal keywords that should be grabbed from environ object
419 419 ## can be string with comma separated list of words in lowercase
420 420 ## (by default client will always send following info:
421 421 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
422 422 ## start with HTTP* this list be extended with additional keywords here
423 423 errormator.environ_keys_whitelist =
424 424
425 425
426 426 ## list of keywords that should be blanked from request object
427 427 ## can be string with comma separated list of words in lowercase
428 428 ## (by default client will always blank keys that contain following words
429 429 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
430 430 ## this list be extended with additional keywords set here
431 431 errormator.request_keys_blacklist =
432 432
433 433
434 434 ## list of namespaces that should be ignores when gathering log entries
435 435 ## can be string with comma separated list of namespaces
436 436 ## (by default the client ignores own entries: errormator_client.client)
437 437 errormator.log_namespace_blacklist =
438 438
439 439
440 440 ################
441 441 ### [sentry] ###
442 442 ################
443 443
444 444 ## sentry is a alternative open source error aggregator
445 445 ## you must install python packages `sentry` and `raven` to enable
446 446
447 447 sentry.dsn = YOUR_DNS
448 448 sentry.servers =
449 449 sentry.name =
450 450 sentry.key =
451 451 sentry.public_key =
452 452 sentry.secret_key =
453 453 sentry.project =
454 454 sentry.site =
455 455 sentry.include_paths =
456 456 sentry.exclude_paths =
457 457
458 458
459 459 ################################################################################
460 460 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
461 461 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
462 462 ## execute malicious code after an exception is raised. ##
463 463 ################################################################################
464 464 #set debug = false
465 465 set debug = true
466 466
467 467 ##################################
468 468 ### LOGVIEW CONFIG ###
469 469 ##################################
470 470
471 471 logview.sqlalchemy = #faa
472 472 logview.pylons.templating = #bfb
473 473 logview.pylons.util = #eee
474 474
475 475 #########################################################
476 476 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
477 477 #########################################################
478 478
479 479 # SQLITE [default]
480 480 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
481 481
482 482 # POSTGRESQL
483 483 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
484 484
485 485 # MySQL
486 486 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
487 487
488 488 # see sqlalchemy docs for others
489 489
490 490 sqlalchemy.db1.echo = false
491 491 sqlalchemy.db1.pool_recycle = 3600
492 492 sqlalchemy.db1.convert_unicode = true
493 493
494 494 ################################
495 495 ### LOGGING CONFIGURATION ####
496 496 ################################
497 497
498 498 [loggers]
499 499 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
500 500
501 501 [handlers]
502 502 keys = console, console_sql
503 503
504 504 [formatters]
505 505 keys = generic, color_formatter, color_formatter_sql
506 506
507 507 #############
508 508 ## LOGGERS ##
509 509 #############
510 510
511 511 [logger_root]
512 512 level = NOTSET
513 513 handlers = console
514 514
515 515 [logger_routes]
516 516 level = DEBUG
517 517 handlers =
518 518 qualname = routes.middleware
519 519 ## "level = DEBUG" logs the route matched and routing variables.
520 520 propagate = 1
521 521
522 522 [logger_beaker]
523 523 level = DEBUG
524 524 handlers =
525 525 qualname = beaker.container
526 526 propagate = 1
527 527
528 528 [logger_templates]
529 529 level = INFO
530 530 handlers =
531 531 qualname = pylons.templating
532 532 propagate = 1
533 533
534 534 [logger_kallithea]
535 535 level = DEBUG
536 536 handlers =
537 537 qualname = kallithea
538 538 propagate = 1
539 539
540 540 [logger_sqlalchemy]
541 541 level = INFO
542 542 handlers = console_sql
543 543 qualname = sqlalchemy.engine
544 544 propagate = 0
545 545
546 546 [logger_whoosh_indexer]
547 547 level = DEBUG
548 548 handlers =
549 549 qualname = whoosh_indexer
550 550 propagate = 1
551 551
552 552 ##############
553 553 ## HANDLERS ##
554 554 ##############
555 555
556 556 [handler_console]
557 557 class = StreamHandler
558 558 args = (sys.stderr,)
559 559 #level = INFO
560 560 #formatter = generic
561 561 level = DEBUG
562 562 formatter = color_formatter
563 563
564 564 [handler_console_sql]
565 565 class = StreamHandler
566 566 args = (sys.stderr,)
567 567 #level = WARN
568 568 #formatter = generic
569 569 level = DEBUG
570 570 formatter = color_formatter_sql
571 571
572 572 ################
573 573 ## FORMATTERS ##
574 574 ################
575 575
576 576 [formatter_generic]
577 577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
578 578 datefmt = %Y-%m-%d %H:%M:%S
579 579
580 580 [formatter_color_formatter]
581 581 class=kallithea.lib.colored_formatter.ColorFormatter
582 582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
583 583 datefmt = %Y-%m-%d %H:%M:%S
584 584
585 585 [formatter_color_formatter_sql]
586 586 class=kallithea.lib.colored_formatter.ColorFormatterSql
587 587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
588 588 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,584 +1,584 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%text>################################################################################
3 3 ################################################################################
4 4 # Kallithea - config file generated with kallithea-config #
5 5 ################################################################################
6 6 ################################################################################
7 7 </%text>
8 8 [DEFAULT]
9 9 debug = true
10 10 pdebug = false
11 11 <%text>
12 12 ################################################################################
13 13 ## Uncomment and replace with the address which should receive ##
14 14 ## any error reports after application crash ##
15 15 ## Additionally those settings will be used by Kallithea mailing system ##
16 16 ################################################################################</%text>
17 17 #email_to = admin@localhost
18 18 #error_email_from = paste_error@localhost
19 19 #app_email_from = kallithea-noreply@localhost
20 20 #email_prefix = [Kallithea]
21 21
22 22 #smtp_server = mail.server.com
23 23 #smtp_username =
24 24 #smtp_password =
25 25 #smtp_port =
26 26 #smtp_use_tls = false
27 #smtp_use_ssl = true
27 #smtp_use_ssl = false
28 28 <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
29 29 #smtp_auth =
30 30
31 31 [server:main]
32 32 %if http_server == 'paste':
33 33 <%text>## PASTE ##</%text>
34 34 use = egg:Paste#http
35 35 <%text>## nr of worker threads to spawn</%text>
36 36 threadpool_workers = 5
37 37 <%text>## max request before thread respawn</%text>
38 38 threadpool_max_requests = 10
39 39 <%text>## option to use threads of process</%text>
40 40 use_threadpool = true
41 41 %endif
42 42 %if http_server == 'waitress':
43 43 <%text>## WAITRESS ##</%text>
44 44 use = egg:waitress#main
45 45 <%text>## number of worker threads</%text>
46 46 threads = 5
47 47 <%text>## MAX BODY SIZE 100GB</%text>
48 48 max_request_body_size = 107374182400
49 49 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
50 50 <%text>## windows systems.</%text>
51 51 #asyncore_use_poll = True
52 52 %endif
53 53 %if http_server == 'gunicorn':
54 54 <%text>## GUNICORN ##</%text>
55 55 use = egg:gunicorn#main
56 56 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
57 57 <%text>## is set to more than one worker</%text>
58 58 workers = 1
59 59 <%text>## process name</%text>
60 60 proc_name = kallithea
61 61 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
62 62 <%text>## recommended for bigger setup is using of of other than sync one</%text>
63 63 worker_class = sync
64 64 max_requests = 1000
65 65 <%text>## ammount of time a worker can handle request before it gets killed and</%text>
66 66 <%text>## restarted</%text>
67 67 timeout = 3600
68 68 %endif
69 69 %if http_server == 'uwsgi':
70 70 <%text>## UWSGI ##</%text>
71 71 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
72 72 [uwsgi]
73 73 socket = /tmp/uwsgi.sock
74 74 master = true
75 75 http = 127.0.0.1:5000
76 76
77 77 <%text>## set as deamon and redirect all output to file</%text>
78 78 #daemonize = ./uwsgi_kallithea.log
79 79
80 80 <%text>## master process PID</%text>
81 81 pidfile = ./uwsgi_kallithea.pid
82 82
83 83 <%text>## stats server with workers statistics, use uwsgitop</%text>
84 84 <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
85 85 stats = 127.0.0.1:1717
86 86 memory-report = true
87 87
88 88 <%text>## log 5XX errors</%text>
89 89 log-5xx = true
90 90
91 91 <%text>## Set the socket listen queue size.</%text>
92 92 listen = 256
93 93
94 94 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
95 95 <%text>## (avoid memory leaks).</%text>
96 96 max-requests = 1000
97 97
98 98 <%text>## enable large buffers</%text>
99 99 buffer-size=65535
100 100
101 101 <%text>## socket and http timeouts ##</%text>
102 102 http-timeout=3600
103 103 socket-timeout=3600
104 104
105 105 <%text>## Log requests slower than the specified number of milliseconds.</%text>
106 106 log-slow = 10
107 107
108 108 <%text>## Exit if no app can be loaded.</%text>
109 109 need-app = true
110 110
111 111 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
112 112 lazy = true
113 113
114 114 <%text>## scaling ##</%text>
115 115 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
116 116 cheaper-algo = spare
117 117
118 118 <%text>## minimum number of workers to keep at all times</%text>
119 119 cheaper = 1
120 120
121 121 <%text>## number of workers to spawn at startup</%text>
122 122 cheaper-initial = 1
123 123
124 124 <%text>## maximum number of workers that can be spawned</%text>
125 125 workers = 4
126 126
127 127 <%text>## how many workers should be spawned at a time</%text>
128 128 cheaper-step = 1
129 129 %endif
130 130 <%text>## COMMON ##</%text>
131 131 host = ${host}
132 132 port = ${port}
133 133
134 134 <%text>## middleware for hosting the WSGI application under a URL prefix</%text>
135 135 #[filter:proxy-prefix]
136 136 #use = egg:PasteDeploy#prefix
137 137 #prefix = /<your-prefix>
138 138
139 139 [app:main]
140 140 use = egg:kallithea
141 141 <%text>## enable proxy prefix middleware</%text>
142 142 #filter-with = proxy-prefix
143 143
144 144 full_stack = true
145 145 static_files = true
146 146 <%text>## Available Languages:</%text>
147 147 <%text>## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW</%text>
148 148 lang =
149 149 cache_dir = ${here}/data
150 150 index_dir = ${here}/data/index
151 151
152 152 <%text>## perform a full repository scan on each server start, this should be</%text>
153 153 <%text>## set to false after first startup, to allow faster server restarts.</%text>
154 154 initial_repo_scan = false
155 155
156 156 <%text>## uncomment and set this path to use archive download cache</%text>
157 157 archive_cache_dir = ${here}/tarballcache
158 158
159 159 <%text>## change this to unique ID for security</%text>
160 160 app_instance_uuid = ${uuid()}
161 161
162 162 <%text>## cut off limit for large diffs (size in bytes)</%text>
163 163 cut_off_limit = 256000
164 164
165 165 <%text>## use cache version of scm repo everywhere</%text>
166 166 vcs_full_cache = true
167 167
168 168 <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
169 169 force_https = false
170 170
171 171 <%text>## use Strict-Transport-Security headers</%text>
172 172 use_htsts = false
173 173
174 174 <%text>## number of commits stats will parse on each iteration</%text>
175 175 commit_parse_limit = 25
176 176
177 177 <%text>## path to git executable</%text>
178 178 git_path = git
179 179
180 180 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
181 181 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
182 182 #git_rev_filter = --branches --tags
183 183
184 184 <%text>## RSS feed options</%text>
185 185 rss_cut_off_limit = 256000
186 186 rss_items_per_page = 10
187 187 rss_include_diff = false
188 188
189 189 <%text>## options for showing and identifying changesets</%text>
190 190 show_sha_length = 12
191 191 show_revision_number = false
192 192
193 193 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
194 194 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
195 195 <%text>## example: http://gist.kallithea.server/{gistid}. Empty means use the internal</%text>
196 196 <%text>## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid></%text>
197 197 gist_alias_url =
198 198
199 199 <%text>## white list of API enabled controllers. This allows to add list of</%text>
200 200 <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text>
201 201 <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
202 202 <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
203 203 <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
204 204 <%text>## Recommended settings below are commented out:</%text>
205 205 api_access_controllers_whitelist =
206 206 # ChangesetController:changeset_patch,
207 207 # ChangesetController:changeset_raw,
208 208 # FilesController:raw,
209 209 # FilesController:archivefile
210 210
211 211 <%text>## default encoding used to convert from and to unicode</%text>
212 212 <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text>
213 213 default_encoding = utf8
214 214
215 215 <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
216 216 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
217 217
218 218 <%text>## issue tracking mapping for commits messages</%text>
219 219 <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
220 220
221 221 <%text>## pattern to get the issues from commit messages</%text>
222 222 <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text>
223 223 <%text>## {id} will be all groups matched from this pattern</%text>
224 224
225 225 issue_pat = (?:\s*#)(\d+)
226 226
227 227 <%text>## server url to the issue, each {id} will be replaced with match</%text>
228 228 <%text>## fetched from the regex and {repo} is replaced with full repository name</%text>
229 229 <%text>## including groups {repo_name} is replaced with just name of repo</%text>
230 230
231 231 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
232 232
233 233 <%text>## prefix to add to link to indicate it's an url</%text>
234 234 <%text>## #314 will be replaced by <issue_prefix><id></%text>
235 235
236 236 issue_prefix = #
237 237
238 238 <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
239 239 <%text>## multiple patterns, to other issues server, wiki or others</%text>
240 240 <%text>## below an example how to create a wiki pattern</%text>
241 241 # wiki-some-id -> https://mywiki.com/some-id
242 242
243 243 #issue_pat_wiki = (?:wiki-)(.+)
244 244 #issue_server_link_wiki = https://mywiki.com/{id}
245 245 #issue_prefix_wiki = WIKI-
246 246
247 247
248 248 <%text>## instance-id prefix</%text>
249 249 <%text>## a prefix key for this instance used for cache invalidation when running</%text>
250 250 <%text>## multiple instances of kallithea, make sure it's globally unique for</%text>
251 251 <%text>## all running kallithea instances. Leave empty if you don't use it</%text>
252 252 instance_id =
253 253
254 254 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
255 255 <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text>
256 256 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
257 257 auth_ret_code =
258 258
259 259 <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
260 260 <%text>## codes don't break the transactions while 4XX codes do</%text>
261 261 lock_ret_code = 423
262 262
263 263 <%text>## allows to change the repository location in settings page</%text>
264 264 allow_repo_location_change = True
265 265
266 266 <%text>## allows to setup custom hooks in settings page</%text>
267 267 allow_custom_hooks_settings = True
268 268
269 269 <%text>
270 270 ####################################
271 271 ### CELERY CONFIG ####
272 272 ####################################
273 273 </%text>
274 274 use_celery = false
275 275 broker.host = localhost
276 276 broker.vhost = rabbitmqhost
277 277 broker.port = 5672
278 278 broker.user = rabbitmq
279 279 broker.password = qweqwe
280 280
281 281 celery.imports = kallithea.lib.celerylib.tasks
282 282
283 283 celery.result.backend = amqp
284 284 celery.result.dburi = amqp://
285 285 celery.result.serialier = json
286 286
287 287 #celery.send.task.error.emails = true
288 288 #celery.amqp.task.result.expires = 18000
289 289
290 290 celeryd.concurrency = 2
291 291 #celeryd.log.file = celeryd.log
292 292 celeryd.log.level = DEBUG
293 293 celeryd.max.tasks.per.child = 1
294 294
295 295 <%text>## tasks will never be sent to the queue, but executed locally instead.</%text>
296 296 celery.always.eager = false
297 297 <%text>
298 298 ####################################
299 299 ### BEAKER CACHE ####
300 300 ####################################
301 301 </%text>
302 302 beaker.cache.data_dir=${here}/data/cache/data
303 303 beaker.cache.lock_dir=${here}/data/cache/lock
304 304
305 305 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
306 306
307 307 beaker.cache.super_short_term.type=memory
308 308 beaker.cache.super_short_term.expire=10
309 309 beaker.cache.super_short_term.key_length = 256
310 310
311 311 beaker.cache.short_term.type=memory
312 312 beaker.cache.short_term.expire=60
313 313 beaker.cache.short_term.key_length = 256
314 314
315 315 beaker.cache.long_term.type=memory
316 316 beaker.cache.long_term.expire=36000
317 317 beaker.cache.long_term.key_length = 256
318 318
319 319 beaker.cache.sql_cache_short.type=memory
320 320 beaker.cache.sql_cache_short.expire=10
321 321 beaker.cache.sql_cache_short.key_length = 256
322 322
323 323 beaker.cache.sql_cache_med.type=memory
324 324 beaker.cache.sql_cache_med.expire=360
325 325 beaker.cache.sql_cache_med.key_length = 256
326 326
327 327 beaker.cache.sql_cache_long.type=file
328 328 beaker.cache.sql_cache_long.expire=3600
329 329 beaker.cache.sql_cache_long.key_length = 256
330 330 <%text>
331 331 ####################################
332 332 ### BEAKER SESSION ####
333 333 ####################################
334 334 ## Type of storage used for the session, current types are
335 335 ## dbm, file, memcached, database, and memory.
336 336 ## The storage uses the Container API
337 337 ## that is also used by the cache system.
338 338 </%text>
339 339 <%text>## db session ##</%text>
340 340 #beaker.session.type = ext:database
341 341 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
342 342 #beaker.session.table_name = db_session
343 343
344 344 <%text>## encrypted cookie client side session, good for many instances ##</%text>
345 345 #beaker.session.type = cookie
346 346
347 347 <%text>## file based cookies (default) ##</%text>
348 348 #beaker.session.type = file
349 349
350 350 <%text>
351 351 ## beaker.session.key should be unique for a given host, even when running
352 352 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
353 353 </%text>
354 354 beaker.session.key = kallithea
355 355 beaker.session.secret = ${uuid()}
356 356
357 357 <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
358 358 <%text>## you must disable beaker.session.secret to use this</%text>
359 359 #beaker.session.encrypt_key = <key_for_encryption>
360 360 #beaker.session.validate_key = <validation_key>
361 361
362 362 <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text>
363 363 beaker.session.timeout = 2592000
364 364 beaker.session.httponly = true
365 365 #beaker.session.cookie_path = /<your-prefix>
366 366
367 367 <%text>## uncomment for https secure cookie</%text>
368 368 beaker.session.secure = false
369 369
370 370 <%text>## auto save the session to not to use .save()</%text>
371 371 beaker.session.auto = False
372 372
373 373 <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text>
374 374 #beaker.session.cookie_expires = 3600
375 375
376 376 %if error_aggregation_service == 'errormator':
377 377 <%text>
378 378 ############################
379 379 ## ERROR HANDLING SYSTEMS ##
380 380 ############################
381 381
382 382 ####################
383 383 ### [errormator] ###
384 384 ####################
385 385
386 386 ## Errormator is tailored to work with Kallithea, see
387 387 ## http://errormator.com for details how to obtain an account
388 388 ## you must install python package `errormator_client` to make it work
389 389 </%text>
390 390 <%text>## errormator enabled</%text>
391 391 errormator = false
392 392
393 393 errormator.server_url = https://api.errormator.com
394 394 errormator.api_key = YOUR_API_KEY
395 395
396 396 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
397 397
398 398 <%text>## enables 404 error logging (default False)</%text>
399 399 errormator.report_404 = false
400 400
401 401 <%text>## time in seconds after request is considered being slow (default 1)</%text>
402 402 errormator.slow_request_time = 1
403 403
404 404 <%text>## record slow requests in application</%text>
405 405 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
406 406 errormator.slow_requests = true
407 407
408 408 <%text>## enable hooking to application loggers</%text>
409 409 # errormator.logging = true
410 410
411 411 <%text>## minimum log level for log capture</%text>
412 412 # errormator.logging.level = WARNING
413 413
414 414 <%text>## send logs only from erroneous/slow requests</%text>
415 415 <%text>## (saves API quota for intensive logging)</%text>
416 416 errormator.logging_on_error = false
417 417
418 418 <%text>## list of additonal keywords that should be grabbed from environ object</%text>
419 419 <%text>## can be string with comma separated list of words in lowercase</%text>
420 420 <%text>## (by default client will always send following info:</%text>
421 421 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
422 422 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
423 423 errormator.environ_keys_whitelist =
424 424
425 425
426 426 <%text>## list of keywords that should be blanked from request object</%text>
427 427 <%text>## can be string with comma separated list of words in lowercase</%text>
428 428 <%text>## (by default client will always blank keys that contain following words</%text>
429 429 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
430 430 <%text>## this list be extended with additional keywords set here</%text>
431 431 errormator.request_keys_blacklist =
432 432
433 433
434 434 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
435 435 <%text>## can be string with comma separated list of namespaces</%text>
436 436 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
437 437 errormator.log_namespace_blacklist =
438 438 %elif error_aggregation_service == 'sentry':
439 439 <%text>
440 440 ################
441 441 ### [sentry] ###
442 442 ################
443 443
444 444 ## sentry is a alternative open source error aggregator
445 445 ## you must install python packages `sentry` and `raven` to enable
446 446 </%text>
447 447 sentry.dsn = YOUR_DNS
448 448 sentry.servers =
449 449 sentry.name =
450 450 sentry.key =
451 451 sentry.public_key =
452 452 sentry.secret_key =
453 453 sentry.project =
454 454 sentry.site =
455 455 sentry.include_paths =
456 456 sentry.exclude_paths =
457 457 %endif
458 458 <%text>
459 459 ################################################################################
460 460 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
461 461 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
462 462 ## execute malicious code after an exception is raised. ##
463 463 ################################################################################</%text>
464 464 set debug = false
465 465 <%text>
466 466 ##################################
467 467 ### LOGVIEW CONFIG ###
468 468 ##################################
469 469 </%text>
470 470 logview.sqlalchemy = #faa
471 471 logview.pylons.templating = #bfb
472 472 logview.pylons.util = #eee
473 473 <%text>
474 474 #########################################################
475 475 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
476 476 #########################################################
477 477 </%text>
478 478 %if database_engine == 'sqlite':
479 479 # SQLITE [default]
480 480 sqlalchemy.db1.url = sqlite:///${here}/kallithea.db?timeout=60
481 481 %elif database_engine == 'postgres':
482 482 # POSTGRESQL
483 483 sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
484 484 %elif database_engine == 'mysql':
485 485 # MySQL
486 486 sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
487 487 %endif
488 488 # see sqlalchemy docs for others
489 489
490 490 sqlalchemy.db1.echo = false
491 491 sqlalchemy.db1.pool_recycle = 3600
492 492 sqlalchemy.db1.convert_unicode = true
493 493 <%text>
494 494 ################################
495 495 ### LOGGING CONFIGURATION ####
496 496 ################################
497 497 </%text>
498 498 [loggers]
499 499 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
500 500
501 501 [handlers]
502 502 keys = console, console_sql
503 503
504 504 [formatters]
505 505 keys = generic, color_formatter, color_formatter_sql
506 506 <%text>
507 507 #############
508 508 ## LOGGERS ##
509 509 #############
510 510 </%text>
511 511 [logger_root]
512 512 level = NOTSET
513 513 handlers = console
514 514
515 515 [logger_routes]
516 516 level = DEBUG
517 517 handlers =
518 518 qualname = routes.middleware
519 519 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
520 520 propagate = 1
521 521
522 522 [logger_beaker]
523 523 level = DEBUG
524 524 handlers =
525 525 qualname = beaker.container
526 526 propagate = 1
527 527
528 528 [logger_templates]
529 529 level = INFO
530 530 handlers =
531 531 qualname = pylons.templating
532 532 propagate = 1
533 533
534 534 [logger_kallithea]
535 535 level = DEBUG
536 536 handlers =
537 537 qualname = kallithea
538 538 propagate = 1
539 539
540 540 [logger_sqlalchemy]
541 541 level = INFO
542 542 handlers = console_sql
543 543 qualname = sqlalchemy.engine
544 544 propagate = 0
545 545
546 546 [logger_whoosh_indexer]
547 547 level = DEBUG
548 548 handlers =
549 549 qualname = whoosh_indexer
550 550 propagate = 1
551 551 <%text>
552 552 ##############
553 553 ## HANDLERS ##
554 554 ##############
555 555 </%text>
556 556 [handler_console]
557 557 class = StreamHandler
558 558 args = (sys.stderr,)
559 559 level = INFO
560 560 formatter = generic
561 561
562 562 [handler_console_sql]
563 563 class = StreamHandler
564 564 args = (sys.stderr,)
565 565 level = WARN
566 566 formatter = generic
567 567 <%text>
568 568 ################
569 569 ## FORMATTERS ##
570 570 ################
571 571 </%text>
572 572 [formatter_generic]
573 573 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
574 574 datefmt = %Y-%m-%d %H:%M:%S
575 575
576 576 [formatter_color_formatter]
577 577 class=kallithea.lib.colored_formatter.ColorFormatter
578 578 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
579 579 datefmt = %Y-%m-%d %H:%M:%S
580 580
581 581 [formatter_color_formatter_sql]
582 582 class=kallithea.lib.colored_formatter.ColorFormatterSql
583 583 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
584 584 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,577 +1,577 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - Example config #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7 ################################################################################
8 8
9 9 [DEFAULT]
10 10 debug = true
11 11 pdebug = false
12 12
13 13 ################################################################################
14 14 ## Uncomment and replace with the address which should receive ##
15 15 ## any error reports after application crash ##
16 16 ## Additionally those settings will be used by Kallithea mailing system ##
17 17 ################################################################################
18 18 #email_to = admin@localhost
19 19 #error_email_from = paste_error@localhost
20 20 #app_email_from = kallithea-noreply@localhost
21 21 #email_prefix = [Kallithea]
22 22
23 23 #smtp_server = mail.server.com
24 24 #smtp_username =
25 25 #smtp_password =
26 26 #smtp_port =
27 27 #smtp_use_tls = false
28 #smtp_use_ssl = true
28 #smtp_use_ssl = false
29 29 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
30 30 #smtp_auth =
31 31
32 32 [server:main]
33 33 ## PASTE ##
34 34 #use = egg:Paste#http
35 35 ## nr of worker threads to spawn
36 36 #threadpool_workers = 5
37 37 ## max request before thread respawn
38 38 #threadpool_max_requests = 10
39 39 ## option to use threads of process
40 40 #use_threadpool = true
41 41
42 42 ## WAITRESS ##
43 43 use = egg:waitress#main
44 44 ## number of worker threads
45 45 threads = 5
46 46 ## MAX BODY SIZE 100GB
47 47 max_request_body_size = 107374182400
48 48 ## use poll instead of select, fixes fd limits, may not work on old
49 49 ## windows systems.
50 50 #asyncore_use_poll = True
51 51
52 52 ## GUNICORN ##
53 53 #use = egg:gunicorn#main
54 54 ## number of process workers. You must set `instance_id = *` when this option
55 55 ## is set to more than one worker
56 56 #workers = 1
57 57 ## process name
58 58 #proc_name = kallithea
59 59 ## type of worker class, one of sync, eventlet, gevent, tornado
60 60 ## recommended for bigger setup is using of of other than sync one
61 61 #worker_class = sync
62 62 #max_requests = 1000
63 63 ## ammount of time a worker can handle request before it gets killed and
64 64 ## restarted
65 65 #timeout = 3600
66 66
67 67 ## UWSGI ##
68 68 ## run with uwsgi --ini-paste-logged <inifile.ini>
69 69 #[uwsgi]
70 70 #socket = /tmp/uwsgi.sock
71 71 #master = true
72 72 #http = 127.0.0.1:5000
73 73
74 74 ## set as deamon and redirect all output to file
75 75 #daemonize = ./uwsgi_kallithea.log
76 76
77 77 ## master process PID
78 78 #pidfile = ./uwsgi_kallithea.pid
79 79
80 80 ## stats server with workers statistics, use uwsgitop
81 81 ## for monitoring, `uwsgitop 127.0.0.1:1717`
82 82 #stats = 127.0.0.1:1717
83 83 #memory-report = true
84 84
85 85 ## log 5XX errors
86 86 #log-5xx = true
87 87
88 88 ## Set the socket listen queue size.
89 89 #listen = 256
90 90
91 91 ## Gracefully Reload workers after the specified amount of managed requests
92 92 ## (avoid memory leaks).
93 93 #max-requests = 1000
94 94
95 95 ## enable large buffers
96 96 #buffer-size=65535
97 97
98 98 ## socket and http timeouts ##
99 99 #http-timeout=3600
100 100 #socket-timeout=3600
101 101
102 102 ## Log requests slower than the specified number of milliseconds.
103 103 #log-slow = 10
104 104
105 105 ## Exit if no app can be loaded.
106 106 #need-app = true
107 107
108 108 ## Set lazy mode (load apps in workers instead of master).
109 109 #lazy = true
110 110
111 111 ## scaling ##
112 112 ## set cheaper algorithm to use, if not set default will be used
113 113 #cheaper-algo = spare
114 114
115 115 ## minimum number of workers to keep at all times
116 116 #cheaper = 1
117 117
118 118 ## number of workers to spawn at startup
119 119 #cheaper-initial = 1
120 120
121 121 ## maximum number of workers that can be spawned
122 122 #workers = 4
123 123
124 124 ## how many workers should be spawned at a time
125 125 #cheaper-step = 1
126 126
127 127 ## COMMON ##
128 128 host = 127.0.0.1
129 129 port = 5000
130 130
131 131 ## middleware for hosting the WSGI application under a URL prefix
132 132 #[filter:proxy-prefix]
133 133 #use = egg:PasteDeploy#prefix
134 134 #prefix = /<your-prefix>
135 135
136 136 [app:main]
137 137 use = egg:kallithea
138 138 ## enable proxy prefix middleware
139 139 #filter-with = proxy-prefix
140 140
141 141 full_stack = true
142 142 static_files = true
143 143 ## Available Languages:
144 144 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
145 145 lang =
146 146 cache_dir = %(here)s/data
147 147 index_dir = %(here)s/data/index
148 148
149 149 ## perform a full repository scan on each server start, this should be
150 150 ## set to false after first startup, to allow faster server restarts.
151 151 initial_repo_scan = false
152 152
153 153 ## uncomment and set this path to use archive download cache
154 154 archive_cache_dir = %(here)s/tarballcache
155 155
156 156 ## change this to unique ID for security
157 157 app_instance_uuid = ${app_instance_uuid}
158 158
159 159 ## cut off limit for large diffs (size in bytes)
160 160 cut_off_limit = 256000
161 161
162 162 ## use cache version of scm repo everywhere
163 163 vcs_full_cache = true
164 164
165 165 ## force https in Kallithea, fixes https redirects, assumes it's always https
166 166 force_https = false
167 167
168 168 ## use Strict-Transport-Security headers
169 169 use_htsts = false
170 170
171 171 ## number of commits stats will parse on each iteration
172 172 commit_parse_limit = 25
173 173
174 174 ## path to git executable
175 175 git_path = git
176 176
177 177 ## git rev filter option, --all is the default filter, if you need to
178 178 ## hide all refs in changelog switch this to --branches --tags
179 179 #git_rev_filter = --branches --tags
180 180
181 181 ## RSS feed options
182 182 rss_cut_off_limit = 256000
183 183 rss_items_per_page = 10
184 184 rss_include_diff = false
185 185
186 186 ## options for showing and identifying changesets
187 187 show_sha_length = 12
188 188 show_revision_number = false
189 189
190 190 ## gist URL alias, used to create nicer urls for gist. This should be an
191 191 ## url that does rewrites to _admin/gists/<gistid>.
192 192 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
193 193 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
194 194 gist_alias_url =
195 195
196 196 ## white list of API enabled controllers. This allows to add list of
197 197 ## controllers to which access will be enabled by api_key. eg: to enable
198 198 ## api access to raw_files put `FilesController:raw`, to enable access to patches
199 199 ## add `ChangesetController:changeset_patch`. This list should be "," separated
200 200 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
201 201 ## Recommended settings below are commented out:
202 202 api_access_controllers_whitelist =
203 203 # ChangesetController:changeset_patch,
204 204 # ChangesetController:changeset_raw,
205 205 # FilesController:raw,
206 206 # FilesController:archivefile
207 207
208 208 ## default encoding used to convert from and to unicode
209 209 ## can be also a comma seperated list of encoding in case of mixed encodings
210 210 default_encoding = utf8
211 211
212 212 ## issue tracker for Kallithea (leave blank to disable, absent for default)
213 213 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
214 214
215 215 ## issue tracking mapping for commits messages
216 216 ## comment out issue_pat, issue_server, issue_prefix to enable
217 217
218 218 ## pattern to get the issues from commit messages
219 219 ## default one used here is #<numbers> with a regex passive group for `#`
220 220 ## {id} will be all groups matched from this pattern
221 221
222 222 issue_pat = (?:\s*#)(\d+)
223 223
224 224 ## server url to the issue, each {id} will be replaced with match
225 225 ## fetched from the regex and {repo} is replaced with full repository name
226 226 ## including groups {repo_name} is replaced with just name of repo
227 227
228 228 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
229 229
230 230 ## prefix to add to link to indicate it's an url
231 231 ## #314 will be replaced by <issue_prefix><id>
232 232
233 233 issue_prefix = #
234 234
235 235 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
236 236 ## multiple patterns, to other issues server, wiki or others
237 237 ## below an example how to create a wiki pattern
238 238 # wiki-some-id -> https://mywiki.com/some-id
239 239
240 240 #issue_pat_wiki = (?:wiki-)(.+)
241 241 #issue_server_link_wiki = https://mywiki.com/{id}
242 242 #issue_prefix_wiki = WIKI-
243 243
244 244
245 245 ## instance-id prefix
246 246 ## a prefix key for this instance used for cache invalidation when running
247 247 ## multiple instances of kallithea, make sure it's globally unique for
248 248 ## all running kallithea instances. Leave empty if you don't use it
249 249 instance_id =
250 250
251 251 ## alternative return HTTP header for failed authentication. Default HTTP
252 252 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
253 253 ## handling that. Set this variable to 403 to return HTTPForbidden
254 254 auth_ret_code =
255 255
256 256 ## locking return code. When repository is locked return this HTTP code. 2XX
257 257 ## codes don't break the transactions while 4XX codes do
258 258 lock_ret_code = 423
259 259
260 260 ## allows to change the repository location in settings page
261 261 allow_repo_location_change = True
262 262
263 263 ## allows to setup custom hooks in settings page
264 264 allow_custom_hooks_settings = True
265 265
266 266
267 267 ####################################
268 268 ### CELERY CONFIG ####
269 269 ####################################
270 270
271 271 use_celery = false
272 272 broker.host = localhost
273 273 broker.vhost = rabbitmqhost
274 274 broker.port = 5672
275 275 broker.user = rabbitmq
276 276 broker.password = qweqwe
277 277
278 278 celery.imports = kallithea.lib.celerylib.tasks
279 279
280 280 celery.result.backend = amqp
281 281 celery.result.dburi = amqp://
282 282 celery.result.serialier = json
283 283
284 284 #celery.send.task.error.emails = true
285 285 #celery.amqp.task.result.expires = 18000
286 286
287 287 celeryd.concurrency = 2
288 288 #celeryd.log.file = celeryd.log
289 289 celeryd.log.level = DEBUG
290 290 celeryd.max.tasks.per.child = 1
291 291
292 292 ## tasks will never be sent to the queue, but executed locally instead.
293 293 celery.always.eager = false
294 294
295 295 ####################################
296 296 ### BEAKER CACHE ####
297 297 ####################################
298 298
299 299 beaker.cache.data_dir=%(here)s/data/cache/data
300 300 beaker.cache.lock_dir=%(here)s/data/cache/lock
301 301
302 302 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
303 303
304 304 beaker.cache.super_short_term.type=memory
305 305 beaker.cache.super_short_term.expire=10
306 306 beaker.cache.super_short_term.key_length = 256
307 307
308 308 beaker.cache.short_term.type=memory
309 309 beaker.cache.short_term.expire=60
310 310 beaker.cache.short_term.key_length = 256
311 311
312 312 beaker.cache.long_term.type=memory
313 313 beaker.cache.long_term.expire=36000
314 314 beaker.cache.long_term.key_length = 256
315 315
316 316 beaker.cache.sql_cache_short.type=memory
317 317 beaker.cache.sql_cache_short.expire=10
318 318 beaker.cache.sql_cache_short.key_length = 256
319 319
320 320 beaker.cache.sql_cache_med.type=memory
321 321 beaker.cache.sql_cache_med.expire=360
322 322 beaker.cache.sql_cache_med.key_length = 256
323 323
324 324 beaker.cache.sql_cache_long.type=file
325 325 beaker.cache.sql_cache_long.expire=3600
326 326 beaker.cache.sql_cache_long.key_length = 256
327 327
328 328 ####################################
329 329 ### BEAKER SESSION ####
330 330 ####################################
331 331 ## Type of storage used for the session, current types are
332 332 ## dbm, file, memcached, database, and memory.
333 333 ## The storage uses the Container API
334 334 ## that is also used by the cache system.
335 335
336 336 ## db session ##
337 337 #beaker.session.type = ext:database
338 338 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
339 339 #beaker.session.table_name = db_session
340 340
341 341 ## encrypted cookie client side session, good for many instances ##
342 342 #beaker.session.type = cookie
343 343
344 344 ## file based cookies (default) ##
345 345 #beaker.session.type = file
346 346
347 347 ## beaker.session.key should be unique for a given host, even when running
348 348 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
349 349 beaker.session.key = kallithea
350 350 beaker.session.secret = ${app_instance_uuid}
351 351
352 352 ## Secure encrypted cookie. Requires AES and AES python libraries
353 353 ## you must disable beaker.session.secret to use this
354 354 #beaker.session.encrypt_key = <key_for_encryption>
355 355 #beaker.session.validate_key = <validation_key>
356 356
357 357 ## sets session as invalid if it haven't been accessed for given amount of time
358 358 beaker.session.timeout = 2592000
359 359 beaker.session.httponly = true
360 360 #beaker.session.cookie_path = /<your-prefix>
361 361
362 362 ## uncomment for https secure cookie
363 363 beaker.session.secure = false
364 364
365 365 ## auto save the session to not to use .save()
366 366 beaker.session.auto = False
367 367
368 368 ## default cookie expiration time in seconds `true` expire at browser close ##
369 369 #beaker.session.cookie_expires = 3600
370 370
371 371
372 372 ############################
373 373 ## ERROR HANDLING SYSTEMS ##
374 374 ############################
375 375
376 376 ####################
377 377 ### [errormator] ###
378 378 ####################
379 379
380 380 ## Errormator is tailored to work with Kallithea, see
381 381 ## http://errormator.com for details how to obtain an account
382 382 ## you must install python package `errormator_client` to make it work
383 383
384 384 ## errormator enabled
385 385 errormator = false
386 386
387 387 errormator.server_url = https://api.errormator.com
388 388 errormator.api_key = YOUR_API_KEY
389 389
390 390 ## TWEAK AMOUNT OF INFO SENT HERE
391 391
392 392 ## enables 404 error logging (default False)
393 393 errormator.report_404 = false
394 394
395 395 ## time in seconds after request is considered being slow (default 1)
396 396 errormator.slow_request_time = 1
397 397
398 398 ## record slow requests in application
399 399 ## (needs to be enabled for slow datastore recording and time tracking)
400 400 errormator.slow_requests = true
401 401
402 402 ## enable hooking to application loggers
403 403 # errormator.logging = true
404 404
405 405 ## minimum log level for log capture
406 406 # errormator.logging.level = WARNING
407 407
408 408 ## send logs only from erroneous/slow requests
409 409 ## (saves API quota for intensive logging)
410 410 errormator.logging_on_error = false
411 411
412 412 ## list of additonal keywords that should be grabbed from environ object
413 413 ## can be string with comma separated list of words in lowercase
414 414 ## (by default client will always send following info:
415 415 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
416 416 ## start with HTTP* this list be extended with additional keywords here
417 417 errormator.environ_keys_whitelist =
418 418
419 419
420 420 ## list of keywords that should be blanked from request object
421 421 ## can be string with comma separated list of words in lowercase
422 422 ## (by default client will always blank keys that contain following words
423 423 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
424 424 ## this list be extended with additional keywords set here
425 425 errormator.request_keys_blacklist =
426 426
427 427
428 428 ## list of namespaces that should be ignores when gathering log entries
429 429 ## can be string with comma separated list of namespaces
430 430 ## (by default the client ignores own entries: errormator_client.client)
431 431 errormator.log_namespace_blacklist =
432 432
433 433
434 434 ################
435 435 ### [sentry] ###
436 436 ################
437 437
438 438 ## sentry is a alternative open source error aggregator
439 439 ## you must install python packages `sentry` and `raven` to enable
440 440
441 441 sentry.dsn = YOUR_DNS
442 442 sentry.servers =
443 443 sentry.name =
444 444 sentry.key =
445 445 sentry.public_key =
446 446 sentry.secret_key =
447 447 sentry.project =
448 448 sentry.site =
449 449 sentry.include_paths =
450 450 sentry.exclude_paths =
451 451
452 452
453 453 ################################################################################
454 454 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
455 455 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
456 456 ## execute malicious code after an exception is raised. ##
457 457 ################################################################################
458 458 set debug = false
459 459
460 460 ##################################
461 461 ### LOGVIEW CONFIG ###
462 462 ##################################
463 463
464 464 logview.sqlalchemy = #faa
465 465 logview.pylons.templating = #bfb
466 466 logview.pylons.util = #eee
467 467
468 468 #########################################################
469 469 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
470 470 #########################################################
471 471
472 472 # SQLITE [default]
473 473 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
474 474
475 475 # POSTGRESQL
476 476 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
477 477
478 478 # MySQL
479 479 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
480 480
481 481 # see sqlalchemy docs for others
482 482
483 483 sqlalchemy.db1.echo = false
484 484 sqlalchemy.db1.pool_recycle = 3600
485 485 sqlalchemy.db1.convert_unicode = true
486 486
487 487 ################################
488 488 ### LOGGING CONFIGURATION ####
489 489 ################################
490 490
491 491 [loggers]
492 492 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
493 493
494 494 [handlers]
495 495 keys = console, console_sql
496 496
497 497 [formatters]
498 498 keys = generic, color_formatter, color_formatter_sql
499 499
500 500 #############
501 501 ## LOGGERS ##
502 502 #############
503 503
504 504 [logger_root]
505 505 level = NOTSET
506 506 handlers = console
507 507
508 508 [logger_routes]
509 509 level = DEBUG
510 510 handlers =
511 511 qualname = routes.middleware
512 512 ## "level = DEBUG" logs the route matched and routing variables.
513 513 propagate = 1
514 514
515 515 [logger_beaker]
516 516 level = DEBUG
517 517 handlers =
518 518 qualname = beaker.container
519 519 propagate = 1
520 520
521 521 [logger_templates]
522 522 level = INFO
523 523 handlers =
524 524 qualname = pylons.templating
525 525 propagate = 1
526 526
527 527 [logger_kallithea]
528 528 level = DEBUG
529 529 handlers =
530 530 qualname = kallithea
531 531 propagate = 1
532 532
533 533 [logger_sqlalchemy]
534 534 level = INFO
535 535 handlers = console_sql
536 536 qualname = sqlalchemy.engine
537 537 propagate = 0
538 538
539 539 [logger_whoosh_indexer]
540 540 level = DEBUG
541 541 handlers =
542 542 qualname = whoosh_indexer
543 543 propagate = 1
544 544
545 545 ##############
546 546 ## HANDLERS ##
547 547 ##############
548 548
549 549 [handler_console]
550 550 class = StreamHandler
551 551 args = (sys.stderr,)
552 552 level = INFO
553 553 formatter = generic
554 554
555 555 [handler_console_sql]
556 556 class = StreamHandler
557 557 args = (sys.stderr,)
558 558 level = WARN
559 559 formatter = generic
560 560
561 561 ################
562 562 ## FORMATTERS ##
563 563 ################
564 564
565 565 [formatter_generic]
566 566 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
567 567 datefmt = %Y-%m-%d %H:%M:%S
568 568
569 569 [formatter_color_formatter]
570 570 class=kallithea.lib.colored_formatter.ColorFormatter
571 571 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
572 572 datefmt = %Y-%m-%d %H:%M:%S
573 573
574 574 [formatter_color_formatter_sql]
575 575 class=kallithea.lib.colored_formatter.ColorFormatterSql
576 576 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
577 577 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,581 +1,581 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - Example config #
4 4 # Exactly as generated with "paster make-config Kallithea production.ini" #
5 5 # using sqlite and kallithea.db .
6 6 # Note: you should generate your own config with your own UUIDs for security #
7 7 # and consider not using sqlite for production. #
8 8 # #
9 9 # The %(here)s variable will be replaced with the parent directory of this file#
10 10 ################################################################################
11 11 ################################################################################
12 12
13 13 [DEFAULT]
14 14 debug = true
15 15 pdebug = false
16 16
17 17 ################################################################################
18 18 ## Uncomment and replace with the address which should receive ##
19 19 ## any error reports after application crash ##
20 20 ## Additionally those settings will be used by Kallithea mailing system ##
21 21 ################################################################################
22 22 #email_to = admin@localhost
23 23 #error_email_from = paste_error@localhost
24 24 #app_email_from = kallithea-noreply@localhost
25 25 #email_prefix = [Kallithea]
26 26
27 27 #smtp_server = mail.server.com
28 28 #smtp_username =
29 29 #smtp_password =
30 30 #smtp_port =
31 31 #smtp_use_tls = false
32 #smtp_use_ssl = true
32 #smtp_use_ssl = false
33 33 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
34 34 #smtp_auth =
35 35
36 36 [server:main]
37 37 ## PASTE ##
38 38 #use = egg:Paste#http
39 39 ## nr of worker threads to spawn
40 40 #threadpool_workers = 5
41 41 ## max request before thread respawn
42 42 #threadpool_max_requests = 10
43 43 ## option to use threads of process
44 44 #use_threadpool = true
45 45
46 46 ## WAITRESS ##
47 47 use = egg:waitress#main
48 48 ## number of worker threads
49 49 threads = 5
50 50 ## MAX BODY SIZE 100GB
51 51 max_request_body_size = 107374182400
52 52 ## use poll instead of select, fixes fd limits, may not work on old
53 53 ## windows systems.
54 54 #asyncore_use_poll = True
55 55
56 56 ## GUNICORN ##
57 57 #use = egg:gunicorn#main
58 58 ## number of process workers. You must set `instance_id = *` when this option
59 59 ## is set to more than one worker
60 60 #workers = 1
61 61 ## process name
62 62 #proc_name = kallithea
63 63 ## type of worker class, one of sync, eventlet, gevent, tornado
64 64 ## recommended for bigger setup is using of of other than sync one
65 65 #worker_class = sync
66 66 #max_requests = 1000
67 67 ## ammount of time a worker can handle request before it gets killed and
68 68 ## restarted
69 69 #timeout = 3600
70 70
71 71 ## UWSGI ##
72 72 ## run with uwsgi --ini-paste-logged <inifile.ini>
73 73 #[uwsgi]
74 74 #socket = /tmp/uwsgi.sock
75 75 #master = true
76 76 #http = 127.0.0.1:5000
77 77
78 78 ## set as deamon and redirect all output to file
79 79 #daemonize = ./uwsgi_kallithea.log
80 80
81 81 ## master process PID
82 82 #pidfile = ./uwsgi_kallithea.pid
83 83
84 84 ## stats server with workers statistics, use uwsgitop
85 85 ## for monitoring, `uwsgitop 127.0.0.1:1717`
86 86 #stats = 127.0.0.1:1717
87 87 #memory-report = true
88 88
89 89 ## log 5XX errors
90 90 #log-5xx = true
91 91
92 92 ## Set the socket listen queue size.
93 93 #listen = 256
94 94
95 95 ## Gracefully Reload workers after the specified amount of managed requests
96 96 ## (avoid memory leaks).
97 97 #max-requests = 1000
98 98
99 99 ## enable large buffers
100 100 #buffer-size=65535
101 101
102 102 ## socket and http timeouts ##
103 103 #http-timeout=3600
104 104 #socket-timeout=3600
105 105
106 106 ## Log requests slower than the specified number of milliseconds.
107 107 #log-slow = 10
108 108
109 109 ## Exit if no app can be loaded.
110 110 #need-app = true
111 111
112 112 ## Set lazy mode (load apps in workers instead of master).
113 113 #lazy = true
114 114
115 115 ## scaling ##
116 116 ## set cheaper algorithm to use, if not set default will be used
117 117 #cheaper-algo = spare
118 118
119 119 ## minimum number of workers to keep at all times
120 120 #cheaper = 1
121 121
122 122 ## number of workers to spawn at startup
123 123 #cheaper-initial = 1
124 124
125 125 ## maximum number of workers that can be spawned
126 126 #workers = 4
127 127
128 128 ## how many workers should be spawned at a time
129 129 #cheaper-step = 1
130 130
131 131 ## COMMON ##
132 132 host = 127.0.0.1
133 133 port = 5000
134 134
135 135 ## middleware for hosting the WSGI application under a URL prefix
136 136 #[filter:proxy-prefix]
137 137 #use = egg:PasteDeploy#prefix
138 138 #prefix = /<your-prefix>
139 139
140 140 [app:main]
141 141 use = egg:kallithea
142 142 ## enable proxy prefix middleware
143 143 #filter-with = proxy-prefix
144 144
145 145 full_stack = true
146 146 static_files = true
147 147 ## Available Languages:
148 148 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
149 149 lang =
150 150 cache_dir = %(here)s/data
151 151 index_dir = %(here)s/data/index
152 152
153 153 ## perform a full repository scan on each server start, this should be
154 154 ## set to false after first startup, to allow faster server restarts.
155 155 initial_repo_scan = false
156 156
157 157 ## uncomment and set this path to use archive download cache
158 158 archive_cache_dir = %(here)s/tarballcache
159 159
160 160 ## change this to unique ID for security
161 161 app_instance_uuid = change-me
162 162
163 163 ## cut off limit for large diffs (size in bytes)
164 164 cut_off_limit = 256000
165 165
166 166 ## use cache version of scm repo everywhere
167 167 vcs_full_cache = true
168 168
169 169 ## force https in Kallithea, fixes https redirects, assumes it's always https
170 170 force_https = false
171 171
172 172 ## use Strict-Transport-Security headers
173 173 use_htsts = false
174 174
175 175 ## number of commits stats will parse on each iteration
176 176 commit_parse_limit = 25
177 177
178 178 ## path to git executable
179 179 git_path = git
180 180
181 181 ## git rev filter option, --all is the default filter, if you need to
182 182 ## hide all refs in changelog switch this to --branches --tags
183 183 #git_rev_filter = --branches --tags
184 184
185 185 ## RSS feed options
186 186 rss_cut_off_limit = 256000
187 187 rss_items_per_page = 10
188 188 rss_include_diff = false
189 189
190 190 ## options for showing and identifying changesets
191 191 show_sha_length = 12
192 192 show_revision_number = false
193 193
194 194 ## gist URL alias, used to create nicer urls for gist. This should be an
195 195 ## url that does rewrites to _admin/gists/<gistid>.
196 196 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
197 197 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
198 198 gist_alias_url =
199 199
200 200 ## white list of API enabled controllers. This allows to add list of
201 201 ## controllers to which access will be enabled by api_key. eg: to enable
202 202 ## api access to raw_files put `FilesController:raw`, to enable access to patches
203 203 ## add `ChangesetController:changeset_patch`. This list should be "," separated
204 204 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
205 205 ## Recommended settings below are commented out:
206 206 api_access_controllers_whitelist =
207 207 # ChangesetController:changeset_patch,
208 208 # ChangesetController:changeset_raw,
209 209 # FilesController:raw,
210 210 # FilesController:archivefile
211 211
212 212 ## default encoding used to convert from and to unicode
213 213 ## can be also a comma seperated list of encoding in case of mixed encodings
214 214 default_encoding = utf8
215 215
216 216 ## issue tracker for Kallithea (leave blank to disable, absent for default)
217 217 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
218 218
219 219 ## issue tracking mapping for commits messages
220 220 ## comment out issue_pat, issue_server, issue_prefix to enable
221 221
222 222 ## pattern to get the issues from commit messages
223 223 ## default one used here is #<numbers> with a regex passive group for `#`
224 224 ## {id} will be all groups matched from this pattern
225 225
226 226 issue_pat = (?:\s*#)(\d+)
227 227
228 228 ## server url to the issue, each {id} will be replaced with match
229 229 ## fetched from the regex and {repo} is replaced with full repository name
230 230 ## including groups {repo_name} is replaced with just name of repo
231 231
232 232 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
233 233
234 234 ## prefix to add to link to indicate it's an url
235 235 ## #314 will be replaced by <issue_prefix><id>
236 236
237 237 issue_prefix = #
238 238
239 239 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
240 240 ## multiple patterns, to other issues server, wiki or others
241 241 ## below an example how to create a wiki pattern
242 242 # wiki-some-id -> https://mywiki.com/some-id
243 243
244 244 #issue_pat_wiki = (?:wiki-)(.+)
245 245 #issue_server_link_wiki = https://mywiki.com/{id}
246 246 #issue_prefix_wiki = WIKI-
247 247
248 248
249 249 ## instance-id prefix
250 250 ## a prefix key for this instance used for cache invalidation when running
251 251 ## multiple instances of kallithea, make sure it's globally unique for
252 252 ## all running kallithea instances. Leave empty if you don't use it
253 253 instance_id =
254 254
255 255 ## alternative return HTTP header for failed authentication. Default HTTP
256 256 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
257 257 ## handling that. Set this variable to 403 to return HTTPForbidden
258 258 auth_ret_code =
259 259
260 260 ## locking return code. When repository is locked return this HTTP code. 2XX
261 261 ## codes don't break the transactions while 4XX codes do
262 262 lock_ret_code = 423
263 263
264 264 ## allows to change the repository location in settings page
265 265 allow_repo_location_change = True
266 266
267 267 ## allows to setup custom hooks in settings page
268 268 allow_custom_hooks_settings = True
269 269
270 270
271 271 ####################################
272 272 ### CELERY CONFIG ####
273 273 ####################################
274 274
275 275 use_celery = false
276 276 broker.host = localhost
277 277 broker.vhost = rabbitmqhost
278 278 broker.port = 5672
279 279 broker.user = rabbitmq
280 280 broker.password = qweqwe
281 281
282 282 celery.imports = kallithea.lib.celerylib.tasks
283 283
284 284 celery.result.backend = amqp
285 285 celery.result.dburi = amqp://
286 286 celery.result.serialier = json
287 287
288 288 #celery.send.task.error.emails = true
289 289 #celery.amqp.task.result.expires = 18000
290 290
291 291 celeryd.concurrency = 2
292 292 #celeryd.log.file = celeryd.log
293 293 celeryd.log.level = DEBUG
294 294 celeryd.max.tasks.per.child = 1
295 295
296 296 ## tasks will never be sent to the queue, but executed locally instead.
297 297 celery.always.eager = false
298 298
299 299 ####################################
300 300 ### BEAKER CACHE ####
301 301 ####################################
302 302
303 303 beaker.cache.data_dir=%(here)s/data/cache/data
304 304 beaker.cache.lock_dir=%(here)s/data/cache/lock
305 305
306 306 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
307 307
308 308 beaker.cache.super_short_term.type=memory
309 309 beaker.cache.super_short_term.expire=10
310 310 beaker.cache.super_short_term.key_length = 256
311 311
312 312 beaker.cache.short_term.type=memory
313 313 beaker.cache.short_term.expire=60
314 314 beaker.cache.short_term.key_length = 256
315 315
316 316 beaker.cache.long_term.type=memory
317 317 beaker.cache.long_term.expire=36000
318 318 beaker.cache.long_term.key_length = 256
319 319
320 320 beaker.cache.sql_cache_short.type=memory
321 321 beaker.cache.sql_cache_short.expire=10
322 322 beaker.cache.sql_cache_short.key_length = 256
323 323
324 324 beaker.cache.sql_cache_med.type=memory
325 325 beaker.cache.sql_cache_med.expire=360
326 326 beaker.cache.sql_cache_med.key_length = 256
327 327
328 328 beaker.cache.sql_cache_long.type=file
329 329 beaker.cache.sql_cache_long.expire=3600
330 330 beaker.cache.sql_cache_long.key_length = 256
331 331
332 332 ####################################
333 333 ### BEAKER SESSION ####
334 334 ####################################
335 335 ## Type of storage used for the session, current types are
336 336 ## dbm, file, memcached, database, and memory.
337 337 ## The storage uses the Container API
338 338 ## that is also used by the cache system.
339 339
340 340 ## db session ##
341 341 #beaker.session.type = ext:database
342 342 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
343 343 #beaker.session.table_name = db_session
344 344
345 345 ## encrypted cookie client side session, good for many instances ##
346 346 #beaker.session.type = cookie
347 347
348 348 ## file based cookies (default) ##
349 349 #beaker.session.type = file
350 350
351 351 ## beaker.session.key should be unique for a given host, even when running
352 352 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
353 353 beaker.session.key = kallithea
354 354 beaker.session.secret = change-me
355 355
356 356 ## Secure encrypted cookie. Requires AES and AES python libraries
357 357 ## you must disable beaker.session.secret to use this
358 358 #beaker.session.encrypt_key = <key_for_encryption>
359 359 #beaker.session.validate_key = <validation_key>
360 360
361 361 ## sets session as invalid if it haven't been accessed for given amount of time
362 362 beaker.session.timeout = 2592000
363 363 beaker.session.httponly = true
364 364 #beaker.session.cookie_path = /<your-prefix>
365 365
366 366 ## uncomment for https secure cookie
367 367 beaker.session.secure = false
368 368
369 369 ## auto save the session to not to use .save()
370 370 beaker.session.auto = False
371 371
372 372 ## default cookie expiration time in seconds `true` expire at browser close ##
373 373 #beaker.session.cookie_expires = 3600
374 374
375 375
376 376 ############################
377 377 ## ERROR HANDLING SYSTEMS ##
378 378 ############################
379 379
380 380 ####################
381 381 ### [errormator] ###
382 382 ####################
383 383
384 384 ## Errormator is tailored to work with Kallithea, see
385 385 ## http://errormator.com for details how to obtain an account
386 386 ## you must install python package `errormator_client` to make it work
387 387
388 388 ## errormator enabled
389 389 errormator = false
390 390
391 391 errormator.server_url = https://api.errormator.com
392 392 errormator.api_key = YOUR_API_KEY
393 393
394 394 ## TWEAK AMOUNT OF INFO SENT HERE
395 395
396 396 ## enables 404 error logging (default False)
397 397 errormator.report_404 = false
398 398
399 399 ## time in seconds after request is considered being slow (default 1)
400 400 errormator.slow_request_time = 1
401 401
402 402 ## record slow requests in application
403 403 ## (needs to be enabled for slow datastore recording and time tracking)
404 404 errormator.slow_requests = true
405 405
406 406 ## enable hooking to application loggers
407 407 # errormator.logging = true
408 408
409 409 ## minimum log level for log capture
410 410 # errormator.logging.level = WARNING
411 411
412 412 ## send logs only from erroneous/slow requests
413 413 ## (saves API quota for intensive logging)
414 414 errormator.logging_on_error = false
415 415
416 416 ## list of additonal keywords that should be grabbed from environ object
417 417 ## can be string with comma separated list of words in lowercase
418 418 ## (by default client will always send following info:
419 419 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
420 420 ## start with HTTP* this list be extended with additional keywords here
421 421 errormator.environ_keys_whitelist =
422 422
423 423
424 424 ## list of keywords that should be blanked from request object
425 425 ## can be string with comma separated list of words in lowercase
426 426 ## (by default client will always blank keys that contain following words
427 427 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
428 428 ## this list be extended with additional keywords set here
429 429 errormator.request_keys_blacklist =
430 430
431 431
432 432 ## list of namespaces that should be ignores when gathering log entries
433 433 ## can be string with comma separated list of namespaces
434 434 ## (by default the client ignores own entries: errormator_client.client)
435 435 errormator.log_namespace_blacklist =
436 436
437 437
438 438 ################
439 439 ### [sentry] ###
440 440 ################
441 441
442 442 ## sentry is a alternative open source error aggregator
443 443 ## you must install python packages `sentry` and `raven` to enable
444 444
445 445 sentry.dsn = YOUR_DNS
446 446 sentry.servers =
447 447 sentry.name =
448 448 sentry.key =
449 449 sentry.public_key =
450 450 sentry.secret_key =
451 451 sentry.project =
452 452 sentry.site =
453 453 sentry.include_paths =
454 454 sentry.exclude_paths =
455 455
456 456
457 457 ################################################################################
458 458 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
459 459 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
460 460 ## execute malicious code after an exception is raised. ##
461 461 ################################################################################
462 462 set debug = false
463 463
464 464 ##################################
465 465 ### LOGVIEW CONFIG ###
466 466 ##################################
467 467
468 468 logview.sqlalchemy = #faa
469 469 logview.pylons.templating = #bfb
470 470 logview.pylons.util = #eee
471 471
472 472 #########################################################
473 473 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
474 474 #########################################################
475 475
476 476 # SQLITE [default]
477 477 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
478 478
479 479 # POSTGRESQL
480 480 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
481 481
482 482 # MySQL
483 483 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
484 484
485 485 # see sqlalchemy docs for others
486 486
487 487 sqlalchemy.db1.echo = false
488 488 sqlalchemy.db1.pool_recycle = 3600
489 489 sqlalchemy.db1.convert_unicode = true
490 490
491 491 ################################
492 492 ### LOGGING CONFIGURATION ####
493 493 ################################
494 494
495 495 [loggers]
496 496 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
497 497
498 498 [handlers]
499 499 keys = console, console_sql
500 500
501 501 [formatters]
502 502 keys = generic, color_formatter, color_formatter_sql
503 503
504 504 #############
505 505 ## LOGGERS ##
506 506 #############
507 507
508 508 [logger_root]
509 509 level = NOTSET
510 510 handlers = console
511 511
512 512 [logger_routes]
513 513 level = DEBUG
514 514 handlers =
515 515 qualname = routes.middleware
516 516 ## "level = DEBUG" logs the route matched and routing variables.
517 517 propagate = 1
518 518
519 519 [logger_beaker]
520 520 level = DEBUG
521 521 handlers =
522 522 qualname = beaker.container
523 523 propagate = 1
524 524
525 525 [logger_templates]
526 526 level = INFO
527 527 handlers =
528 528 qualname = pylons.templating
529 529 propagate = 1
530 530
531 531 [logger_kallithea]
532 532 level = DEBUG
533 533 handlers =
534 534 qualname = kallithea
535 535 propagate = 1
536 536
537 537 [logger_sqlalchemy]
538 538 level = INFO
539 539 handlers = console_sql
540 540 qualname = sqlalchemy.engine
541 541 propagate = 0
542 542
543 543 [logger_whoosh_indexer]
544 544 level = DEBUG
545 545 handlers =
546 546 qualname = whoosh_indexer
547 547 propagate = 1
548 548
549 549 ##############
550 550 ## HANDLERS ##
551 551 ##############
552 552
553 553 [handler_console]
554 554 class = StreamHandler
555 555 args = (sys.stderr,)
556 556 level = INFO
557 557 formatter = generic
558 558
559 559 [handler_console_sql]
560 560 class = StreamHandler
561 561 args = (sys.stderr,)
562 562 level = WARN
563 563 formatter = generic
564 564
565 565 ################
566 566 ## FORMATTERS ##
567 567 ################
568 568
569 569 [formatter_generic]
570 570 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
571 571 datefmt = %Y-%m-%d %H:%M:%S
572 572
573 573 [formatter_color_formatter]
574 574 class=kallithea.lib.colored_formatter.ColorFormatter
575 575 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
576 576 datefmt = %Y-%m-%d %H:%M:%S
577 577
578 578 [formatter_color_formatter_sql]
579 579 class=kallithea.lib.colored_formatter.ColorFormatterSql
580 580 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
581 581 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,588 +1,588 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - config for tests: #
4 4 # initial_repo_scan = true #
5 5 # vcs_full_cache = false #
6 6 # sqlalchemy and kallithea_test.sqlite #
7 7 # custom logging #
8 8 # #
9 9 # The %(here)s variable will be replaced with the parent directory of this file#
10 10 ################################################################################
11 11 ################################################################################
12 12
13 13 [DEFAULT]
14 14 debug = true
15 15 pdebug = false
16 16
17 17 ################################################################################
18 18 ## Uncomment and replace with the address which should receive ##
19 19 ## any error reports after application crash ##
20 20 ## Additionally those settings will be used by Kallithea mailing system ##
21 21 ################################################################################
22 22 #email_to = admin@localhost
23 23 #error_email_from = paste_error@localhost
24 24 #app_email_from = kallithea-noreply@localhost
25 25 #email_prefix = [Kallithea]
26 26
27 27 #smtp_server = mail.server.com
28 28 #smtp_username =
29 29 #smtp_password =
30 30 #smtp_port =
31 31 #smtp_use_tls = false
32 #smtp_use_ssl = true
32 #smtp_use_ssl = false
33 33 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
34 34 #smtp_auth =
35 35
36 36 [server:main]
37 37 ## PASTE ##
38 38 #use = egg:Paste#http
39 39 ## nr of worker threads to spawn
40 40 #threadpool_workers = 5
41 41 ## max request before thread respawn
42 42 #threadpool_max_requests = 10
43 43 ## option to use threads of process
44 44 #use_threadpool = true
45 45
46 46 ## WAITRESS ##
47 47 use = egg:waitress#main
48 48 ## number of worker threads
49 49 threads = 5
50 50 ## MAX BODY SIZE 100GB
51 51 max_request_body_size = 107374182400
52 52 ## use poll instead of select, fixes fd limits, may not work on old
53 53 ## windows systems.
54 54 #asyncore_use_poll = True
55 55
56 56 ## GUNICORN ##
57 57 #use = egg:gunicorn#main
58 58 ## number of process workers. You must set `instance_id = *` when this option
59 59 ## is set to more than one worker
60 60 #workers = 1
61 61 ## process name
62 62 #proc_name = kallithea
63 63 ## type of worker class, one of sync, eventlet, gevent, tornado
64 64 ## recommended for bigger setup is using of of other than sync one
65 65 #worker_class = sync
66 66 #max_requests = 1000
67 67 ## ammount of time a worker can handle request before it gets killed and
68 68 ## restarted
69 69 #timeout = 3600
70 70
71 71 ## UWSGI ##
72 72 ## run with uwsgi --ini-paste-logged <inifile.ini>
73 73 #[uwsgi]
74 74 #socket = /tmp/uwsgi.sock
75 75 #master = true
76 76 #http = 127.0.0.1:5000
77 77
78 78 ## set as deamon and redirect all output to file
79 79 #daemonize = ./uwsgi_kallithea.log
80 80
81 81 ## master process PID
82 82 #pidfile = ./uwsgi_kallithea.pid
83 83
84 84 ## stats server with workers statistics, use uwsgitop
85 85 ## for monitoring, `uwsgitop 127.0.0.1:1717`
86 86 #stats = 127.0.0.1:1717
87 87 #memory-report = true
88 88
89 89 ## log 5XX errors
90 90 #log-5xx = true
91 91
92 92 ## Set the socket listen queue size.
93 93 #listen = 256
94 94
95 95 ## Gracefully Reload workers after the specified amount of managed requests
96 96 ## (avoid memory leaks).
97 97 #max-requests = 1000
98 98
99 99 ## enable large buffers
100 100 #buffer-size=65535
101 101
102 102 ## socket and http timeouts ##
103 103 #http-timeout=3600
104 104 #socket-timeout=3600
105 105
106 106 ## Log requests slower than the specified number of milliseconds.
107 107 #log-slow = 10
108 108
109 109 ## Exit if no app can be loaded.
110 110 #need-app = true
111 111
112 112 ## Set lazy mode (load apps in workers instead of master).
113 113 #lazy = true
114 114
115 115 ## scaling ##
116 116 ## set cheaper algorithm to use, if not set default will be used
117 117 #cheaper-algo = spare
118 118
119 119 ## minimum number of workers to keep at all times
120 120 #cheaper = 1
121 121
122 122 ## number of workers to spawn at startup
123 123 #cheaper-initial = 1
124 124
125 125 ## maximum number of workers that can be spawned
126 126 #workers = 4
127 127
128 128 ## how many workers should be spawned at a time
129 129 #cheaper-step = 1
130 130
131 131 ## COMMON ##
132 132 host = 127.0.0.1
133 133 port = 5000
134 134
135 135 ## middleware for hosting the WSGI application under a URL prefix
136 136 #[filter:proxy-prefix]
137 137 #use = egg:PasteDeploy#prefix
138 138 #prefix = /<your-prefix>
139 139
140 140 [app:main]
141 141 use = egg:kallithea
142 142 ## enable proxy prefix middleware
143 143 #filter-with = proxy-prefix
144 144
145 145 full_stack = true
146 146 static_files = true
147 147 ## Available Languages:
148 148 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
149 149 lang =
150 150 cache_dir = %(here)s/data
151 151 index_dir = %(here)s/data/index
152 152
153 153 ## perform a full repository scan on each server start, this should be
154 154 ## set to false after first startup, to allow faster server restarts.
155 155 #initial_repo_scan = false
156 156 initial_repo_scan = true
157 157
158 158 ## uncomment and set this path to use archive download cache
159 159 archive_cache_dir = %(here)s/tarballcache
160 160
161 161 ## change this to unique ID for security
162 162 app_instance_uuid = test
163 163
164 164 ## cut off limit for large diffs (size in bytes)
165 165 cut_off_limit = 256000
166 166
167 167 ## use cache version of scm repo everywhere
168 168 #vcs_full_cache = true
169 169 vcs_full_cache = false
170 170
171 171 ## force https in Kallithea, fixes https redirects, assumes it's always https
172 172 force_https = false
173 173
174 174 ## use Strict-Transport-Security headers
175 175 use_htsts = false
176 176
177 177 ## number of commits stats will parse on each iteration
178 178 commit_parse_limit = 25
179 179
180 180 ## path to git executable
181 181 git_path = git
182 182
183 183 ## git rev filter option, --all is the default filter, if you need to
184 184 ## hide all refs in changelog switch this to --branches --tags
185 185 #git_rev_filter = --branches --tags
186 186
187 187 ## RSS feed options
188 188 rss_cut_off_limit = 256000
189 189 rss_items_per_page = 10
190 190 rss_include_diff = false
191 191
192 192 ## options for showing and identifying changesets
193 193 show_sha_length = 12
194 194 show_revision_number = true
195 195
196 196 ## gist URL alias, used to create nicer urls for gist. This should be an
197 197 ## url that does rewrites to _admin/gists/<gistid>.
198 198 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
199 199 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
200 200 gist_alias_url =
201 201
202 202 ## white list of API enabled controllers. This allows to add list of
203 203 ## controllers to which access will be enabled by api_key. eg: to enable
204 204 ## api access to raw_files put `FilesController:raw`, to enable access to patches
205 205 ## add `ChangesetController:changeset_patch`. This list should be "," separated
206 206 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
207 207 ## Recommended settings below are commented out:
208 208 api_access_controllers_whitelist =
209 209 # ChangesetController:changeset_patch,
210 210 # ChangesetController:changeset_raw,
211 211 # FilesController:raw,
212 212 # FilesController:archivefile
213 213
214 214 ## default encoding used to convert from and to unicode
215 215 ## can be also a comma seperated list of encoding in case of mixed encodings
216 216 default_encoding = utf8
217 217
218 218 ## issue tracker for Kallithea (leave blank to disable, absent for default)
219 219 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
220 220
221 221 ## issue tracking mapping for commits messages
222 222 ## comment out issue_pat, issue_server, issue_prefix to enable
223 223
224 224 ## pattern to get the issues from commit messages
225 225 ## default one used here is #<numbers> with a regex passive group for `#`
226 226 ## {id} will be all groups matched from this pattern
227 227
228 228 issue_pat = (?:\s*#)(\d+)
229 229
230 230 ## server url to the issue, each {id} will be replaced with match
231 231 ## fetched from the regex and {repo} is replaced with full repository name
232 232 ## including groups {repo_name} is replaced with just name of repo
233 233
234 234 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
235 235
236 236 ## prefix to add to link to indicate it's an url
237 237 ## #314 will be replaced by <issue_prefix><id>
238 238
239 239 issue_prefix = #
240 240
241 241 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
242 242 ## multiple patterns, to other issues server, wiki or others
243 243 ## below an example how to create a wiki pattern
244 244 # wiki-some-id -> https://mywiki.com/some-id
245 245
246 246 #issue_pat_wiki = (?:wiki-)(.+)
247 247 #issue_server_link_wiki = https://mywiki.com/{id}
248 248 #issue_prefix_wiki = WIKI-
249 249
250 250
251 251 ## instance-id prefix
252 252 ## a prefix key for this instance used for cache invalidation when running
253 253 ## multiple instances of kallithea, make sure it's globally unique for
254 254 ## all running kallithea instances. Leave empty if you don't use it
255 255 instance_id =
256 256
257 257 ## alternative return HTTP header for failed authentication. Default HTTP
258 258 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
259 259 ## handling that. Set this variable to 403 to return HTTPForbidden
260 260 auth_ret_code =
261 261
262 262 ## locking return code. When repository is locked return this HTTP code. 2XX
263 263 ## codes don't break the transactions while 4XX codes do
264 264 lock_ret_code = 423
265 265
266 266 ## allows to change the repository location in settings page
267 267 allow_repo_location_change = True
268 268
269 269 ## allows to setup custom hooks in settings page
270 270 allow_custom_hooks_settings = True
271 271
272 272
273 273 ####################################
274 274 ### CELERY CONFIG ####
275 275 ####################################
276 276
277 277 use_celery = false
278 278 broker.host = localhost
279 279 broker.vhost = rabbitmqhost
280 280 broker.port = 5672
281 281 broker.user = rabbitmq
282 282 broker.password = qweqwe
283 283
284 284 celery.imports = kallithea.lib.celerylib.tasks
285 285
286 286 celery.result.backend = amqp
287 287 celery.result.dburi = amqp://
288 288 celery.result.serialier = json
289 289
290 290 #celery.send.task.error.emails = true
291 291 #celery.amqp.task.result.expires = 18000
292 292
293 293 celeryd.concurrency = 2
294 294 #celeryd.log.file = celeryd.log
295 295 celeryd.log.level = DEBUG
296 296 celeryd.max.tasks.per.child = 1
297 297
298 298 ## tasks will never be sent to the queue, but executed locally instead.
299 299 celery.always.eager = false
300 300
301 301 ####################################
302 302 ### BEAKER CACHE ####
303 303 ####################################
304 304
305 305 beaker.cache.data_dir=%(here)s/data/cache/data
306 306 beaker.cache.lock_dir=%(here)s/data/cache/lock
307 307
308 308 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
309 309
310 310 beaker.cache.super_short_term.type=memory
311 311 beaker.cache.super_short_term.expire=10
312 312 beaker.cache.super_short_term.key_length = 256
313 313
314 314 beaker.cache.short_term.type=memory
315 315 beaker.cache.short_term.expire=60
316 316 beaker.cache.short_term.key_length = 256
317 317
318 318 beaker.cache.long_term.type=memory
319 319 beaker.cache.long_term.expire=36000
320 320 beaker.cache.long_term.key_length = 256
321 321
322 322 beaker.cache.sql_cache_short.type=memory
323 323 beaker.cache.sql_cache_short.expire=1
324 324 beaker.cache.sql_cache_short.key_length = 256
325 325
326 326 beaker.cache.sql_cache_med.type=memory
327 327 beaker.cache.sql_cache_med.expire=360
328 328 beaker.cache.sql_cache_med.key_length = 256
329 329
330 330 beaker.cache.sql_cache_long.type=file
331 331 beaker.cache.sql_cache_long.expire=3600
332 332 beaker.cache.sql_cache_long.key_length = 256
333 333
334 334 ####################################
335 335 ### BEAKER SESSION ####
336 336 ####################################
337 337 ## Type of storage used for the session, current types are
338 338 ## dbm, file, memcached, database, and memory.
339 339 ## The storage uses the Container API
340 340 ## that is also used by the cache system.
341 341
342 342 ## db session ##
343 343 #beaker.session.type = ext:database
344 344 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
345 345 #beaker.session.table_name = db_session
346 346
347 347 ## encrypted cookie client side session, good for many instances ##
348 348 #beaker.session.type = cookie
349 349
350 350 ## file based cookies (default) ##
351 351 #beaker.session.type = file
352 352
353 353 ## beaker.session.key should be unique for a given host, even when running
354 354 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
355 355 beaker.session.key = kallithea
356 356 beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f}
357 357
358 358 ## Secure encrypted cookie. Requires AES and AES python libraries
359 359 ## you must disable beaker.session.secret to use this
360 360 #beaker.session.encrypt_key = <key_for_encryption>
361 361 #beaker.session.validate_key = <validation_key>
362 362
363 363 ## sets session as invalid if it haven't been accessed for given amount of time
364 364 beaker.session.timeout = 2592000
365 365 beaker.session.httponly = true
366 366 #beaker.session.cookie_path = /<your-prefix>
367 367
368 368 ## uncomment for https secure cookie
369 369 beaker.session.secure = false
370 370
371 371 ## auto save the session to not to use .save()
372 372 beaker.session.auto = False
373 373
374 374 ## default cookie expiration time in seconds `true` expire at browser close ##
375 375 #beaker.session.cookie_expires = 3600
376 376
377 377
378 378 ############################
379 379 ## ERROR HANDLING SYSTEMS ##
380 380 ############################
381 381
382 382 ####################
383 383 ### [errormator] ###
384 384 ####################
385 385
386 386 ## Errormator is tailored to work with Kallithea, see
387 387 ## http://errormator.com for details how to obtain an account
388 388 ## you must install python package `errormator_client` to make it work
389 389
390 390 ## errormator enabled
391 391 errormator = false
392 392
393 393 errormator.server_url = https://api.errormator.com
394 394 errormator.api_key = YOUR_API_KEY
395 395
396 396 ## TWEAK AMOUNT OF INFO SENT HERE
397 397
398 398 ## enables 404 error logging (default False)
399 399 errormator.report_404 = false
400 400
401 401 ## time in seconds after request is considered being slow (default 1)
402 402 errormator.slow_request_time = 1
403 403
404 404 ## record slow requests in application
405 405 ## (needs to be enabled for slow datastore recording and time tracking)
406 406 errormator.slow_requests = true
407 407
408 408 ## enable hooking to application loggers
409 409 # errormator.logging = true
410 410
411 411 ## minimum log level for log capture
412 412 # errormator.logging.level = WARNING
413 413
414 414 ## send logs only from erroneous/slow requests
415 415 ## (saves API quota for intensive logging)
416 416 errormator.logging_on_error = false
417 417
418 418 ## list of additonal keywords that should be grabbed from environ object
419 419 ## can be string with comma separated list of words in lowercase
420 420 ## (by default client will always send following info:
421 421 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
422 422 ## start with HTTP* this list be extended with additional keywords here
423 423 errormator.environ_keys_whitelist =
424 424
425 425
426 426 ## list of keywords that should be blanked from request object
427 427 ## can be string with comma separated list of words in lowercase
428 428 ## (by default client will always blank keys that contain following words
429 429 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
430 430 ## this list be extended with additional keywords set here
431 431 errormator.request_keys_blacklist =
432 432
433 433
434 434 ## list of namespaces that should be ignores when gathering log entries
435 435 ## can be string with comma separated list of namespaces
436 436 ## (by default the client ignores own entries: errormator_client.client)
437 437 errormator.log_namespace_blacklist =
438 438
439 439
440 440 ################
441 441 ### [sentry] ###
442 442 ################
443 443
444 444 ## sentry is a alternative open source error aggregator
445 445 ## you must install python packages `sentry` and `raven` to enable
446 446
447 447 sentry.dsn = YOUR_DNS
448 448 sentry.servers =
449 449 sentry.name =
450 450 sentry.key =
451 451 sentry.public_key =
452 452 sentry.secret_key =
453 453 sentry.project =
454 454 sentry.site =
455 455 sentry.include_paths =
456 456 sentry.exclude_paths =
457 457
458 458
459 459 ################################################################################
460 460 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
461 461 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
462 462 ## execute malicious code after an exception is raised. ##
463 463 ################################################################################
464 464 set debug = false
465 465
466 466 ##################################
467 467 ### LOGVIEW CONFIG ###
468 468 ##################################
469 469
470 470 logview.sqlalchemy = #faa
471 471 logview.pylons.templating = #bfb
472 472 logview.pylons.util = #eee
473 473
474 474 #########################################################
475 475 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
476 476 #########################################################
477 477
478 478 # SQLITE [default]
479 479 #sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
480 480 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite
481 481
482 482 # POSTGRESQL
483 483 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
484 484
485 485 # MySQL
486 486 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
487 487
488 488 # see sqlalchemy docs for others
489 489
490 490 sqlalchemy.db1.echo = false
491 491 sqlalchemy.db1.pool_recycle = 3600
492 492 sqlalchemy.db1.convert_unicode = true
493 493
494 494 ################################
495 495 ### LOGGING CONFIGURATION ####
496 496 ################################
497 497
498 498 [loggers]
499 499 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
500 500
501 501 [handlers]
502 502 keys = console, console_sql
503 503
504 504 [formatters]
505 505 keys = generic, color_formatter, color_formatter_sql
506 506
507 507 #############
508 508 ## LOGGERS ##
509 509 #############
510 510
511 511 [logger_root]
512 512 #level = NOTSET
513 513 level = DEBUG
514 514 handlers = console
515 515
516 516 [logger_routes]
517 517 level = DEBUG
518 518 handlers =
519 519 qualname = routes.middleware
520 520 ## "level = DEBUG" logs the route matched and routing variables.
521 521 propagate = 1
522 522
523 523 [logger_beaker]
524 524 level = DEBUG
525 525 handlers =
526 526 qualname = beaker.container
527 527 propagate = 1
528 528
529 529 [logger_templates]
530 530 level = INFO
531 531 handlers =
532 532 qualname = pylons.templating
533 533 propagate = 1
534 534
535 535 [logger_kallithea]
536 536 level = DEBUG
537 537 handlers =
538 538 qualname = kallithea
539 539 propagate = 1
540 540
541 541 [logger_sqlalchemy]
542 542 #level = INFO
543 543 #handlers = console_sql
544 544 level = ERROR
545 545 handlers = console
546 546 qualname = sqlalchemy.engine
547 547 propagate = 0
548 548
549 549 [logger_whoosh_indexer]
550 550 level = DEBUG
551 551 handlers =
552 552 qualname = whoosh_indexer
553 553 propagate = 1
554 554
555 555 ##############
556 556 ## HANDLERS ##
557 557 ##############
558 558
559 559 [handler_console]
560 560 class = StreamHandler
561 561 args = (sys.stderr,)
562 562 #level = INFO
563 563 level = NOTSET
564 564 formatter = generic
565 565
566 566 [handler_console_sql]
567 567 class = StreamHandler
568 568 args = (sys.stderr,)
569 569 level = WARN
570 570 formatter = generic
571 571
572 572 ################
573 573 ## FORMATTERS ##
574 574 ################
575 575
576 576 [formatter_generic]
577 577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
578 578 datefmt = %Y-%m-%d %H:%M:%S
579 579
580 580 [formatter_color_formatter]
581 581 class=kallithea.lib.colored_formatter.ColorFormatter
582 582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
583 583 datefmt = %Y-%m-%d %H:%M:%S
584 584
585 585 [formatter_color_formatter_sql]
586 586 class=kallithea.lib.colored_formatter.ColorFormatterSql
587 587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
588 588 datefmt = %Y-%m-%d %H:%M:%S
General Comments 0
You need to be logged in to leave comments. Login now