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