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