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