##// END OF EJS Templates
config: reduced gunicorn backlog default to handle less connections per worker
super-admin -
r4893:b28d9cbf default
parent child Browse files
Show More
@@ -1,923 +1,926 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 ; #########################################
4 4 ; RHODECODE COMMUNITY EDITION CONFIGURATION
5 5 ; #########################################
6 6
7 7 [DEFAULT]
8 8 ; Debug flag sets all loggers to debug, and enables request tracking
9 9 debug = true
10 10
11 11 ; ########################################################################
12 12 ; EMAIL CONFIGURATION
13 13 ; These settings will be used by the RhodeCode mailing system
14 14 ; ########################################################################
15 15
16 16 ; prefix all emails subjects with given prefix, helps filtering out emails
17 17 #email_prefix = [RhodeCode]
18 18
19 19 ; email FROM address all mails will be sent
20 20 #app_email_from = rhodecode-noreply@localhost
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
29 29 [server:main]
30 30 ; COMMON HOST/IP CONFIG
31 31 host = 127.0.0.1
32 32 port = 5000
33 33
34 34 ; ##################################################
35 35 ; WAITRESS WSGI SERVER - Recommended for Development
36 36 ; ##################################################
37 37
38 38 ; use server type
39 39 use = egg:waitress#main
40 40
41 41 ; number of worker threads
42 42 threads = 5
43 43
44 44 ; MAX BODY SIZE 100GB
45 45 max_request_body_size = 107374182400
46 46
47 47 ; Use poll instead of select, fixes file descriptors limits problems.
48 48 ; May not work on old windows systems.
49 49 asyncore_use_poll = true
50 50
51 51
52 52 ; ###########################
53 53 ; GUNICORN APPLICATION SERVER
54 54 ; ###########################
55 55
56 56 ; run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini
57 57
58 58 ; Module to use, this setting shouldn't be changed
59 59 #use = egg:gunicorn#main
60 60
61 61 ; Sets the number of process workers. More workers means more concurrent connections
62 62 ; RhodeCode can handle at the same time. Each additional worker also it increases
63 63 ; memory usage as each has it's own set of caches.
64 64 ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more
65 65 ; than 8-10 unless for really big deployments .e.g 700-1000 users.
66 66 ; `instance_id = *` must be set in the [app:main] section below (which is the default)
67 67 ; when using more than 1 worker.
68 68 #workers = 2
69 69
70 70 ; Gunicorn access log level
71 71 #loglevel = info
72 72
73 73 ; Process name visible in process list
74 74 #proc_name = rhodecode
75 75
76 76 ; Type of worker class, one of `sync`, `gevent`
77 77 ; Recommended type is `gevent`
78 78 #worker_class = gevent
79 79
80 80 ; The maximum number of simultaneous clients. Valid only for gevent
81 81 #worker_connections = 10
82 82
83 ; The maximum number of pending connections worker will queue to handle
84 #backlog = 64
85
83 86 ; Max number of requests that worker will handle before being gracefully restarted.
84 87 ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once.
85 88 #max_requests = 1000
86 89 #max_requests_jitter = 30
87 90
88 91 ; Amount of time a worker can spend with handling a request before it
89 92 ; gets killed and restarted. By default set to 21600 (6hrs)
90 93 ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h)
91 94 #timeout = 21600
92 95
93 96 ; The maximum size of HTTP request line in bytes.
94 97 ; 0 for unlimited
95 98 #limit_request_line = 0
96 99
97 100 ; Limit the number of HTTP headers fields in a request.
98 101 ; By default this value is 100 and can't be larger than 32768.
99 102 #limit_request_fields = 32768
100 103
101 104 ; Limit the allowed size of an HTTP request header field.
102 105 ; Value is a positive number or 0.
103 106 ; Setting it to 0 will allow unlimited header field sizes.
104 107 #limit_request_field_size = 0
105 108
106 109 ; Timeout for graceful workers restart.
107 110 ; After receiving a restart signal, workers have this much time to finish
108 111 ; serving requests. Workers still alive after the timeout (starting from the
109 112 ; receipt of the restart signal) are force killed.
110 113 ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h)
111 114 #graceful_timeout = 3600
112 115
113 116 # The number of seconds to wait for requests on a Keep-Alive connection.
114 117 # Generally set in the 1-5 seconds range.
115 118 #keepalive = 2
116 119
117 120 ; Maximum memory usage that each worker can use before it will receive a
118 121 ; graceful restart signal 0 = memory monitoring is disabled
119 122 ; Examples: 268435456 (256MB), 536870912 (512MB)
120 123 ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB)
121 124 #memory_max_usage = 0
122 125
123 126 ; How often in seconds to check for memory usage for each gunicorn worker
124 127 #memory_usage_check_interval = 60
125 128
126 129 ; Threshold value for which we don't recycle worker if GarbageCollection
127 130 ; frees up enough resources. Before each restart we try to run GC on worker
128 131 ; in case we get enough free memory after that, restart will not happen.
129 132 #memory_usage_recovery_threshold = 0.8
130 133
131 134
132 135 ; Prefix middleware for RhodeCode.
133 136 ; recommended when using proxy setup.
134 137 ; allows to set RhodeCode under a prefix in server.
135 138 ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
136 139 ; And set your prefix like: `prefix = /custom_prefix`
137 140 ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need
138 141 ; to make your cookies only work on prefix url
139 142 [filter:proxy-prefix]
140 143 use = egg:PasteDeploy#prefix
141 144 prefix = /
142 145
143 146 [app:main]
144 147 ; The %(here)s variable will be replaced with the absolute path of parent directory
145 148 ; of this file
146 149 ; Each option in the app:main can be override by an environmental variable
147 150 ;
148 151 ;To override an option:
149 152 ;
150 153 ;RC_<KeyName>
151 154 ;Everything should be uppercase, . and - should be replaced by _.
152 155 ;For example, if you have these configuration settings:
153 156 ;rc_cache.repo_object.backend = foo
154 157 ;can be overridden by
155 158 ;export RC_CACHE_REPO_OBJECT_BACKEND=foo
156 159
157 160 use = egg:rhodecode-enterprise-ce
158 161
159 162 ; enable proxy prefix middleware, defined above
160 163 #filter-with = proxy-prefix
161 164
162 165 ; #############
163 166 ; DEBUG OPTIONS
164 167 ; #############
165 168
166 169 pyramid.reload_templates = true
167 170
168 171 # During development the we want to have the debug toolbar enabled
169 172 pyramid.includes =
170 173 pyramid_debugtoolbar
171 174
172 175 debugtoolbar.hosts = 0.0.0.0/0
173 176 debugtoolbar.exclude_prefixes =
174 177 /css
175 178 /fonts
176 179 /images
177 180 /js
178 181
179 182 ## RHODECODE PLUGINS ##
180 183 rhodecode.includes =
181 184 rhodecode.api
182 185
183 186
184 187 # api prefix url
185 188 rhodecode.api.url = /_admin/api
186 189
187 190 ; enable debug style page
188 191 debug_style = true
189 192
190 193 ; #################
191 194 ; END DEBUG OPTIONS
192 195 ; #################
193 196
194 197 ; encryption key used to encrypt social plugin tokens,
195 198 ; remote_urls with credentials etc, if not set it defaults to
196 199 ; `beaker.session.secret`
197 200 #rhodecode.encrypted_values.secret =
198 201
199 202 ; decryption strict mode (enabled by default). It controls if decryption raises
200 203 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
201 204 #rhodecode.encrypted_values.strict = false
202 205
203 206 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
204 207 ; fernet is safer, and we strongly recommend switching to it.
205 208 ; Due to backward compatibility aes is used as default.
206 209 #rhodecode.encrypted_values.algorithm = fernet
207 210
208 211 ; Return gzipped responses from RhodeCode (static files/application)
209 212 gzip_responses = false
210 213
211 214 ; Auto-generate javascript routes file on startup
212 215 generate_js_files = false
213 216
214 217 ; System global default language.
215 218 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
216 219 lang = en
217 220
218 221 ; Perform a full repository scan and import on each server start.
219 222 ; Settings this to true could lead to very long startup time.
220 223 startup.import_repos = false
221 224
222 225 ; Uncomment and set this path to use archive download cache.
223 226 ; Once enabled, generated archives will be cached at this location
224 227 ; and served from the cache during subsequent requests for the same archive of
225 228 ; the repository.
226 229 #archive_cache_dir = /tmp/tarballcache
227 230
228 231 ; URL at which the application is running. This is used for Bootstrapping
229 232 ; requests in context when no web request is available. Used in ishell, or
230 233 ; SSH calls. Set this for events to receive proper url for SSH calls.
231 234 app.base_url = http://rhodecode.local
232 235
233 236 ; Unique application ID. Should be a random unique string for security.
234 237 app_instance_uuid = rc-production
235 238
236 239 ; Cut off limit for large diffs (size in bytes). If overall diff size on
237 240 ; commit, or pull request exceeds this limit this diff will be displayed
238 241 ; partially. E.g 512000 == 512Kb
239 242 cut_off_limit_diff = 512000
240 243
241 244 ; Cut off limit for large files inside diffs (size in bytes). Each individual
242 245 ; file inside diff which exceeds this limit will be displayed partially.
243 246 ; E.g 128000 == 128Kb
244 247 cut_off_limit_file = 128000
245 248
246 249 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
247 250 vcs_full_cache = true
248 251
249 252 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
250 253 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
251 254 force_https = false
252 255
253 256 ; use Strict-Transport-Security headers
254 257 use_htsts = false
255 258
256 259 ; Set to true if your repos are exposed using the dumb protocol
257 260 git_update_server_info = false
258 261
259 262 ; RSS/ATOM feed options
260 263 rss_cut_off_limit = 256000
261 264 rss_items_per_page = 10
262 265 rss_include_diff = false
263 266
264 267 ; gist URL alias, used to create nicer urls for gist. This should be an
265 268 ; url that does rewrites to _admin/gists/{gistid}.
266 269 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
267 270 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
268 271 gist_alias_url =
269 272
270 273 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
271 274 ; used for access.
272 275 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
273 276 ; came from the the logged in user who own this authentication token.
274 277 ; Additionally @TOKEN syntax can be used to bound the view to specific
275 278 ; authentication token. Such view would be only accessible when used together
276 279 ; with this authentication token
277 280 ; list of all views can be found under `/_admin/permissions/auth_token_access`
278 281 ; The list should be "," separated and on a single line.
279 282 ; Most common views to enable:
280 283
281 284 # RepoCommitsView:repo_commit_download
282 285 # RepoCommitsView:repo_commit_patch
283 286 # RepoCommitsView:repo_commit_raw
284 287 # RepoCommitsView:repo_commit_raw@TOKEN
285 288 # RepoFilesView:repo_files_diff
286 289 # RepoFilesView:repo_archivefile
287 290 # RepoFilesView:repo_file_raw
288 291 # GistView:*
289 292 api_access_controllers_whitelist =
290 293
291 294 ; Default encoding used to convert from and to unicode
292 295 ; can be also a comma separated list of encoding in case of mixed encodings
293 296 default_encoding = UTF-8
294 297
295 298 ; instance-id prefix
296 299 ; a prefix key for this instance used for cache invalidation when running
297 300 ; multiple instances of RhodeCode, make sure it's globally unique for
298 301 ; all running RhodeCode instances. Leave empty if you don't use it
299 302 instance_id =
300 303
301 304 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
302 305 ; of an authentication plugin also if it is disabled by it's settings.
303 306 ; This could be useful if you are unable to log in to the system due to broken
304 307 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
305 308 ; module to log in again and fix the settings.
306 309 ; Available builtin plugin IDs (hash is part of the ID):
307 310 ; egg:rhodecode-enterprise-ce#rhodecode
308 311 ; egg:rhodecode-enterprise-ce#pam
309 312 ; egg:rhodecode-enterprise-ce#ldap
310 313 ; egg:rhodecode-enterprise-ce#jasig_cas
311 314 ; egg:rhodecode-enterprise-ce#headers
312 315 ; egg:rhodecode-enterprise-ce#crowd
313 316
314 317 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
315 318
316 319 ; Flag to control loading of legacy plugins in py:/path format
317 320 auth_plugin.import_legacy_plugins = true
318 321
319 322 ; alternative return HTTP header for failed authentication. Default HTTP
320 323 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
321 324 ; handling that causing a series of failed authentication calls.
322 325 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
323 326 ; This will be served instead of default 401 on bad authentication
324 327 auth_ret_code =
325 328
326 329 ; use special detection method when serving auth_ret_code, instead of serving
327 330 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
328 331 ; and then serve auth_ret_code to clients
329 332 auth_ret_code_detection = false
330 333
331 334 ; locking return code. When repository is locked return this HTTP code. 2XX
332 335 ; codes don't break the transactions while 4XX codes do
333 336 lock_ret_code = 423
334 337
335 338 ; allows to change the repository location in settings page
336 339 allow_repo_location_change = true
337 340
338 341 ; allows to setup custom hooks in settings page
339 342 allow_custom_hooks_settings = true
340 343
341 344 ; Generated license token required for EE edition license.
342 345 ; New generated token value can be found in Admin > settings > license page.
343 346 license_token =
344 347
345 348 ; This flag hides sensitive information on the license page such as token, and license data
346 349 license.hide_license_info = false
347 350
348 351 ; supervisor connection uri, for managing supervisor and logs.
349 352 supervisor.uri =
350 353
351 354 ; supervisord group name/id we only want this RC instance to handle
352 355 supervisor.group_id = dev
353 356
354 357 ; Display extended labs settings
355 358 labs_settings_active = true
356 359
357 360 ; Custom exception store path, defaults to TMPDIR
358 361 ; This is used to store exception from RhodeCode in shared directory
359 362 #exception_tracker.store_path =
360 363
361 364 ; Send email with exception details when it happens
362 365 #exception_tracker.send_email = false
363 366
364 367 ; Comma separated list of recipients for exception emails,
365 368 ; e.g admin@rhodecode.com,devops@rhodecode.com
366 369 ; Can be left empty, then emails will be sent to ALL super-admins
367 370 #exception_tracker.send_email_recipients =
368 371
369 372 ; optional prefix to Add to email Subject
370 373 #exception_tracker.email_prefix = [RHODECODE ERROR]
371 374
372 375 ; File store configuration. This is used to store and serve uploaded files
373 376 file_store.enabled = true
374 377
375 378 ; Storage backend, available options are: local
376 379 file_store.backend = local
377 380
378 381 ; path to store the uploaded binaries
379 382 file_store.storage_path = %(here)s/data/file_store
380 383
381 384
382 385 ; #############
383 386 ; CELERY CONFIG
384 387 ; #############
385 388
386 389 ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini
387 390
388 391 use_celery = false
389 392
390 393 ; path to store schedule database
391 394 #celerybeat-schedule.path =
392 395
393 396 ; connection url to the message broker (default redis)
394 397 celery.broker_url = redis://localhost:6379/8
395 398
396 399 ; rabbitmq example
397 400 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
398 401
399 402 ; maximum tasks to execute before worker restart
400 403 celery.max_tasks_per_child = 20
401 404
402 405 ; tasks will never be sent to the queue, but executed locally instead.
403 406 celery.task_always_eager = false
404 407
405 408 ; #############
406 409 ; DOGPILE CACHE
407 410 ; #############
408 411
409 412 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
410 413 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
411 414 cache_dir = %(here)s/data
412 415
413 416 ; *********************************************
414 417 ; `sql_cache_short` cache for heavy SQL queries
415 418 ; Only supported backend is `memory_lru`
416 419 ; *********************************************
417 420 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
418 421 rc_cache.sql_cache_short.expiration_time = 30
419 422
420 423
421 424 ; *****************************************************
422 425 ; `cache_repo_longterm` cache for repo object instances
423 426 ; Only supported backend is `memory_lru`
424 427 ; *****************************************************
425 428 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
426 429 ; by default we use 30 Days, cache is still invalidated on push
427 430 rc_cache.cache_repo_longterm.expiration_time = 2592000
428 431 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
429 432 rc_cache.cache_repo_longterm.max_size = 10000
430 433
431 434
432 435 ; *********************************************
433 436 ; `cache_general` cache for general purpose use
434 437 ; for simplicity use rc.file_namespace backend,
435 438 ; for performance and scale use rc.redis
436 439 ; *********************************************
437 440 rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace
438 441 rc_cache.cache_general.expiration_time = 43200
439 442 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
440 443 #rc_cache.cache_general.arguments.filename = /tmp/cache_general.db
441 444
442 445 ; alternative `cache_general` redis backend with distributed lock
443 446 #rc_cache.cache_general.backend = dogpile.cache.rc.redis
444 447 #rc_cache.cache_general.expiration_time = 300
445 448
446 449 ; redis_expiration_time needs to be greater then expiration_time
447 450 #rc_cache.cache_general.arguments.redis_expiration_time = 7200
448 451
449 452 #rc_cache.cache_general.arguments.host = localhost
450 453 #rc_cache.cache_general.arguments.port = 6379
451 454 #rc_cache.cache_general.arguments.db = 0
452 455 #rc_cache.cache_general.arguments.socket_timeout = 30
453 456 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
454 457 #rc_cache.cache_general.arguments.distributed_lock = true
455 458
456 459 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
457 460 #rc_cache.cache_general.arguments.lock_auto_renewal = true
458 461
459 462 ; *************************************************
460 463 ; `cache_perms` cache for permission tree, auth TTL
461 464 ; for simplicity use rc.file_namespace backend,
462 465 ; for performance and scale use rc.redis
463 466 ; *************************************************
464 467 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
465 468 rc_cache.cache_perms.expiration_time = 3600
466 469 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
467 470 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
468 471
469 472 ; alternative `cache_perms` redis backend with distributed lock
470 473 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
471 474 #rc_cache.cache_perms.expiration_time = 300
472 475
473 476 ; redis_expiration_time needs to be greater then expiration_time
474 477 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
475 478
476 479 #rc_cache.cache_perms.arguments.host = localhost
477 480 #rc_cache.cache_perms.arguments.port = 6379
478 481 #rc_cache.cache_perms.arguments.db = 0
479 482 #rc_cache.cache_perms.arguments.socket_timeout = 30
480 483 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
481 484 #rc_cache.cache_perms.arguments.distributed_lock = true
482 485
483 486 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
484 487 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
485 488
486 489 ; ***************************************************
487 490 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
488 491 ; for simplicity use rc.file_namespace backend,
489 492 ; for performance and scale use rc.redis
490 493 ; ***************************************************
491 494 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
492 495 rc_cache.cache_repo.expiration_time = 2592000
493 496 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
494 497 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
495 498
496 499 ; alternative `cache_repo` redis backend with distributed lock
497 500 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
498 501 #rc_cache.cache_repo.expiration_time = 2592000
499 502
500 503 ; redis_expiration_time needs to be greater then expiration_time
501 504 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
502 505
503 506 #rc_cache.cache_repo.arguments.host = localhost
504 507 #rc_cache.cache_repo.arguments.port = 6379
505 508 #rc_cache.cache_repo.arguments.db = 1
506 509 #rc_cache.cache_repo.arguments.socket_timeout = 30
507 510 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
508 511 #rc_cache.cache_repo.arguments.distributed_lock = true
509 512
510 513 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
511 514 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
512 515
513 516 ; ##############
514 517 ; BEAKER SESSION
515 518 ; ##############
516 519
517 520 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
518 521 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
519 522 ; Fastest ones are Redis and ext:database
520 523 beaker.session.type = file
521 524 beaker.session.data_dir = %(here)s/data/sessions
522 525
523 526 ; Redis based sessions
524 527 #beaker.session.type = ext:redis
525 528 #beaker.session.url = redis://127.0.0.1:6379/2
526 529
527 530 ; DB based session, fast, and allows easy management over logged in users
528 531 #beaker.session.type = ext:database
529 532 #beaker.session.table_name = db_session
530 533 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
531 534 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
532 535 #beaker.session.sa.pool_recycle = 3600
533 536 #beaker.session.sa.echo = false
534 537
535 538 beaker.session.key = rhodecode
536 539 beaker.session.secret = develop-rc-uytcxaz
537 540 beaker.session.lock_dir = %(here)s/data/sessions/lock
538 541
539 542 ; Secure encrypted cookie. Requires AES and AES python libraries
540 543 ; you must disable beaker.session.secret to use this
541 544 #beaker.session.encrypt_key = key_for_encryption
542 545 #beaker.session.validate_key = validation_key
543 546
544 547 ; Sets session as invalid (also logging out user) if it haven not been
545 548 ; accessed for given amount of time in seconds
546 549 beaker.session.timeout = 2592000
547 550 beaker.session.httponly = true
548 551
549 552 ; Path to use for the cookie. Set to prefix if you use prefix middleware
550 553 #beaker.session.cookie_path = /custom_prefix
551 554
552 555 ; Set https secure cookie
553 556 beaker.session.secure = false
554 557
555 558 ; default cookie expiration time in seconds, set to `true` to set expire
556 559 ; at browser close
557 560 #beaker.session.cookie_expires = 3600
558 561
559 562 ; #############################
560 563 ; SEARCH INDEXING CONFIGURATION
561 564 ; #############################
562 565
563 566 ; Full text search indexer is available in rhodecode-tools under
564 567 ; `rhodecode-tools index` command
565 568
566 569 ; WHOOSH Backend, doesn't require additional services to run
567 570 ; it works good with few dozen repos
568 571 search.module = rhodecode.lib.index.whoosh
569 572 search.location = %(here)s/data/index
570 573
571 574 ; ####################
572 575 ; CHANNELSTREAM CONFIG
573 576 ; ####################
574 577
575 578 ; channelstream enables persistent connections and live notification
576 579 ; in the system. It's also used by the chat system
577 580
578 581 channelstream.enabled = false
579 582
580 583 ; server address for channelstream server on the backend
581 584 channelstream.server = 127.0.0.1:9800
582 585
583 586 ; location of the channelstream server from outside world
584 587 ; use ws:// for http or wss:// for https. This address needs to be handled
585 588 ; by external HTTP server such as Nginx or Apache
586 589 ; see Nginx/Apache configuration examples in our docs
587 590 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
588 591 channelstream.secret = secret
589 592 channelstream.history.location = %(here)s/channelstream_history
590 593
591 594 ; Internal application path that Javascript uses to connect into.
592 595 ; If you use proxy-prefix the prefix should be added before /_channelstream
593 596 channelstream.proxy_path = /_channelstream
594 597
595 598
596 599 ; ##############################
597 600 ; MAIN RHODECODE DATABASE CONFIG
598 601 ; ##############################
599 602
600 603 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
601 604 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
602 605 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
603 606 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
604 607 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
605 608
606 609 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
607 610
608 611 ; see sqlalchemy docs for other advanced settings
609 612 ; print the sql statements to output
610 613 sqlalchemy.db1.echo = false
611 614
612 615 ; recycle the connections after this amount of seconds
613 616 sqlalchemy.db1.pool_recycle = 3600
614 617 sqlalchemy.db1.convert_unicode = true
615 618
616 619 ; the number of connections to keep open inside the connection pool.
617 620 ; 0 indicates no limit
618 621 #sqlalchemy.db1.pool_size = 5
619 622
620 623 ; The number of connections to allow in connection pool "overflow", that is
621 624 ; connections that can be opened above and beyond the pool_size setting,
622 625 ; which defaults to five.
623 626 #sqlalchemy.db1.max_overflow = 10
624 627
625 628 ; Connection check ping, used to detect broken database connections
626 629 ; could be enabled to better handle cases if MySQL has gone away errors
627 630 #sqlalchemy.db1.ping_connection = true
628 631
629 632 ; ##########
630 633 ; VCS CONFIG
631 634 ; ##########
632 635 vcs.server.enable = true
633 636 vcs.server = localhost:9900
634 637
635 638 ; Web server connectivity protocol, responsible for web based VCS operations
636 639 ; Available protocols are:
637 640 ; `http` - use http-rpc backend (default)
638 641 vcs.server.protocol = http
639 642
640 643 ; Push/Pull operations protocol, available options are:
641 644 ; `http` - use http-rpc backend (default)
642 645 vcs.scm_app_implementation = http
643 646
644 647 ; Push/Pull operations hooks protocol, available options are:
645 648 ; `http` - use http-rpc backend (default)
646 649 vcs.hooks.protocol = http
647 650
648 651 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
649 652 ; accessible via network.
650 653 ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker)
651 654 vcs.hooks.host = *
652 655
653 656 ; Start VCSServer with this instance as a subprocess, useful for development
654 657 vcs.start_server = false
655 658
656 659 ; List of enabled VCS backends, available options are:
657 660 ; `hg` - mercurial
658 661 ; `git` - git
659 662 ; `svn` - subversion
660 663 vcs.backends = hg, git, svn
661 664
662 665 ; Wait this number of seconds before killing connection to the vcsserver
663 666 vcs.connection_timeout = 3600
664 667
665 668 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
666 669 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
667 670 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
668 671 #vcs.svn.compatible_version = 1.8
669 672
670 673 ; Cache flag to cache vcsserver remote calls locally
671 674 ; It uses cache_region `cache_repo`
672 675 vcs.methods.cache = true
673 676
674 677 ; ####################################################
675 678 ; Subversion proxy support (mod_dav_svn)
676 679 ; Maps RhodeCode repo groups into SVN paths for Apache
677 680 ; ####################################################
678 681
679 682 ; Enable or disable the config file generation.
680 683 svn.proxy.generate_config = false
681 684
682 685 ; Generate config file with `SVNListParentPath` set to `On`.
683 686 svn.proxy.list_parent_path = true
684 687
685 688 ; Set location and file name of generated config file.
686 689 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
687 690
688 691 ; alternative mod_dav config template. This needs to be a valid mako template
689 692 ; Example template can be found in the source code:
690 693 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
691 694 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
692 695
693 696 ; Used as a prefix to the `Location` block in the generated config file.
694 697 ; In most cases it should be set to `/`.
695 698 svn.proxy.location_root = /
696 699
697 700 ; Command to reload the mod dav svn configuration on change.
698 701 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
699 702 ; Make sure user who runs RhodeCode process is allowed to reload Apache
700 703 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
701 704
702 705 ; If the timeout expires before the reload command finishes, the command will
703 706 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
704 707 #svn.proxy.reload_timeout = 10
705 708
706 709 ; ####################
707 710 ; SSH Support Settings
708 711 ; ####################
709 712
710 713 ; Defines if a custom authorized_keys file should be created and written on
711 714 ; any change user ssh keys. Setting this to false also disables possibility
712 715 ; of adding SSH keys by users from web interface. Super admins can still
713 716 ; manage SSH Keys.
714 717 ssh.generate_authorized_keyfile = false
715 718
716 719 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
717 720 # ssh.authorized_keys_ssh_opts =
718 721
719 722 ; Path to the authorized_keys file where the generate entries are placed.
720 723 ; It is possible to have multiple key files specified in `sshd_config` e.g.
721 724 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
722 725 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
723 726
724 727 ; Command to execute the SSH wrapper. The binary is available in the
725 728 ; RhodeCode installation directory.
726 729 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
727 730 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
728 731
729 732 ; Allow shell when executing the ssh-wrapper command
730 733 ssh.wrapper_cmd_allow_shell = false
731 734
732 735 ; Enables logging, and detailed output send back to the client during SSH
733 736 ; operations. Useful for debugging, shouldn't be used in production.
734 737 ssh.enable_debug_logging = true
735 738
736 739 ; Paths to binary executable, by default they are the names, but we can
737 740 ; override them if we want to use a custom one
738 741 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
739 742 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
740 743 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
741 744
742 745 ; Enables SSH key generator web interface. Disabling this still allows users
743 746 ; to add their own keys.
744 747 ssh.enable_ui_key_generator = true
745 748
746 749
747 750 ; #################
748 751 ; APPENLIGHT CONFIG
749 752 ; #################
750 753
751 754 ; Appenlight is tailored to work with RhodeCode, see
752 755 ; http://appenlight.rhodecode.com for details how to obtain an account
753 756
754 757 ; Appenlight integration enabled
755 758 #appenlight = false
756 759
757 760 #appenlight.server_url = https://api.appenlight.com
758 761 #appenlight.api_key = YOUR_API_KEY
759 762 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
760 763
761 764 ; used for JS client
762 765 #appenlight.api_public_key = YOUR_API_PUBLIC_KEY
763 766
764 767 ; TWEAK AMOUNT OF INFO SENT HERE
765 768
766 769 ; enables 404 error logging (default False)
767 770 #appenlight.report_404 = false
768 771
769 772 ; time in seconds after request is considered being slow (default 1)
770 773 #appenlight.slow_request_time = 1
771 774
772 775 ; record slow requests in application
773 776 ; (needs to be enabled for slow datastore recording and time tracking)
774 777 #appenlight.slow_requests = true
775 778
776 779 ; enable hooking to application loggers
777 780 #appenlight.logging = true
778 781
779 782 ; minimum log level for log capture
780 783 #ppenlight.logging.level = WARNING
781 784
782 785 ; send logs only from erroneous/slow requests
783 786 ; (saves API quota for intensive logging)
784 787 #appenlight.logging_on_error = false
785 788
786 789 ; list of additional keywords that should be grabbed from environ object
787 790 ; can be string with comma separated list of words in lowercase
788 791 ; (by default client will always send following info:
789 792 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
790 793 ; start with HTTP* this list be extended with additional keywords here
791 794 #appenlight.environ_keys_whitelist =
792 795
793 796 ; list of keywords that should be blanked from request object
794 797 ; can be string with comma separated list of words in lowercase
795 798 ; (by default client will always blank keys that contain following words
796 799 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
797 800 ; this list be extended with additional keywords set here
798 801 #appenlight.request_keys_blacklist =
799 802
800 803 ; list of namespaces that should be ignores when gathering log entries
801 804 ; can be string with comma separated list of namespaces
802 805 ; (by default the client ignores own entries: appenlight_client.client)
803 806 #appenlight.log_namespace_blacklist =
804 807
805 808 ; Statsd client config, this is used to send metrics to statsd
806 809 ; We recommend setting statsd_exported and scrape them using Promethues
807 810 #statsd.enabled = false
808 811 #statsd.statsd_host = 0.0.0.0
809 812 #statsd.statsd_port = 8125
810 813 #statsd.statsd_prefix =
811 814 #statsd.statsd_ipv6 = false
812 815
813 816 ; configure logging automatically at server startup set to false
814 817 ; to use the below custom logging config.
815 818 ; RC_LOGGING_FORMATTER
816 819 ; RC_LOGGING_LEVEL
817 820 ; env variables can control the settings for logging in case of autoconfigure
818 821
819 822 #logging.autoconfigure = true
820 823
821 824 ; specify your own custom logging config file to configure logging
822 825 #logging.logging_conf_file = /path/to/custom_logging.ini
823 826
824 827 ; Dummy marker to add new entries after.
825 828 ; Add any custom entries below. Please don't remove this marker.
826 829 custom.conf = 1
827 830
828 831
829 832 ; #####################
830 833 ; LOGGING CONFIGURATION
831 834 ; #####################
832 835
833 836 [loggers]
834 837 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
835 838
836 839 [handlers]
837 840 keys = console, console_sql
838 841
839 842 [formatters]
840 843 keys = generic, json, color_formatter, color_formatter_sql
841 844
842 845 ; #######
843 846 ; LOGGERS
844 847 ; #######
845 848 [logger_root]
846 849 level = NOTSET
847 850 handlers = console
848 851
849 852 [logger_sqlalchemy]
850 853 level = INFO
851 854 handlers = console_sql
852 855 qualname = sqlalchemy.engine
853 856 propagate = 0
854 857
855 858 [logger_beaker]
856 859 level = DEBUG
857 860 handlers =
858 861 qualname = beaker.container
859 862 propagate = 1
860 863
861 864 [logger_rhodecode]
862 865 level = DEBUG
863 866 handlers =
864 867 qualname = rhodecode
865 868 propagate = 1
866 869
867 870 [logger_ssh_wrapper]
868 871 level = DEBUG
869 872 handlers =
870 873 qualname = ssh_wrapper
871 874 propagate = 1
872 875
873 876 [logger_celery]
874 877 level = DEBUG
875 878 handlers =
876 879 qualname = celery
877 880
878 881
879 882 ; ########
880 883 ; HANDLERS
881 884 ; ########
882 885
883 886 [handler_console]
884 887 class = StreamHandler
885 888 args = (sys.stderr, )
886 889 level = DEBUG
887 890 ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json'
888 891 ; This allows sending properly formatted logs to grafana loki or elasticsearch
889 892 formatter = color_formatter
890 893
891 894 [handler_console_sql]
892 895 ; "level = DEBUG" logs SQL queries and results.
893 896 ; "level = INFO" logs SQL queries.
894 897 ; "level = WARN" logs neither. (Recommended for production systems.)
895 898 class = StreamHandler
896 899 args = (sys.stderr, )
897 900 level = WARN
898 901 ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json'
899 902 ; This allows sending properly formatted logs to grafana loki or elasticsearch
900 903 formatter = color_formatter_sql
901 904
902 905 ; ##########
903 906 ; FORMATTERS
904 907 ; ##########
905 908
906 909 [formatter_generic]
907 910 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
908 911 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
909 912 datefmt = %Y-%m-%d %H:%M:%S
910 913
911 914 [formatter_color_formatter]
912 915 class = rhodecode.lib.logging_formatter.ColorFormatter
913 916 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
914 917 datefmt = %Y-%m-%d %H:%M:%S
915 918
916 919 [formatter_color_formatter_sql]
917 920 class = rhodecode.lib.logging_formatter.ColorFormatterSql
918 921 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
919 922 datefmt = %Y-%m-%d %H:%M:%S
920 923
921 924 [formatter_json]
922 925 format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s
923 926 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter
@@ -1,874 +1,877 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 ; #########################################
4 4 ; RHODECODE COMMUNITY EDITION CONFIGURATION
5 5 ; #########################################
6 6
7 7 [DEFAULT]
8 8 ; Debug flag sets all loggers to debug, and enables request tracking
9 9 debug = false
10 10
11 11 ; ########################################################################
12 12 ; EMAIL CONFIGURATION
13 13 ; These settings will be used by the RhodeCode mailing system
14 14 ; ########################################################################
15 15
16 16 ; prefix all emails subjects with given prefix, helps filtering out emails
17 17 #email_prefix = [RhodeCode]
18 18
19 19 ; email FROM address all mails will be sent
20 20 #app_email_from = rhodecode-noreply@localhost
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
29 29 [server:main]
30 30 ; COMMON HOST/IP CONFIG
31 31 host = 127.0.0.1
32 32 port = 5000
33 33
34 34
35 35 ; ###########################
36 36 ; GUNICORN APPLICATION SERVER
37 37 ; ###########################
38 38
39 39 ; run with gunicorn --paste rhodecode.ini
40 40
41 41 ; Module to use, this setting shouldn't be changed
42 42 use = egg:gunicorn#main
43 43
44 44 ; Sets the number of process workers. More workers means more concurrent connections
45 45 ; RhodeCode can handle at the same time. Each additional worker also it increases
46 46 ; memory usage as each has it's own set of caches.
47 47 ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more
48 48 ; than 8-10 unless for really big deployments .e.g 700-1000 users.
49 49 ; `instance_id = *` must be set in the [app:main] section below (which is the default)
50 50 ; when using more than 1 worker.
51 51 workers = 2
52 52
53 53 ; Gunicorn access log level
54 54 loglevel = info
55 55
56 56 ; Process name visible in process list
57 57 proc_name = rhodecode
58 58
59 59 ; Type of worker class, one of `sync`, `gevent`
60 60 ; Recommended type is `gevent`
61 61 worker_class = gevent
62 62
63 63 ; The maximum number of simultaneous clients per worker. Valid only for gevent
64 64 worker_connections = 10
65 65
66 ; The maximum number of pending connections worker will queue to handle
67 backlog = 64
68
66 69 ; Max number of requests that worker will handle before being gracefully restarted.
67 70 ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once.
68 71 max_requests = 1000
69 72 max_requests_jitter = 30
70 73
71 74 ; Amount of time a worker can spend with handling a request before it
72 75 ; gets killed and restarted. By default set to 21600 (6hrs)
73 76 ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h)
74 77 timeout = 21600
75 78
76 79 ; The maximum size of HTTP request line in bytes.
77 80 ; 0 for unlimited
78 81 limit_request_line = 0
79 82
80 83 ; Limit the number of HTTP headers fields in a request.
81 84 ; By default this value is 100 and can't be larger than 32768.
82 85 limit_request_fields = 32768
83 86
84 87 ; Limit the allowed size of an HTTP request header field.
85 88 ; Value is a positive number or 0.
86 89 ; Setting it to 0 will allow unlimited header field sizes.
87 90 limit_request_field_size = 0
88 91
89 92 ; Timeout for graceful workers restart.
90 93 ; After receiving a restart signal, workers have this much time to finish
91 94 ; serving requests. Workers still alive after the timeout (starting from the
92 95 ; receipt of the restart signal) are force killed.
93 96 ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h)
94 97 graceful_timeout = 3600
95 98
96 99 # The number of seconds to wait for requests on a Keep-Alive connection.
97 100 # Generally set in the 1-5 seconds range.
98 101 keepalive = 2
99 102
100 103 ; Maximum memory usage that each worker can use before it will receive a
101 104 ; graceful restart signal 0 = memory monitoring is disabled
102 105 ; Examples: 268435456 (256MB), 536870912 (512MB)
103 106 ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB)
104 107 memory_max_usage = 0
105 108
106 109 ; How often in seconds to check for memory usage for each gunicorn worker
107 110 memory_usage_check_interval = 60
108 111
109 112 ; Threshold value for which we don't recycle worker if GarbageCollection
110 113 ; frees up enough resources. Before each restart we try to run GC on worker
111 114 ; in case we get enough free memory after that, restart will not happen.
112 115 memory_usage_recovery_threshold = 0.8
113 116
114 117
115 118 ; Prefix middleware for RhodeCode.
116 119 ; recommended when using proxy setup.
117 120 ; allows to set RhodeCode under a prefix in server.
118 121 ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
119 122 ; And set your prefix like: `prefix = /custom_prefix`
120 123 ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need
121 124 ; to make your cookies only work on prefix url
122 125 [filter:proxy-prefix]
123 126 use = egg:PasteDeploy#prefix
124 127 prefix = /
125 128
126 129 [app:main]
127 130 ; The %(here)s variable will be replaced with the absolute path of parent directory
128 131 ; of this file
129 132 ; Each option in the app:main can be override by an environmental variable
130 133 ;
131 134 ;To override an option:
132 135 ;
133 136 ;RC_<KeyName>
134 137 ;Everything should be uppercase, . and - should be replaced by _.
135 138 ;For example, if you have these configuration settings:
136 139 ;rc_cache.repo_object.backend = foo
137 140 ;can be overridden by
138 141 ;export RC_CACHE_REPO_OBJECT_BACKEND=foo
139 142
140 143 use = egg:rhodecode-enterprise-ce
141 144
142 145 ; enable proxy prefix middleware, defined above
143 146 #filter-with = proxy-prefix
144 147
145 148 ; encryption key used to encrypt social plugin tokens,
146 149 ; remote_urls with credentials etc, if not set it defaults to
147 150 ; `beaker.session.secret`
148 151 #rhodecode.encrypted_values.secret =
149 152
150 153 ; decryption strict mode (enabled by default). It controls if decryption raises
151 154 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
152 155 #rhodecode.encrypted_values.strict = false
153 156
154 157 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
155 158 ; fernet is safer, and we strongly recommend switching to it.
156 159 ; Due to backward compatibility aes is used as default.
157 160 #rhodecode.encrypted_values.algorithm = fernet
158 161
159 162 ; Return gzipped responses from RhodeCode (static files/application)
160 163 gzip_responses = false
161 164
162 165 ; Auto-generate javascript routes file on startup
163 166 generate_js_files = false
164 167
165 168 ; System global default language.
166 169 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
167 170 lang = en
168 171
169 172 ; Perform a full repository scan and import on each server start.
170 173 ; Settings this to true could lead to very long startup time.
171 174 startup.import_repos = false
172 175
173 176 ; Uncomment and set this path to use archive download cache.
174 177 ; Once enabled, generated archives will be cached at this location
175 178 ; and served from the cache during subsequent requests for the same archive of
176 179 ; the repository.
177 180 #archive_cache_dir = /tmp/tarballcache
178 181
179 182 ; URL at which the application is running. This is used for Bootstrapping
180 183 ; requests in context when no web request is available. Used in ishell, or
181 184 ; SSH calls. Set this for events to receive proper url for SSH calls.
182 185 app.base_url = http://rhodecode.local
183 186
184 187 ; Unique application ID. Should be a random unique string for security.
185 188 app_instance_uuid = rc-production
186 189
187 190 ; Cut off limit for large diffs (size in bytes). If overall diff size on
188 191 ; commit, or pull request exceeds this limit this diff will be displayed
189 192 ; partially. E.g 512000 == 512Kb
190 193 cut_off_limit_diff = 512000
191 194
192 195 ; Cut off limit for large files inside diffs (size in bytes). Each individual
193 196 ; file inside diff which exceeds this limit will be displayed partially.
194 197 ; E.g 128000 == 128Kb
195 198 cut_off_limit_file = 128000
196 199
197 200 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
198 201 vcs_full_cache = true
199 202
200 203 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
201 204 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
202 205 force_https = false
203 206
204 207 ; use Strict-Transport-Security headers
205 208 use_htsts = false
206 209
207 210 ; Set to true if your repos are exposed using the dumb protocol
208 211 git_update_server_info = false
209 212
210 213 ; RSS/ATOM feed options
211 214 rss_cut_off_limit = 256000
212 215 rss_items_per_page = 10
213 216 rss_include_diff = false
214 217
215 218 ; gist URL alias, used to create nicer urls for gist. This should be an
216 219 ; url that does rewrites to _admin/gists/{gistid}.
217 220 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
218 221 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
219 222 gist_alias_url =
220 223
221 224 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
222 225 ; used for access.
223 226 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
224 227 ; came from the the logged in user who own this authentication token.
225 228 ; Additionally @TOKEN syntax can be used to bound the view to specific
226 229 ; authentication token. Such view would be only accessible when used together
227 230 ; with this authentication token
228 231 ; list of all views can be found under `/_admin/permissions/auth_token_access`
229 232 ; The list should be "," separated and on a single line.
230 233 ; Most common views to enable:
231 234
232 235 # RepoCommitsView:repo_commit_download
233 236 # RepoCommitsView:repo_commit_patch
234 237 # RepoCommitsView:repo_commit_raw
235 238 # RepoCommitsView:repo_commit_raw@TOKEN
236 239 # RepoFilesView:repo_files_diff
237 240 # RepoFilesView:repo_archivefile
238 241 # RepoFilesView:repo_file_raw
239 242 # GistView:*
240 243 api_access_controllers_whitelist =
241 244
242 245 ; Default encoding used to convert from and to unicode
243 246 ; can be also a comma separated list of encoding in case of mixed encodings
244 247 default_encoding = UTF-8
245 248
246 249 ; instance-id prefix
247 250 ; a prefix key for this instance used for cache invalidation when running
248 251 ; multiple instances of RhodeCode, make sure it's globally unique for
249 252 ; all running RhodeCode instances. Leave empty if you don't use it
250 253 instance_id =
251 254
252 255 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
253 256 ; of an authentication plugin also if it is disabled by it's settings.
254 257 ; This could be useful if you are unable to log in to the system due to broken
255 258 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
256 259 ; module to log in again and fix the settings.
257 260 ; Available builtin plugin IDs (hash is part of the ID):
258 261 ; egg:rhodecode-enterprise-ce#rhodecode
259 262 ; egg:rhodecode-enterprise-ce#pam
260 263 ; egg:rhodecode-enterprise-ce#ldap
261 264 ; egg:rhodecode-enterprise-ce#jasig_cas
262 265 ; egg:rhodecode-enterprise-ce#headers
263 266 ; egg:rhodecode-enterprise-ce#crowd
264 267
265 268 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
266 269
267 270 ; Flag to control loading of legacy plugins in py:/path format
268 271 auth_plugin.import_legacy_plugins = true
269 272
270 273 ; alternative return HTTP header for failed authentication. Default HTTP
271 274 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
272 275 ; handling that causing a series of failed authentication calls.
273 276 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
274 277 ; This will be served instead of default 401 on bad authentication
275 278 auth_ret_code =
276 279
277 280 ; use special detection method when serving auth_ret_code, instead of serving
278 281 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
279 282 ; and then serve auth_ret_code to clients
280 283 auth_ret_code_detection = false
281 284
282 285 ; locking return code. When repository is locked return this HTTP code. 2XX
283 286 ; codes don't break the transactions while 4XX codes do
284 287 lock_ret_code = 423
285 288
286 289 ; allows to change the repository location in settings page
287 290 allow_repo_location_change = true
288 291
289 292 ; allows to setup custom hooks in settings page
290 293 allow_custom_hooks_settings = true
291 294
292 295 ; Generated license token required for EE edition license.
293 296 ; New generated token value can be found in Admin > settings > license page.
294 297 license_token =
295 298
296 299 ; This flag hides sensitive information on the license page such as token, and license data
297 300 license.hide_license_info = false
298 301
299 302 ; supervisor connection uri, for managing supervisor and logs.
300 303 supervisor.uri =
301 304
302 305 ; supervisord group name/id we only want this RC instance to handle
303 306 supervisor.group_id = prod
304 307
305 308 ; Display extended labs settings
306 309 labs_settings_active = true
307 310
308 311 ; Custom exception store path, defaults to TMPDIR
309 312 ; This is used to store exception from RhodeCode in shared directory
310 313 #exception_tracker.store_path =
311 314
312 315 ; Send email with exception details when it happens
313 316 #exception_tracker.send_email = false
314 317
315 318 ; Comma separated list of recipients for exception emails,
316 319 ; e.g admin@rhodecode.com,devops@rhodecode.com
317 320 ; Can be left empty, then emails will be sent to ALL super-admins
318 321 #exception_tracker.send_email_recipients =
319 322
320 323 ; optional prefix to Add to email Subject
321 324 #exception_tracker.email_prefix = [RHODECODE ERROR]
322 325
323 326 ; File store configuration. This is used to store and serve uploaded files
324 327 file_store.enabled = true
325 328
326 329 ; Storage backend, available options are: local
327 330 file_store.backend = local
328 331
329 332 ; path to store the uploaded binaries
330 333 file_store.storage_path = %(here)s/data/file_store
331 334
332 335
333 336 ; #############
334 337 ; CELERY CONFIG
335 338 ; #############
336 339
337 340 ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini
338 341
339 342 use_celery = false
340 343
341 344 ; path to store schedule database
342 345 #celerybeat-schedule.path =
343 346
344 347 ; connection url to the message broker (default redis)
345 348 celery.broker_url = redis://localhost:6379/8
346 349
347 350 ; rabbitmq example
348 351 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
349 352
350 353 ; maximum tasks to execute before worker restart
351 354 celery.max_tasks_per_child = 20
352 355
353 356 ; tasks will never be sent to the queue, but executed locally instead.
354 357 celery.task_always_eager = false
355 358
356 359 ; #############
357 360 ; DOGPILE CACHE
358 361 ; #############
359 362
360 363 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
361 364 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
362 365 cache_dir = %(here)s/data
363 366
364 367 ; *********************************************
365 368 ; `sql_cache_short` cache for heavy SQL queries
366 369 ; Only supported backend is `memory_lru`
367 370 ; *********************************************
368 371 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
369 372 rc_cache.sql_cache_short.expiration_time = 30
370 373
371 374
372 375 ; *****************************************************
373 376 ; `cache_repo_longterm` cache for repo object instances
374 377 ; Only supported backend is `memory_lru`
375 378 ; *****************************************************
376 379 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
377 380 ; by default we use 30 Days, cache is still invalidated on push
378 381 rc_cache.cache_repo_longterm.expiration_time = 2592000
379 382 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
380 383 rc_cache.cache_repo_longterm.max_size = 10000
381 384
382 385
383 386 ; *********************************************
384 387 ; `cache_general` cache for general purpose use
385 388 ; for simplicity use rc.file_namespace backend,
386 389 ; for performance and scale use rc.redis
387 390 ; *********************************************
388 391 rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace
389 392 rc_cache.cache_general.expiration_time = 43200
390 393 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
391 394 #rc_cache.cache_general.arguments.filename = /tmp/cache_general.db
392 395
393 396 ; alternative `cache_general` redis backend with distributed lock
394 397 #rc_cache.cache_general.backend = dogpile.cache.rc.redis
395 398 #rc_cache.cache_general.expiration_time = 300
396 399
397 400 ; redis_expiration_time needs to be greater then expiration_time
398 401 #rc_cache.cache_general.arguments.redis_expiration_time = 7200
399 402
400 403 #rc_cache.cache_general.arguments.host = localhost
401 404 #rc_cache.cache_general.arguments.port = 6379
402 405 #rc_cache.cache_general.arguments.db = 0
403 406 #rc_cache.cache_general.arguments.socket_timeout = 30
404 407 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
405 408 #rc_cache.cache_general.arguments.distributed_lock = true
406 409
407 410 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
408 411 #rc_cache.cache_general.arguments.lock_auto_renewal = true
409 412
410 413 ; *************************************************
411 414 ; `cache_perms` cache for permission tree, auth TTL
412 415 ; for simplicity use rc.file_namespace backend,
413 416 ; for performance and scale use rc.redis
414 417 ; *************************************************
415 418 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
416 419 rc_cache.cache_perms.expiration_time = 3600
417 420 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
418 421 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
419 422
420 423 ; alternative `cache_perms` redis backend with distributed lock
421 424 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
422 425 #rc_cache.cache_perms.expiration_time = 300
423 426
424 427 ; redis_expiration_time needs to be greater then expiration_time
425 428 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
426 429
427 430 #rc_cache.cache_perms.arguments.host = localhost
428 431 #rc_cache.cache_perms.arguments.port = 6379
429 432 #rc_cache.cache_perms.arguments.db = 0
430 433 #rc_cache.cache_perms.arguments.socket_timeout = 30
431 434 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
432 435 #rc_cache.cache_perms.arguments.distributed_lock = true
433 436
434 437 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
435 438 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
436 439
437 440 ; ***************************************************
438 441 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
439 442 ; for simplicity use rc.file_namespace backend,
440 443 ; for performance and scale use rc.redis
441 444 ; ***************************************************
442 445 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
443 446 rc_cache.cache_repo.expiration_time = 2592000
444 447 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
445 448 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
446 449
447 450 ; alternative `cache_repo` redis backend with distributed lock
448 451 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
449 452 #rc_cache.cache_repo.expiration_time = 2592000
450 453
451 454 ; redis_expiration_time needs to be greater then expiration_time
452 455 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
453 456
454 457 #rc_cache.cache_repo.arguments.host = localhost
455 458 #rc_cache.cache_repo.arguments.port = 6379
456 459 #rc_cache.cache_repo.arguments.db = 1
457 460 #rc_cache.cache_repo.arguments.socket_timeout = 30
458 461 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
459 462 #rc_cache.cache_repo.arguments.distributed_lock = true
460 463
461 464 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
462 465 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
463 466
464 467 ; ##############
465 468 ; BEAKER SESSION
466 469 ; ##############
467 470
468 471 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
469 472 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
470 473 ; Fastest ones are Redis and ext:database
471 474 beaker.session.type = file
472 475 beaker.session.data_dir = %(here)s/data/sessions
473 476
474 477 ; Redis based sessions
475 478 #beaker.session.type = ext:redis
476 479 #beaker.session.url = redis://127.0.0.1:6379/2
477 480
478 481 ; DB based session, fast, and allows easy management over logged in users
479 482 #beaker.session.type = ext:database
480 483 #beaker.session.table_name = db_session
481 484 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
482 485 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
483 486 #beaker.session.sa.pool_recycle = 3600
484 487 #beaker.session.sa.echo = false
485 488
486 489 beaker.session.key = rhodecode
487 490 beaker.session.secret = production-rc-uytcxaz
488 491 beaker.session.lock_dir = %(here)s/data/sessions/lock
489 492
490 493 ; Secure encrypted cookie. Requires AES and AES python libraries
491 494 ; you must disable beaker.session.secret to use this
492 495 #beaker.session.encrypt_key = key_for_encryption
493 496 #beaker.session.validate_key = validation_key
494 497
495 498 ; Sets session as invalid (also logging out user) if it haven not been
496 499 ; accessed for given amount of time in seconds
497 500 beaker.session.timeout = 2592000
498 501 beaker.session.httponly = true
499 502
500 503 ; Path to use for the cookie. Set to prefix if you use prefix middleware
501 504 #beaker.session.cookie_path = /custom_prefix
502 505
503 506 ; Set https secure cookie
504 507 beaker.session.secure = false
505 508
506 509 ; default cookie expiration time in seconds, set to `true` to set expire
507 510 ; at browser close
508 511 #beaker.session.cookie_expires = 3600
509 512
510 513 ; #############################
511 514 ; SEARCH INDEXING CONFIGURATION
512 515 ; #############################
513 516
514 517 ; Full text search indexer is available in rhodecode-tools under
515 518 ; `rhodecode-tools index` command
516 519
517 520 ; WHOOSH Backend, doesn't require additional services to run
518 521 ; it works good with few dozen repos
519 522 search.module = rhodecode.lib.index.whoosh
520 523 search.location = %(here)s/data/index
521 524
522 525 ; ####################
523 526 ; CHANNELSTREAM CONFIG
524 527 ; ####################
525 528
526 529 ; channelstream enables persistent connections and live notification
527 530 ; in the system. It's also used by the chat system
528 531
529 532 channelstream.enabled = false
530 533
531 534 ; server address for channelstream server on the backend
532 535 channelstream.server = 127.0.0.1:9800
533 536
534 537 ; location of the channelstream server from outside world
535 538 ; use ws:// for http or wss:// for https. This address needs to be handled
536 539 ; by external HTTP server such as Nginx or Apache
537 540 ; see Nginx/Apache configuration examples in our docs
538 541 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
539 542 channelstream.secret = secret
540 543 channelstream.history.location = %(here)s/channelstream_history
541 544
542 545 ; Internal application path that Javascript uses to connect into.
543 546 ; If you use proxy-prefix the prefix should be added before /_channelstream
544 547 channelstream.proxy_path = /_channelstream
545 548
546 549
547 550 ; ##############################
548 551 ; MAIN RHODECODE DATABASE CONFIG
549 552 ; ##############################
550 553
551 554 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
552 555 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
553 556 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
554 557 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
555 558 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
556 559
557 560 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
558 561
559 562 ; see sqlalchemy docs for other advanced settings
560 563 ; print the sql statements to output
561 564 sqlalchemy.db1.echo = false
562 565
563 566 ; recycle the connections after this amount of seconds
564 567 sqlalchemy.db1.pool_recycle = 3600
565 568 sqlalchemy.db1.convert_unicode = true
566 569
567 570 ; the number of connections to keep open inside the connection pool.
568 571 ; 0 indicates no limit
569 572 #sqlalchemy.db1.pool_size = 5
570 573
571 574 ; The number of connections to allow in connection pool "overflow", that is
572 575 ; connections that can be opened above and beyond the pool_size setting,
573 576 ; which defaults to five.
574 577 #sqlalchemy.db1.max_overflow = 10
575 578
576 579 ; Connection check ping, used to detect broken database connections
577 580 ; could be enabled to better handle cases if MySQL has gone away errors
578 581 #sqlalchemy.db1.ping_connection = true
579 582
580 583 ; ##########
581 584 ; VCS CONFIG
582 585 ; ##########
583 586 vcs.server.enable = true
584 587 vcs.server = localhost:9900
585 588
586 589 ; Web server connectivity protocol, responsible for web based VCS operations
587 590 ; Available protocols are:
588 591 ; `http` - use http-rpc backend (default)
589 592 vcs.server.protocol = http
590 593
591 594 ; Push/Pull operations protocol, available options are:
592 595 ; `http` - use http-rpc backend (default)
593 596 vcs.scm_app_implementation = http
594 597
595 598 ; Push/Pull operations hooks protocol, available options are:
596 599 ; `http` - use http-rpc backend (default)
597 600 vcs.hooks.protocol = http
598 601
599 602 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
600 603 ; accessible via network.
601 604 ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker)
602 605 vcs.hooks.host = *
603 606
604 607 ; Start VCSServer with this instance as a subprocess, useful for development
605 608 vcs.start_server = false
606 609
607 610 ; List of enabled VCS backends, available options are:
608 611 ; `hg` - mercurial
609 612 ; `git` - git
610 613 ; `svn` - subversion
611 614 vcs.backends = hg, git, svn
612 615
613 616 ; Wait this number of seconds before killing connection to the vcsserver
614 617 vcs.connection_timeout = 3600
615 618
616 619 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
617 620 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
618 621 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
619 622 #vcs.svn.compatible_version = 1.8
620 623
621 624 ; Cache flag to cache vcsserver remote calls locally
622 625 ; It uses cache_region `cache_repo`
623 626 vcs.methods.cache = true
624 627
625 628 ; ####################################################
626 629 ; Subversion proxy support (mod_dav_svn)
627 630 ; Maps RhodeCode repo groups into SVN paths for Apache
628 631 ; ####################################################
629 632
630 633 ; Enable or disable the config file generation.
631 634 svn.proxy.generate_config = false
632 635
633 636 ; Generate config file with `SVNListParentPath` set to `On`.
634 637 svn.proxy.list_parent_path = true
635 638
636 639 ; Set location and file name of generated config file.
637 640 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
638 641
639 642 ; alternative mod_dav config template. This needs to be a valid mako template
640 643 ; Example template can be found in the source code:
641 644 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
642 645 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
643 646
644 647 ; Used as a prefix to the `Location` block in the generated config file.
645 648 ; In most cases it should be set to `/`.
646 649 svn.proxy.location_root = /
647 650
648 651 ; Command to reload the mod dav svn configuration on change.
649 652 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
650 653 ; Make sure user who runs RhodeCode process is allowed to reload Apache
651 654 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
652 655
653 656 ; If the timeout expires before the reload command finishes, the command will
654 657 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
655 658 #svn.proxy.reload_timeout = 10
656 659
657 660 ; ####################
658 661 ; SSH Support Settings
659 662 ; ####################
660 663
661 664 ; Defines if a custom authorized_keys file should be created and written on
662 665 ; any change user ssh keys. Setting this to false also disables possibility
663 666 ; of adding SSH keys by users from web interface. Super admins can still
664 667 ; manage SSH Keys.
665 668 ssh.generate_authorized_keyfile = false
666 669
667 670 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
668 671 # ssh.authorized_keys_ssh_opts =
669 672
670 673 ; Path to the authorized_keys file where the generate entries are placed.
671 674 ; It is possible to have multiple key files specified in `sshd_config` e.g.
672 675 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
673 676 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
674 677
675 678 ; Command to execute the SSH wrapper. The binary is available in the
676 679 ; RhodeCode installation directory.
677 680 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
678 681 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
679 682
680 683 ; Allow shell when executing the ssh-wrapper command
681 684 ssh.wrapper_cmd_allow_shell = false
682 685
683 686 ; Enables logging, and detailed output send back to the client during SSH
684 687 ; operations. Useful for debugging, shouldn't be used in production.
685 688 ssh.enable_debug_logging = false
686 689
687 690 ; Paths to binary executable, by default they are the names, but we can
688 691 ; override them if we want to use a custom one
689 692 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
690 693 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
691 694 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
692 695
693 696 ; Enables SSH key generator web interface. Disabling this still allows users
694 697 ; to add their own keys.
695 698 ssh.enable_ui_key_generator = true
696 699
697 700
698 701 ; #################
699 702 ; APPENLIGHT CONFIG
700 703 ; #################
701 704
702 705 ; Appenlight is tailored to work with RhodeCode, see
703 706 ; http://appenlight.rhodecode.com for details how to obtain an account
704 707
705 708 ; Appenlight integration enabled
706 709 #appenlight = false
707 710
708 711 #appenlight.server_url = https://api.appenlight.com
709 712 #appenlight.api_key = YOUR_API_KEY
710 713 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
711 714
712 715 ; used for JS client
713 716 #appenlight.api_public_key = YOUR_API_PUBLIC_KEY
714 717
715 718 ; TWEAK AMOUNT OF INFO SENT HERE
716 719
717 720 ; enables 404 error logging (default False)
718 721 #appenlight.report_404 = false
719 722
720 723 ; time in seconds after request is considered being slow (default 1)
721 724 #appenlight.slow_request_time = 1
722 725
723 726 ; record slow requests in application
724 727 ; (needs to be enabled for slow datastore recording and time tracking)
725 728 #appenlight.slow_requests = true
726 729
727 730 ; enable hooking to application loggers
728 731 #appenlight.logging = true
729 732
730 733 ; minimum log level for log capture
731 734 #ppenlight.logging.level = WARNING
732 735
733 736 ; send logs only from erroneous/slow requests
734 737 ; (saves API quota for intensive logging)
735 738 #appenlight.logging_on_error = false
736 739
737 740 ; list of additional keywords that should be grabbed from environ object
738 741 ; can be string with comma separated list of words in lowercase
739 742 ; (by default client will always send following info:
740 743 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
741 744 ; start with HTTP* this list be extended with additional keywords here
742 745 #appenlight.environ_keys_whitelist =
743 746
744 747 ; list of keywords that should be blanked from request object
745 748 ; can be string with comma separated list of words in lowercase
746 749 ; (by default client will always blank keys that contain following words
747 750 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
748 751 ; this list be extended with additional keywords set here
749 752 #appenlight.request_keys_blacklist =
750 753
751 754 ; list of namespaces that should be ignores when gathering log entries
752 755 ; can be string with comma separated list of namespaces
753 756 ; (by default the client ignores own entries: appenlight_client.client)
754 757 #appenlight.log_namespace_blacklist =
755 758
756 759 ; Statsd client config, this is used to send metrics to statsd
757 760 ; We recommend setting statsd_exported and scrape them using Prometheus
758 761 #statsd.enabled = false
759 762 #statsd.statsd_host = 0.0.0.0
760 763 #statsd.statsd_port = 8125
761 764 #statsd.statsd_prefix =
762 765 #statsd.statsd_ipv6 = false
763 766
764 767 ; configure logging automatically at server startup set to false
765 768 ; to use the below custom logging config.
766 769 ; RC_LOGGING_FORMATTER
767 770 ; RC_LOGGING_LEVEL
768 771 ; env variables can control the settings for logging in case of autoconfigure
769 772
770 773 #logging.autoconfigure = true
771 774
772 775 ; specify your own custom logging config file to configure logging
773 776 #logging.logging_conf_file = /path/to/custom_logging.ini
774 777
775 778 ; Dummy marker to add new entries after.
776 779 ; Add any custom entries below. Please don't remove this marker.
777 780 custom.conf = 1
778 781
779 782
780 783 ; #####################
781 784 ; LOGGING CONFIGURATION
782 785 ; #####################
783 786
784 787 [loggers]
785 788 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
786 789
787 790 [handlers]
788 791 keys = console, console_sql
789 792
790 793 [formatters]
791 794 keys = generic, json, color_formatter, color_formatter_sql
792 795
793 796 ; #######
794 797 ; LOGGERS
795 798 ; #######
796 799 [logger_root]
797 800 level = NOTSET
798 801 handlers = console
799 802
800 803 [logger_sqlalchemy]
801 804 level = INFO
802 805 handlers = console_sql
803 806 qualname = sqlalchemy.engine
804 807 propagate = 0
805 808
806 809 [logger_beaker]
807 810 level = DEBUG
808 811 handlers =
809 812 qualname = beaker.container
810 813 propagate = 1
811 814
812 815 [logger_rhodecode]
813 816 level = DEBUG
814 817 handlers =
815 818 qualname = rhodecode
816 819 propagate = 1
817 820
818 821 [logger_ssh_wrapper]
819 822 level = DEBUG
820 823 handlers =
821 824 qualname = ssh_wrapper
822 825 propagate = 1
823 826
824 827 [logger_celery]
825 828 level = DEBUG
826 829 handlers =
827 830 qualname = celery
828 831
829 832
830 833 ; ########
831 834 ; HANDLERS
832 835 ; ########
833 836
834 837 [handler_console]
835 838 class = StreamHandler
836 839 args = (sys.stderr, )
837 840 level = INFO
838 841 ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json'
839 842 ; This allows sending properly formatted logs to grafana loki or elasticsearch
840 843 formatter = generic
841 844
842 845 [handler_console_sql]
843 846 ; "level = DEBUG" logs SQL queries and results.
844 847 ; "level = INFO" logs SQL queries.
845 848 ; "level = WARN" logs neither. (Recommended for production systems.)
846 849 class = StreamHandler
847 850 args = (sys.stderr, )
848 851 level = WARN
849 852 ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json'
850 853 ; This allows sending properly formatted logs to grafana loki or elasticsearch
851 854 formatter = generic
852 855
853 856 ; ##########
854 857 ; FORMATTERS
855 858 ; ##########
856 859
857 860 [formatter_generic]
858 861 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
859 862 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
860 863 datefmt = %Y-%m-%d %H:%M:%S
861 864
862 865 [formatter_color_formatter]
863 866 class = rhodecode.lib.logging_formatter.ColorFormatter
864 867 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
865 868 datefmt = %Y-%m-%d %H:%M:%S
866 869
867 870 [formatter_color_formatter_sql]
868 871 class = rhodecode.lib.logging_formatter.ColorFormatterSql
869 872 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
870 873 datefmt = %Y-%m-%d %H:%M:%S
871 874
872 875 [formatter_json]
873 876 format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s
874 877 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter
General Comments 0
You need to be logged in to leave comments. Login now