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