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