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