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