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