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