##// END OF EJS Templates
configs: added changed require to track logging with loki or logstash
super-admin -
r4819:0f88a70e default
parent child Browse files
Show More
@@ -1,853 +1,865 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 ; In addition ENVIRONMENT variables usage is possible, e.g
146 ; In addition ENVIRONMENT variables usage is possible, e.g
147 ; sqlalchemy.db1.url = {ENV_RC_DB_URL}
147 ; sqlalchemy.db1.url = {ENV_RC_DB_URL}
148
148
149 use = egg:rhodecode-enterprise-ce
149 use = egg:rhodecode-enterprise-ce
150
150
151 ; enable proxy prefix middleware, defined above
151 ; enable proxy prefix middleware, defined above
152 #filter-with = proxy-prefix
152 #filter-with = proxy-prefix
153
153
154 ; #############
154 ; #############
155 ; DEBUG OPTIONS
155 ; DEBUG OPTIONS
156 ; #############
156 ; #############
157
157
158 pyramid.reload_templates = true
158 pyramid.reload_templates = true
159
159
160 # During development the we want to have the debug toolbar enabled
160 # During development the we want to have the debug toolbar enabled
161 pyramid.includes =
161 pyramid.includes =
162 pyramid_debugtoolbar
162 pyramid_debugtoolbar
163
163
164 debugtoolbar.hosts = 0.0.0.0/0
164 debugtoolbar.hosts = 0.0.0.0/0
165 debugtoolbar.exclude_prefixes =
165 debugtoolbar.exclude_prefixes =
166 /css
166 /css
167 /fonts
167 /fonts
168 /images
168 /images
169 /js
169 /js
170
170
171 ## RHODECODE PLUGINS ##
171 ## RHODECODE PLUGINS ##
172 rhodecode.includes =
172 rhodecode.includes =
173 rhodecode.api
173 rhodecode.api
174
174
175
175
176 # api prefix url
176 # api prefix url
177 rhodecode.api.url = /_admin/api
177 rhodecode.api.url = /_admin/api
178
178
179 ; enable debug style page
179 ; enable debug style page
180 debug_style = true
180 debug_style = true
181
181
182 ; #################
182 ; #################
183 ; END DEBUG OPTIONS
183 ; END DEBUG OPTIONS
184 ; #################
184 ; #################
185
185
186 ; encryption key used to encrypt social plugin tokens,
186 ; encryption key used to encrypt social plugin tokens,
187 ; remote_urls with credentials etc, if not set it defaults to
187 ; remote_urls with credentials etc, if not set it defaults to
188 ; `beaker.session.secret`
188 ; `beaker.session.secret`
189 #rhodecode.encrypted_values.secret =
189 #rhodecode.encrypted_values.secret =
190
190
191 ; decryption strict mode (enabled by default). It controls if decryption raises
191 ; decryption strict mode (enabled by default). It controls if decryption raises
192 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
192 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
193 #rhodecode.encrypted_values.strict = false
193 #rhodecode.encrypted_values.strict = false
194
194
195 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
195 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
196 ; fernet is safer, and we strongly recommend switching to it.
196 ; fernet is safer, and we strongly recommend switching to it.
197 ; Due to backward compatibility aes is used as default.
197 ; Due to backward compatibility aes is used as default.
198 #rhodecode.encrypted_values.algorithm = fernet
198 #rhodecode.encrypted_values.algorithm = fernet
199
199
200 ; Return gzipped responses from RhodeCode (static files/application)
200 ; Return gzipped responses from RhodeCode (static files/application)
201 gzip_responses = false
201 gzip_responses = false
202
202
203 ; Auto-generate javascript routes file on startup
203 ; Auto-generate javascript routes file on startup
204 generate_js_files = false
204 generate_js_files = false
205
205
206 ; System global default language.
206 ; System global default language.
207 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
207 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
208 lang = en
208 lang = en
209
209
210 ; Perform a full repository scan and import on each server start.
210 ; Perform a full repository scan and import on each server start.
211 ; Settings this to true could lead to very long startup time.
211 ; Settings this to true could lead to very long startup time.
212 startup.import_repos = false
212 startup.import_repos = false
213
213
214 ; Uncomment and set this path to use archive download cache.
214 ; Uncomment and set this path to use archive download cache.
215 ; Once enabled, generated archives will be cached at this location
215 ; Once enabled, generated archives will be cached at this location
216 ; and served from the cache during subsequent requests for the same archive of
216 ; and served from the cache during subsequent requests for the same archive of
217 ; the repository.
217 ; the repository.
218 #archive_cache_dir = /tmp/tarballcache
218 #archive_cache_dir = /tmp/tarballcache
219
219
220 ; URL at which the application is running. This is used for Bootstrapping
220 ; URL at which the application is running. This is used for Bootstrapping
221 ; requests in context when no web request is available. Used in ishell, or
221 ; requests in context when no web request is available. Used in ishell, or
222 ; SSH calls. Set this for events to receive proper url for SSH calls.
222 ; SSH calls. Set this for events to receive proper url for SSH calls.
223 app.base_url = http://rhodecode.local
223 app.base_url = http://rhodecode.local
224
224
225 ; Unique application ID. Should be a random unique string for security.
225 ; Unique application ID. Should be a random unique string for security.
226 app_instance_uuid = rc-production
226 app_instance_uuid = rc-production
227
227
228 ; Cut off limit for large diffs (size in bytes). If overall diff size on
228 ; Cut off limit for large diffs (size in bytes). If overall diff size on
229 ; commit, or pull request exceeds this limit this diff will be displayed
229 ; commit, or pull request exceeds this limit this diff will be displayed
230 ; partially. E.g 512000 == 512Kb
230 ; partially. E.g 512000 == 512Kb
231 cut_off_limit_diff = 512000
231 cut_off_limit_diff = 512000
232
232
233 ; Cut off limit for large files inside diffs (size in bytes). Each individual
233 ; Cut off limit for large files inside diffs (size in bytes). Each individual
234 ; file inside diff which exceeds this limit will be displayed partially.
234 ; file inside diff which exceeds this limit will be displayed partially.
235 ; E.g 128000 == 128Kb
235 ; E.g 128000 == 128Kb
236 cut_off_limit_file = 128000
236 cut_off_limit_file = 128000
237
237
238 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
238 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
239 vcs_full_cache = true
239 vcs_full_cache = true
240
240
241 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
241 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
242 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
242 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
243 force_https = false
243 force_https = false
244
244
245 ; use Strict-Transport-Security headers
245 ; use Strict-Transport-Security headers
246 use_htsts = false
246 use_htsts = false
247
247
248 ; Set to true if your repos are exposed using the dumb protocol
248 ; Set to true if your repos are exposed using the dumb protocol
249 git_update_server_info = false
249 git_update_server_info = false
250
250
251 ; RSS/ATOM feed options
251 ; RSS/ATOM feed options
252 rss_cut_off_limit = 256000
252 rss_cut_off_limit = 256000
253 rss_items_per_page = 10
253 rss_items_per_page = 10
254 rss_include_diff = false
254 rss_include_diff = false
255
255
256 ; gist URL alias, used to create nicer urls for gist. This should be an
256 ; gist URL alias, used to create nicer urls for gist. This should be an
257 ; url that does rewrites to _admin/gists/{gistid}.
257 ; url that does rewrites to _admin/gists/{gistid}.
258 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
258 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
259 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
259 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
260 gist_alias_url =
260 gist_alias_url =
261
261
262 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
262 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
263 ; used for access.
263 ; used for access.
264 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
264 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
265 ; came from the the logged in user who own this authentication token.
265 ; came from the the logged in user who own this authentication token.
266 ; Additionally @TOKEN syntax can be used to bound the view to specific
266 ; Additionally @TOKEN syntax can be used to bound the view to specific
267 ; authentication token. Such view would be only accessible when used together
267 ; authentication token. Such view would be only accessible when used together
268 ; with this authentication token
268 ; with this authentication token
269 ; list of all views can be found under `/_admin/permissions/auth_token_access`
269 ; list of all views can be found under `/_admin/permissions/auth_token_access`
270 ; The list should be "," separated and on a single line.
270 ; The list should be "," separated and on a single line.
271 ; Most common views to enable:
271 ; Most common views to enable:
272
272
273 # RepoCommitsView:repo_commit_download
273 # RepoCommitsView:repo_commit_download
274 # RepoCommitsView:repo_commit_patch
274 # RepoCommitsView:repo_commit_patch
275 # RepoCommitsView:repo_commit_raw
275 # RepoCommitsView:repo_commit_raw
276 # RepoCommitsView:repo_commit_raw@TOKEN
276 # RepoCommitsView:repo_commit_raw@TOKEN
277 # RepoFilesView:repo_files_diff
277 # RepoFilesView:repo_files_diff
278 # RepoFilesView:repo_archivefile
278 # RepoFilesView:repo_archivefile
279 # RepoFilesView:repo_file_raw
279 # RepoFilesView:repo_file_raw
280 # GistView:*
280 # GistView:*
281 api_access_controllers_whitelist =
281 api_access_controllers_whitelist =
282
282
283 ; Default encoding used to convert from and to unicode
283 ; Default encoding used to convert from and to unicode
284 ; can be also a comma separated list of encoding in case of mixed encodings
284 ; can be also a comma separated list of encoding in case of mixed encodings
285 default_encoding = UTF-8
285 default_encoding = UTF-8
286
286
287 ; instance-id prefix
287 ; instance-id prefix
288 ; a prefix key for this instance used for cache invalidation when running
288 ; a prefix key for this instance used for cache invalidation when running
289 ; multiple instances of RhodeCode, make sure it's globally unique for
289 ; multiple instances of RhodeCode, make sure it's globally unique for
290 ; all running RhodeCode instances. Leave empty if you don't use it
290 ; all running RhodeCode instances. Leave empty if you don't use it
291 instance_id =
291 instance_id =
292
292
293 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
293 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
294 ; of an authentication plugin also if it is disabled by it's settings.
294 ; of an authentication plugin also if it is disabled by it's settings.
295 ; This could be useful if you are unable to log in to the system due to broken
295 ; This could be useful if you are unable to log in to the system due to broken
296 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
296 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
297 ; module to log in again and fix the settings.
297 ; module to log in again and fix the settings.
298 ; Available builtin plugin IDs (hash is part of the ID):
298 ; Available builtin plugin IDs (hash is part of the ID):
299 ; egg:rhodecode-enterprise-ce#rhodecode
299 ; egg:rhodecode-enterprise-ce#rhodecode
300 ; egg:rhodecode-enterprise-ce#pam
300 ; egg:rhodecode-enterprise-ce#pam
301 ; egg:rhodecode-enterprise-ce#ldap
301 ; egg:rhodecode-enterprise-ce#ldap
302 ; egg:rhodecode-enterprise-ce#jasig_cas
302 ; egg:rhodecode-enterprise-ce#jasig_cas
303 ; egg:rhodecode-enterprise-ce#headers
303 ; egg:rhodecode-enterprise-ce#headers
304 ; egg:rhodecode-enterprise-ce#crowd
304 ; egg:rhodecode-enterprise-ce#crowd
305
305
306 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
306 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
307
307
308 ; Flag to control loading of legacy plugins in py:/path format
308 ; Flag to control loading of legacy plugins in py:/path format
309 auth_plugin.import_legacy_plugins = true
309 auth_plugin.import_legacy_plugins = true
310
310
311 ; alternative return HTTP header for failed authentication. Default HTTP
311 ; alternative return HTTP header for failed authentication. Default HTTP
312 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
312 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
313 ; handling that causing a series of failed authentication calls.
313 ; handling that causing a series of failed authentication calls.
314 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
314 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
315 ; This will be served instead of default 401 on bad authentication
315 ; This will be served instead of default 401 on bad authentication
316 auth_ret_code =
316 auth_ret_code =
317
317
318 ; use special detection method when serving auth_ret_code, instead of serving
318 ; use special detection method when serving auth_ret_code, instead of serving
319 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
319 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
320 ; and then serve auth_ret_code to clients
320 ; and then serve auth_ret_code to clients
321 auth_ret_code_detection = false
321 auth_ret_code_detection = false
322
322
323 ; locking return code. When repository is locked return this HTTP code. 2XX
323 ; locking return code. When repository is locked return this HTTP code. 2XX
324 ; codes don't break the transactions while 4XX codes do
324 ; codes don't break the transactions while 4XX codes do
325 lock_ret_code = 423
325 lock_ret_code = 423
326
326
327 ; allows to change the repository location in settings page
327 ; allows to change the repository location in settings page
328 allow_repo_location_change = true
328 allow_repo_location_change = true
329
329
330 ; allows to setup custom hooks in settings page
330 ; allows to setup custom hooks in settings page
331 allow_custom_hooks_settings = true
331 allow_custom_hooks_settings = true
332
332
333 ; Generated license token required for EE edition license.
333 ; Generated license token required for EE edition license.
334 ; New generated token value can be found in Admin > settings > license page.
334 ; New generated token value can be found in Admin > settings > license page.
335 license_token =
335 license_token =
336
336
337 ; This flag hides sensitive information on the license page such as token, and license data
337 ; This flag hides sensitive information on the license page such as token, and license data
338 license.hide_license_info = false
338 license.hide_license_info = false
339
339
340 ; supervisor connection uri, for managing supervisor and logs.
340 ; supervisor connection uri, for managing supervisor and logs.
341 supervisor.uri =
341 supervisor.uri =
342
342
343 ; supervisord group name/id we only want this RC instance to handle
343 ; supervisord group name/id we only want this RC instance to handle
344 supervisor.group_id = dev
344 supervisor.group_id = dev
345
345
346 ; Display extended labs settings
346 ; Display extended labs settings
347 labs_settings_active = true
347 labs_settings_active = true
348
348
349 ; Custom exception store path, defaults to TMPDIR
349 ; Custom exception store path, defaults to TMPDIR
350 ; This is used to store exception from RhodeCode in shared directory
350 ; This is used to store exception from RhodeCode in shared directory
351 #exception_tracker.store_path =
351 #exception_tracker.store_path =
352
352
353 ; Send email with exception details when it happens
353 ; Send email with exception details when it happens
354 #exception_tracker.send_email = false
354 #exception_tracker.send_email = false
355
355
356 ; Comma separated list of recipients for exception emails,
356 ; Comma separated list of recipients for exception emails,
357 ; e.g admin@rhodecode.com,devops@rhodecode.com
357 ; e.g admin@rhodecode.com,devops@rhodecode.com
358 ; Can be left empty, then emails will be sent to ALL super-admins
358 ; Can be left empty, then emails will be sent to ALL super-admins
359 #exception_tracker.send_email_recipients =
359 #exception_tracker.send_email_recipients =
360
360
361 ; optional prefix to Add to email Subject
361 ; optional prefix to Add to email Subject
362 #exception_tracker.email_prefix = [RHODECODE ERROR]
362 #exception_tracker.email_prefix = [RHODECODE ERROR]
363
363
364 ; File store configuration. This is used to store and serve uploaded files
364 ; File store configuration. This is used to store and serve uploaded files
365 file_store.enabled = true
365 file_store.enabled = true
366
366
367 ; Storage backend, available options are: local
367 ; Storage backend, available options are: local
368 file_store.backend = local
368 file_store.backend = local
369
369
370 ; path to store the uploaded binaries
370 ; path to store the uploaded binaries
371 file_store.storage_path = %(here)s/data/file_store
371 file_store.storage_path = %(here)s/data/file_store
372
372
373
373
374 ; #############
374 ; #############
375 ; CELERY CONFIG
375 ; CELERY CONFIG
376 ; #############
376 ; #############
377
377
378 ; 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
378 ; 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
379
379
380 use_celery = false
380 use_celery = false
381
381
382 ; connection url to the message broker (default redis)
382 ; connection url to the message broker (default redis)
383 celery.broker_url = redis://localhost:6379/8
383 celery.broker_url = redis://localhost:6379/8
384
384
385 ; rabbitmq example
385 ; rabbitmq example
386 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
386 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
387
387
388 ; maximum tasks to execute before worker restart
388 ; maximum tasks to execute before worker restart
389 celery.max_tasks_per_child = 100
389 celery.max_tasks_per_child = 100
390
390
391 ; tasks will never be sent to the queue, but executed locally instead.
391 ; tasks will never be sent to the queue, but executed locally instead.
392 celery.task_always_eager = false
392 celery.task_always_eager = false
393
393
394 ; #############
394 ; #############
395 ; DOGPILE CACHE
395 ; DOGPILE CACHE
396 ; #############
396 ; #############
397
397
398 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
398 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
399 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
399 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
400 cache_dir = %(here)s/data
400 cache_dir = %(here)s/data
401
401
402 ; *********************************************
402 ; *********************************************
403 ; `sql_cache_short` cache for heavy SQL queries
403 ; `sql_cache_short` cache for heavy SQL queries
404 ; Only supported backend is `memory_lru`
404 ; Only supported backend is `memory_lru`
405 ; *********************************************
405 ; *********************************************
406 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
406 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
407 rc_cache.sql_cache_short.expiration_time = 30
407 rc_cache.sql_cache_short.expiration_time = 30
408
408
409
409
410 ; *****************************************************
410 ; *****************************************************
411 ; `cache_repo_longterm` cache for repo object instances
411 ; `cache_repo_longterm` cache for repo object instances
412 ; Only supported backend is `memory_lru`
412 ; Only supported backend is `memory_lru`
413 ; *****************************************************
413 ; *****************************************************
414 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
414 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
415 ; by default we use 30 Days, cache is still invalidated on push
415 ; by default we use 30 Days, cache is still invalidated on push
416 rc_cache.cache_repo_longterm.expiration_time = 2592000
416 rc_cache.cache_repo_longterm.expiration_time = 2592000
417 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
417 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
418 rc_cache.cache_repo_longterm.max_size = 10000
418 rc_cache.cache_repo_longterm.max_size = 10000
419
419
420
420
421 ; *************************************************
421 ; *************************************************
422 ; `cache_perms` cache for permission tree, auth TTL
422 ; `cache_perms` cache for permission tree, auth TTL
423 ; *************************************************
423 ; *************************************************
424 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
424 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
425 rc_cache.cache_perms.expiration_time = 300
425 rc_cache.cache_perms.expiration_time = 300
426 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
426 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
427 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
427 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
428
428
429 ; alternative `cache_perms` redis backend with distributed lock
429 ; alternative `cache_perms` redis backend with distributed lock
430 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
430 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
431 #rc_cache.cache_perms.expiration_time = 300
431 #rc_cache.cache_perms.expiration_time = 300
432
432
433 ; redis_expiration_time needs to be greater then expiration_time
433 ; redis_expiration_time needs to be greater then expiration_time
434 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
434 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
435
435
436 #rc_cache.cache_perms.arguments.host = localhost
436 #rc_cache.cache_perms.arguments.host = localhost
437 #rc_cache.cache_perms.arguments.port = 6379
437 #rc_cache.cache_perms.arguments.port = 6379
438 #rc_cache.cache_perms.arguments.db = 0
438 #rc_cache.cache_perms.arguments.db = 0
439 #rc_cache.cache_perms.arguments.socket_timeout = 30
439 #rc_cache.cache_perms.arguments.socket_timeout = 30
440 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
440 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
441 #rc_cache.cache_perms.arguments.distributed_lock = true
441 #rc_cache.cache_perms.arguments.distributed_lock = true
442
442
443 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
444 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
443
445
444 ; ***************************************************
446 ; ***************************************************
445 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
447 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
446 ; ***************************************************
448 ; ***************************************************
447 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
449 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
448 rc_cache.cache_repo.expiration_time = 2592000
450 rc_cache.cache_repo.expiration_time = 2592000
449 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
451 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
450 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
452 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
451
453
452 ; alternative `cache_repo` redis backend with distributed lock
454 ; alternative `cache_repo` redis backend with distributed lock
453 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
455 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
454 #rc_cache.cache_repo.expiration_time = 2592000
456 #rc_cache.cache_repo.expiration_time = 2592000
455
457
456 ; redis_expiration_time needs to be greater then expiration_time
458 ; redis_expiration_time needs to be greater then expiration_time
457 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
459 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
458
460
459 #rc_cache.cache_repo.arguments.host = localhost
461 #rc_cache.cache_repo.arguments.host = localhost
460 #rc_cache.cache_repo.arguments.port = 6379
462 #rc_cache.cache_repo.arguments.port = 6379
461 #rc_cache.cache_repo.arguments.db = 1
463 #rc_cache.cache_repo.arguments.db = 1
462 #rc_cache.cache_repo.arguments.socket_timeout = 30
464 #rc_cache.cache_repo.arguments.socket_timeout = 30
463 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
465 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
464 #rc_cache.cache_repo.arguments.distributed_lock = true
466 #rc_cache.cache_repo.arguments.distributed_lock = true
465
467
468 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
469 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
466
470
467 ; ##############
471 ; ##############
468 ; BEAKER SESSION
472 ; BEAKER SESSION
469 ; ##############
473 ; ##############
470
474
471 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
475 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
472 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
476 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
473 ; Fastest ones are Redis and ext:database
477 ; Fastest ones are Redis and ext:database
474 beaker.session.type = file
478 beaker.session.type = file
475 beaker.session.data_dir = %(here)s/data/sessions
479 beaker.session.data_dir = %(here)s/data/sessions
476
480
477 ; Redis based sessions
481 ; Redis based sessions
478 #beaker.session.type = ext:redis
482 #beaker.session.type = ext:redis
479 #beaker.session.url = redis://127.0.0.1:6379/2
483 #beaker.session.url = redis://127.0.0.1:6379/2
480
484
481 ; DB based session, fast, and allows easy management over logged in users
485 ; DB based session, fast, and allows easy management over logged in users
482 #beaker.session.type = ext:database
486 #beaker.session.type = ext:database
483 #beaker.session.table_name = db_session
487 #beaker.session.table_name = db_session
484 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
488 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
485 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
489 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
486 #beaker.session.sa.pool_recycle = 3600
490 #beaker.session.sa.pool_recycle = 3600
487 #beaker.session.sa.echo = false
491 #beaker.session.sa.echo = false
488
492
489 beaker.session.key = rhodecode
493 beaker.session.key = rhodecode
490 beaker.session.secret = develop-rc-uytcxaz
494 beaker.session.secret = develop-rc-uytcxaz
491 beaker.session.lock_dir = %(here)s/data/sessions/lock
495 beaker.session.lock_dir = %(here)s/data/sessions/lock
492
496
493 ; Secure encrypted cookie. Requires AES and AES python libraries
497 ; Secure encrypted cookie. Requires AES and AES python libraries
494 ; you must disable beaker.session.secret to use this
498 ; you must disable beaker.session.secret to use this
495 #beaker.session.encrypt_key = key_for_encryption
499 #beaker.session.encrypt_key = key_for_encryption
496 #beaker.session.validate_key = validation_key
500 #beaker.session.validate_key = validation_key
497
501
498 ; Sets session as invalid (also logging out user) if it haven not been
502 ; Sets session as invalid (also logging out user) if it haven not been
499 ; accessed for given amount of time in seconds
503 ; accessed for given amount of time in seconds
500 beaker.session.timeout = 2592000
504 beaker.session.timeout = 2592000
501 beaker.session.httponly = true
505 beaker.session.httponly = true
502
506
503 ; Path to use for the cookie. Set to prefix if you use prefix middleware
507 ; Path to use for the cookie. Set to prefix if you use prefix middleware
504 #beaker.session.cookie_path = /custom_prefix
508 #beaker.session.cookie_path = /custom_prefix
505
509
506 ; Set https secure cookie
510 ; Set https secure cookie
507 beaker.session.secure = false
511 beaker.session.secure = false
508
512
509 ; default cookie expiration time in seconds, set to `true` to set expire
513 ; default cookie expiration time in seconds, set to `true` to set expire
510 ; at browser close
514 ; at browser close
511 #beaker.session.cookie_expires = 3600
515 #beaker.session.cookie_expires = 3600
512
516
513 ; #############################
517 ; #############################
514 ; SEARCH INDEXING CONFIGURATION
518 ; SEARCH INDEXING CONFIGURATION
515 ; #############################
519 ; #############################
516
520
517 ; Full text search indexer is available in rhodecode-tools under
521 ; Full text search indexer is available in rhodecode-tools under
518 ; `rhodecode-tools index` command
522 ; `rhodecode-tools index` command
519
523
520 ; WHOOSH Backend, doesn't require additional services to run
524 ; WHOOSH Backend, doesn't require additional services to run
521 ; it works good with few dozen repos
525 ; it works good with few dozen repos
522 search.module = rhodecode.lib.index.whoosh
526 search.module = rhodecode.lib.index.whoosh
523 search.location = %(here)s/data/index
527 search.location = %(here)s/data/index
524
528
525 ; ####################
529 ; ####################
526 ; CHANNELSTREAM CONFIG
530 ; CHANNELSTREAM CONFIG
527 ; ####################
531 ; ####################
528
532
529 ; channelstream enables persistent connections and live notification
533 ; channelstream enables persistent connections and live notification
530 ; in the system. It's also used by the chat system
534 ; in the system. It's also used by the chat system
531
535
532 channelstream.enabled = false
536 channelstream.enabled = false
533
537
534 ; server address for channelstream server on the backend
538 ; server address for channelstream server on the backend
535 channelstream.server = 127.0.0.1:9800
539 channelstream.server = 127.0.0.1:9800
536
540
537 ; location of the channelstream server from outside world
541 ; location of the channelstream server from outside world
538 ; use ws:// for http or wss:// for https. This address needs to be handled
542 ; use ws:// for http or wss:// for https. This address needs to be handled
539 ; by external HTTP server such as Nginx or Apache
543 ; by external HTTP server such as Nginx or Apache
540 ; see Nginx/Apache configuration examples in our docs
544 ; see Nginx/Apache configuration examples in our docs
541 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
545 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
542 channelstream.secret = secret
546 channelstream.secret = secret
543 channelstream.history.location = %(here)s/channelstream_history
547 channelstream.history.location = %(here)s/channelstream_history
544
548
545 ; Internal application path that Javascript uses to connect into.
549 ; Internal application path that Javascript uses to connect into.
546 ; If you use proxy-prefix the prefix should be added before /_channelstream
550 ; If you use proxy-prefix the prefix should be added before /_channelstream
547 channelstream.proxy_path = /_channelstream
551 channelstream.proxy_path = /_channelstream
548
552
549
553
550 ; ##############################
554 ; ##############################
551 ; MAIN RHODECODE DATABASE CONFIG
555 ; MAIN RHODECODE DATABASE CONFIG
552 ; ##############################
556 ; ##############################
553
557
554 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
558 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
555 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
559 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
556 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
560 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
557 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
561 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
558 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
562 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
559
563
560 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
564 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
561
565
562 ; see sqlalchemy docs for other advanced settings
566 ; see sqlalchemy docs for other advanced settings
563 ; print the sql statements to output
567 ; print the sql statements to output
564 sqlalchemy.db1.echo = false
568 sqlalchemy.db1.echo = false
565
569
566 ; recycle the connections after this amount of seconds
570 ; recycle the connections after this amount of seconds
567 sqlalchemy.db1.pool_recycle = 3600
571 sqlalchemy.db1.pool_recycle = 3600
568 sqlalchemy.db1.convert_unicode = true
572 sqlalchemy.db1.convert_unicode = true
569
573
570 ; the number of connections to keep open inside the connection pool.
574 ; the number of connections to keep open inside the connection pool.
571 ; 0 indicates no limit
575 ; 0 indicates no limit
572 #sqlalchemy.db1.pool_size = 5
576 #sqlalchemy.db1.pool_size = 5
573
577
574 ; The number of connections to allow in connection pool "overflow", that is
578 ; The number of connections to allow in connection pool "overflow", that is
575 ; connections that can be opened above and beyond the pool_size setting,
579 ; connections that can be opened above and beyond the pool_size setting,
576 ; which defaults to five.
580 ; which defaults to five.
577 #sqlalchemy.db1.max_overflow = 10
581 #sqlalchemy.db1.max_overflow = 10
578
582
579 ; Connection check ping, used to detect broken database connections
583 ; Connection check ping, used to detect broken database connections
580 ; could be enabled to better handle cases if MySQL has gone away errors
584 ; could be enabled to better handle cases if MySQL has gone away errors
581 #sqlalchemy.db1.ping_connection = true
585 #sqlalchemy.db1.ping_connection = true
582
586
583 ; ##########
587 ; ##########
584 ; VCS CONFIG
588 ; VCS CONFIG
585 ; ##########
589 ; ##########
586 vcs.server.enable = true
590 vcs.server.enable = true
587 vcs.server = localhost:9900
591 vcs.server = localhost:9900
588
592
589 ; Web server connectivity protocol, responsible for web based VCS operations
593 ; Web server connectivity protocol, responsible for web based VCS operations
590 ; Available protocols are:
594 ; Available protocols are:
591 ; `http` - use http-rpc backend (default)
595 ; `http` - use http-rpc backend (default)
592 vcs.server.protocol = http
596 vcs.server.protocol = http
593
597
594 ; Push/Pull operations protocol, available options are:
598 ; Push/Pull operations protocol, available options are:
595 ; `http` - use http-rpc backend (default)
599 ; `http` - use http-rpc backend (default)
596 vcs.scm_app_implementation = http
600 vcs.scm_app_implementation = http
597
601
598 ; Push/Pull operations hooks protocol, available options are:
602 ; Push/Pull operations hooks protocol, available options are:
599 ; `http` - use http-rpc backend (default)
603 ; `http` - use http-rpc backend (default)
600 vcs.hooks.protocol = http
604 vcs.hooks.protocol = http
601
605
602 ; Host on which this instance is listening for hooks. If vcsserver is in other location
606 ; Host on which this instance is listening for hooks. If vcsserver is in other location
603 ; this should be adjusted.
607 ; this should be adjusted.
604 vcs.hooks.host = 127.0.0.1
608 vcs.hooks.host = 127.0.0.1
605
609
606 ; Start VCSServer with this instance as a subprocess, useful for development
610 ; Start VCSServer with this instance as a subprocess, useful for development
607 vcs.start_server = false
611 vcs.start_server = false
608
612
609 ; List of enabled VCS backends, available options are:
613 ; List of enabled VCS backends, available options are:
610 ; `hg` - mercurial
614 ; `hg` - mercurial
611 ; `git` - git
615 ; `git` - git
612 ; `svn` - subversion
616 ; `svn` - subversion
613 vcs.backends = hg, git, svn
617 vcs.backends = hg, git, svn
614
618
615 ; Wait this number of seconds before killing connection to the vcsserver
619 ; Wait this number of seconds before killing connection to the vcsserver
616 vcs.connection_timeout = 3600
620 vcs.connection_timeout = 3600
617
621
618 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
622 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
619 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
623 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
620 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
624 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
621 #vcs.svn.compatible_version = 1.8
625 #vcs.svn.compatible_version = 1.8
622
626
623
627
624 ; ####################################################
628 ; ####################################################
625 ; Subversion proxy support (mod_dav_svn)
629 ; Subversion proxy support (mod_dav_svn)
626 ; Maps RhodeCode repo groups into SVN paths for Apache
630 ; Maps RhodeCode repo groups into SVN paths for Apache
627 ; ####################################################
631 ; ####################################################
628
632
629 ; Enable or disable the config file generation.
633 ; Enable or disable the config file generation.
630 svn.proxy.generate_config = false
634 svn.proxy.generate_config = false
631
635
632 ; Generate config file with `SVNListParentPath` set to `On`.
636 ; Generate config file with `SVNListParentPath` set to `On`.
633 svn.proxy.list_parent_path = true
637 svn.proxy.list_parent_path = true
634
638
635 ; Set location and file name of generated config file.
639 ; Set location and file name of generated config file.
636 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
640 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
637
641
638 ; alternative mod_dav config template. This needs to be a valid mako template
642 ; alternative mod_dav config template. This needs to be a valid mako template
639 ; Example template can be found in the source code:
643 ; Example template can be found in the source code:
640 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
644 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
641 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
645 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
642
646
643 ; Used as a prefix to the `Location` block in the generated config file.
647 ; Used as a prefix to the `Location` block in the generated config file.
644 ; In most cases it should be set to `/`.
648 ; In most cases it should be set to `/`.
645 svn.proxy.location_root = /
649 svn.proxy.location_root = /
646
650
647 ; Command to reload the mod dav svn configuration on change.
651 ; Command to reload the mod dav svn configuration on change.
648 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
652 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
649 ; Make sure user who runs RhodeCode process is allowed to reload Apache
653 ; Make sure user who runs RhodeCode process is allowed to reload Apache
650 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
654 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
651
655
652 ; If the timeout expires before the reload command finishes, the command will
656 ; If the timeout expires before the reload command finishes, the command will
653 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
657 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
654 #svn.proxy.reload_timeout = 10
658 #svn.proxy.reload_timeout = 10
655
659
656 ; ####################
660 ; ####################
657 ; SSH Support Settings
661 ; SSH Support Settings
658 ; ####################
662 ; ####################
659
663
660 ; Defines if a custom authorized_keys file should be created and written on
664 ; Defines if a custom authorized_keys file should be created and written on
661 ; any change user ssh keys. Setting this to false also disables possibility
665 ; any change user ssh keys. Setting this to false also disables possibility
662 ; of adding SSH keys by users from web interface. Super admins can still
666 ; of adding SSH keys by users from web interface. Super admins can still
663 ; manage SSH Keys.
667 ; manage SSH Keys.
664 ssh.generate_authorized_keyfile = false
668 ssh.generate_authorized_keyfile = false
665
669
666 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
670 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
667 # ssh.authorized_keys_ssh_opts =
671 # ssh.authorized_keys_ssh_opts =
668
672
669 ; Path to the authorized_keys file where the generate entries are placed.
673 ; Path to the authorized_keys file where the generate entries are placed.
670 ; It is possible to have multiple key files specified in `sshd_config` e.g.
674 ; It is possible to have multiple key files specified in `sshd_config` e.g.
671 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
675 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
672 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
676 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
673
677
674 ; Command to execute the SSH wrapper. The binary is available in the
678 ; Command to execute the SSH wrapper. The binary is available in the
675 ; RhodeCode installation directory.
679 ; RhodeCode installation directory.
676 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
680 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
677 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
681 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
678
682
679 ; Allow shell when executing the ssh-wrapper command
683 ; Allow shell when executing the ssh-wrapper command
680 ssh.wrapper_cmd_allow_shell = false
684 ssh.wrapper_cmd_allow_shell = false
681
685
682 ; Enables logging, and detailed output send back to the client during SSH
686 ; Enables logging, and detailed output send back to the client during SSH
683 ; operations. Useful for debugging, shouldn't be used in production.
687 ; operations. Useful for debugging, shouldn't be used in production.
684 ssh.enable_debug_logging = true
688 ssh.enable_debug_logging = true
685
689
686 ; Paths to binary executable, by default they are the names, but we can
690 ; Paths to binary executable, by default they are the names, but we can
687 ; override them if we want to use a custom one
691 ; override them if we want to use a custom one
688 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
692 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
689 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
693 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
690 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
694 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
691
695
692 ; Enables SSH key generator web interface. Disabling this still allows users
696 ; Enables SSH key generator web interface. Disabling this still allows users
693 ; to add their own keys.
697 ; to add their own keys.
694 ssh.enable_ui_key_generator = true
698 ssh.enable_ui_key_generator = true
695
699
696
700
697 ; #################
701 ; #################
698 ; APPENLIGHT CONFIG
702 ; APPENLIGHT CONFIG
699 ; #################
703 ; #################
700
704
701 ; Appenlight is tailored to work with RhodeCode, see
705 ; Appenlight is tailored to work with RhodeCode, see
702 ; http://appenlight.rhodecode.com for details how to obtain an account
706 ; http://appenlight.rhodecode.com for details how to obtain an account
703
707
704 ; Appenlight integration enabled
708 ; Appenlight integration enabled
705 appenlight = false
709 appenlight = false
706
710
707 appenlight.server_url = https://api.appenlight.com
711 appenlight.server_url = https://api.appenlight.com
708 appenlight.api_key = YOUR_API_KEY
712 appenlight.api_key = YOUR_API_KEY
709 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
713 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
710
714
711 ; used for JS client
715 ; used for JS client
712 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
716 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
713
717
714 ; TWEAK AMOUNT OF INFO SENT HERE
718 ; TWEAK AMOUNT OF INFO SENT HERE
715
719
716 ; enables 404 error logging (default False)
720 ; enables 404 error logging (default False)
717 appenlight.report_404 = false
721 appenlight.report_404 = false
718
722
719 ; time in seconds after request is considered being slow (default 1)
723 ; time in seconds after request is considered being slow (default 1)
720 appenlight.slow_request_time = 1
724 appenlight.slow_request_time = 1
721
725
722 ; record slow requests in application
726 ; record slow requests in application
723 ; (needs to be enabled for slow datastore recording and time tracking)
727 ; (needs to be enabled for slow datastore recording and time tracking)
724 appenlight.slow_requests = true
728 appenlight.slow_requests = true
725
729
726 ; enable hooking to application loggers
730 ; enable hooking to application loggers
727 appenlight.logging = true
731 appenlight.logging = true
728
732
729 ; minimum log level for log capture
733 ; minimum log level for log capture
730 appenlight.logging.level = WARNING
734 appenlight.logging.level = WARNING
731
735
732 ; send logs only from erroneous/slow requests
736 ; send logs only from erroneous/slow requests
733 ; (saves API quota for intensive logging)
737 ; (saves API quota for intensive logging)
734 appenlight.logging_on_error = false
738 appenlight.logging_on_error = false
735
739
736 ; list of additional keywords that should be grabbed from environ object
740 ; list of additional keywords that should be grabbed from environ object
737 ; can be string with comma separated list of words in lowercase
741 ; can be string with comma separated list of words in lowercase
738 ; (by default client will always send following info:
742 ; (by default client will always send following info:
739 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
743 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
740 ; start with HTTP* this list be extended with additional keywords here
744 ; start with HTTP* this list be extended with additional keywords here
741 appenlight.environ_keys_whitelist =
745 appenlight.environ_keys_whitelist =
742
746
743 ; list of keywords that should be blanked from request object
747 ; list of keywords that should be blanked from request object
744 ; can be string with comma separated list of words in lowercase
748 ; can be string with comma separated list of words in lowercase
745 ; (by default client will always blank keys that contain following words
749 ; (by default client will always blank keys that contain following words
746 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
750 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
747 ; this list be extended with additional keywords set here
751 ; this list be extended with additional keywords set here
748 appenlight.request_keys_blacklist =
752 appenlight.request_keys_blacklist =
749
753
750 ; list of namespaces that should be ignores when gathering log entries
754 ; list of namespaces that should be ignores when gathering log entries
751 ; can be string with comma separated list of namespaces
755 ; can be string with comma separated list of namespaces
752 ; (by default the client ignores own entries: appenlight_client.client)
756 ; (by default the client ignores own entries: appenlight_client.client)
753 appenlight.log_namespace_blacklist =
757 appenlight.log_namespace_blacklist =
754
758
755 ; Statsd client config, this is used to send metrics to statsd
759 ; Statsd client config, this is used to send metrics to statsd
756 ; We recommend setting statsd_exported and scrape them using Promethues
760 ; We recommend setting statsd_exported and scrape them using Promethues
757 #statsd.enabled = false
761 #statsd.enabled = false
758 #statsd.statsd_host = 0.0.0.0
762 #statsd.statsd_host = 0.0.0.0
759 #statsd.statsd_port = 8125
763 #statsd.statsd_port = 8125
760 #statsd.statsd_prefix =
764 #statsd.statsd_prefix =
761 #statsd.statsd_ipv6 = false
765 #statsd.statsd_ipv6 = false
762
766
767
763 ; Dummy marker to add new entries after.
768 ; Dummy marker to add new entries after.
764 ; Add any custom entries below. Please don't remove this marker.
769 ; Add any custom entries below. Please don't remove this marker.
765 custom.conf = 1
770 custom.conf = 1
766
771
767
772
768 ; #####################
773 ; #####################
769 ; LOGGING CONFIGURATION
774 ; LOGGING CONFIGURATION
770 ; #####################
775 ; #####################
771 [loggers]
776 [loggers]
772 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
777 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
773
778
774 [handlers]
779 [handlers]
775 keys = console, console_sql
780 keys = console, console_sql
776
781
777 [formatters]
782 [formatters]
778 keys = generic, color_formatter, color_formatter_sql
783 keys = generic, color_formatter, color_formatter_sql
779
784
780 ; #######
785 ; #######
781 ; LOGGERS
786 ; LOGGERS
782 ; #######
787 ; #######
783 [logger_root]
788 [logger_root]
784 level = NOTSET
789 level = NOTSET
785 handlers = console
790 handlers = console
786
791
787 [logger_sqlalchemy]
792 [logger_sqlalchemy]
788 level = INFO
793 level = INFO
789 handlers = console_sql
794 handlers = console_sql
790 qualname = sqlalchemy.engine
795 qualname = sqlalchemy.engine
791 propagate = 0
796 propagate = 0
792
797
793 [logger_beaker]
798 [logger_beaker]
794 level = DEBUG
799 level = DEBUG
795 handlers =
800 handlers =
796 qualname = beaker.container
801 qualname = beaker.container
797 propagate = 1
802 propagate = 1
798
803
799 [logger_rhodecode]
804 [logger_rhodecode]
800 level = DEBUG
805 level = DEBUG
801 handlers =
806 handlers =
802 qualname = rhodecode
807 qualname = rhodecode
803 propagate = 1
808 propagate = 1
804
809
805 [logger_ssh_wrapper]
810 [logger_ssh_wrapper]
806 level = DEBUG
811 level = DEBUG
807 handlers =
812 handlers =
808 qualname = ssh_wrapper
813 qualname = ssh_wrapper
809 propagate = 1
814 propagate = 1
810
815
811 [logger_celery]
816 [logger_celery]
812 level = DEBUG
817 level = DEBUG
813 handlers =
818 handlers =
814 qualname = celery
819 qualname = celery
815
820
816
821
817 ; ########
822 ; ########
818 ; HANDLERS
823 ; HANDLERS
819 ; ########
824 ; ########
820
825
821 [handler_console]
826 [handler_console]
822 class = StreamHandler
827 class = StreamHandler
823 args = (sys.stderr, )
828 args = (sys.stderr, )
824 level = DEBUG
829 level = DEBUG
825 formatter = color_formatter
830 formatter = color_formatter
831 ; To enable JSON formatted logs replace generic with json
832 ; This allows sending properly formatted logs to grafana loki or elasticsearch
833 #formatter = json
826
834
827 [handler_console_sql]
835 [handler_console_sql]
828 ; "level = DEBUG" logs SQL queries and results.
836 ; "level = DEBUG" logs SQL queries and results.
829 ; "level = INFO" logs SQL queries.
837 ; "level = INFO" logs SQL queries.
830 ; "level = WARN" logs neither. (Recommended for production systems.)
838 ; "level = WARN" logs neither. (Recommended for production systems.)
831 class = StreamHandler
839 class = StreamHandler
832 args = (sys.stderr, )
840 args = (sys.stderr, )
833 level = WARN
841 level = WARN
834 formatter = color_formatter_sql
842 formatter = color_formatter_sql
835
843
836 ; ##########
844 ; ##########
837 ; FORMATTERS
845 ; FORMATTERS
838 ; ##########
846 ; ##########
839
847
840 [formatter_generic]
848 [formatter_generic]
841 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
849 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
842 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
850 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
843 datefmt = %Y-%m-%d %H:%M:%S
851 datefmt = %Y-%m-%d %H:%M:%S
844
852
845 [formatter_color_formatter]
853 [formatter_color_formatter]
846 class = rhodecode.lib.logging_formatter.ColorFormatter
854 class = rhodecode.lib.logging_formatter.ColorFormatter
847 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
855 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
848 datefmt = %Y-%m-%d %H:%M:%S
856 datefmt = %Y-%m-%d %H:%M:%S
849
857
850 [formatter_color_formatter_sql]
858 [formatter_color_formatter_sql]
851 class = rhodecode.lib.logging_formatter.ColorFormatterSql
859 class = rhodecode.lib.logging_formatter.ColorFormatterSql
852 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
860 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
853 datefmt = %Y-%m-%d %H:%M:%S
861 datefmt = %Y-%m-%d %H:%M:%S
862
863 [formatter_json]
864 format = %(message)s
865 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter No newline at end of file
@@ -1,265 +1,269 b''
1 """
1 """
2 Gunicorn config extension and hooks. This config file adds some extra settings and memory management.
2 Gunicorn config extension and hooks. This config file adds some extra settings and memory management.
3 Gunicorn configuration should be managed by .ini files entries of RhodeCode or VCSServer
3 Gunicorn configuration should be managed by .ini files entries of RhodeCode or VCSServer
4 """
4 """
5
5
6 import gc
6 import gc
7 import os
7 import os
8 import sys
8 import sys
9 import math
9 import math
10 import time
10 import time
11 import threading
11 import threading
12 import traceback
12 import traceback
13 import random
13 import random
14 from gunicorn.glogging import Logger
14 from gunicorn.glogging import Logger
15
15
16
16
17 def get_workers():
17 def get_workers():
18 import multiprocessing
18 import multiprocessing
19 return multiprocessing.cpu_count() * 2 + 1
19 return multiprocessing.cpu_count() * 2 + 1
20
20
21 # GLOBAL
21 # GLOBAL
22 errorlog = '-'
22 errorlog = '-'
23 accesslog = '-'
23 accesslog = '-'
24
24
25
25
26 # SERVER MECHANICS
26 # SERVER MECHANICS
27 # None == system temp dir
27 # None == system temp dir
28 # worker_tmp_dir is recommended to be set to some tmpfs
28 # worker_tmp_dir is recommended to be set to some tmpfs
29 worker_tmp_dir = None
29 worker_tmp_dir = None
30 tmp_upload_dir = None
30 tmp_upload_dir = None
31
31
32 # Custom log format
32 # Custom log format
33 access_log_format = (
33 access_log_format = (
34 '%(t)s %(p)s INFO [GNCRN] %(h)-15s rqt:%(L)s %(s)s %(b)-6s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"')
34 '%(t)s %(p)s INFO [GNCRN] %(h)-15s rqt:%(L)s %(s)s %(b)-6s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"')
35
35
36 # loki format for easier parsing in grafana
37 #access_log_format = (
38 # 'time="%(t)s" pid=%(p)s level="INFO" type="[GNCRN]" ip="%(h)-15s" rqt="%(L)s" response_code="%(s)s" response_bytes="%(b)-6s" uri="%(m)s:%(U)s %(q)s" user=":%(u)s" user_agent="%(a)s"')
39
36 # self adjust workers based on CPU count
40 # self adjust workers based on CPU count
37 # workers = get_workers()
41 # workers = get_workers()
38
42
39
43
40 def _get_process_rss(pid=None):
44 def _get_process_rss(pid=None):
41 try:
45 try:
42 import psutil
46 import psutil
43 if pid:
47 if pid:
44 proc = psutil.Process(pid)
48 proc = psutil.Process(pid)
45 else:
49 else:
46 proc = psutil.Process()
50 proc = psutil.Process()
47 return proc.memory_info().rss
51 return proc.memory_info().rss
48 except Exception:
52 except Exception:
49 return None
53 return None
50
54
51
55
52 def _get_config(ini_path):
56 def _get_config(ini_path):
53
57
54 try:
58 try:
55 import configparser
59 import configparser
56 except ImportError:
60 except ImportError:
57 import ConfigParser as configparser
61 import ConfigParser as configparser
58 try:
62 try:
59 config = configparser.RawConfigParser()
63 config = configparser.RawConfigParser()
60 config.read(ini_path)
64 config.read(ini_path)
61 return config
65 return config
62 except Exception:
66 except Exception:
63 return None
67 return None
64
68
65
69
66 def _time_with_offset(memory_usage_check_interval):
70 def _time_with_offset(memory_usage_check_interval):
67 return time.time() - random.randint(0, memory_usage_check_interval/2.0)
71 return time.time() - random.randint(0, memory_usage_check_interval/2.0)
68
72
69
73
70 def pre_fork(server, worker):
74 def pre_fork(server, worker):
71 pass
75 pass
72
76
73
77
74 def post_fork(server, worker):
78 def post_fork(server, worker):
75
79
76 # memory spec defaults
80 # memory spec defaults
77 _memory_max_usage = 0
81 _memory_max_usage = 0
78 _memory_usage_check_interval = 60
82 _memory_usage_check_interval = 60
79 _memory_usage_recovery_threshold = 0.8
83 _memory_usage_recovery_threshold = 0.8
80
84
81 ini_path = os.path.abspath(server.cfg.paste)
85 ini_path = os.path.abspath(server.cfg.paste)
82 conf = _get_config(ini_path)
86 conf = _get_config(ini_path)
83
87
84 section = 'server:main'
88 section = 'server:main'
85 if conf and conf.has_section(section):
89 if conf and conf.has_section(section):
86
90
87 if conf.has_option(section, 'memory_max_usage'):
91 if conf.has_option(section, 'memory_max_usage'):
88 _memory_max_usage = conf.getint(section, 'memory_max_usage')
92 _memory_max_usage = conf.getint(section, 'memory_max_usage')
89
93
90 if conf.has_option(section, 'memory_usage_check_interval'):
94 if conf.has_option(section, 'memory_usage_check_interval'):
91 _memory_usage_check_interval = conf.getint(section, 'memory_usage_check_interval')
95 _memory_usage_check_interval = conf.getint(section, 'memory_usage_check_interval')
92
96
93 if conf.has_option(section, 'memory_usage_recovery_threshold'):
97 if conf.has_option(section, 'memory_usage_recovery_threshold'):
94 _memory_usage_recovery_threshold = conf.getfloat(section, 'memory_usage_recovery_threshold')
98 _memory_usage_recovery_threshold = conf.getfloat(section, 'memory_usage_recovery_threshold')
95
99
96 worker._memory_max_usage = _memory_max_usage
100 worker._memory_max_usage = _memory_max_usage
97 worker._memory_usage_check_interval = _memory_usage_check_interval
101 worker._memory_usage_check_interval = _memory_usage_check_interval
98 worker._memory_usage_recovery_threshold = _memory_usage_recovery_threshold
102 worker._memory_usage_recovery_threshold = _memory_usage_recovery_threshold
99
103
100 # register memory last check time, with some random offset so we don't recycle all
104 # register memory last check time, with some random offset so we don't recycle all
101 # at once
105 # at once
102 worker._last_memory_check_time = _time_with_offset(_memory_usage_check_interval)
106 worker._last_memory_check_time = _time_with_offset(_memory_usage_check_interval)
103
107
104 if _memory_max_usage:
108 if _memory_max_usage:
105 server.log.info("[%-10s] WORKER spawned with max memory set at %s", worker.pid,
109 server.log.info("[%-10s] WORKER spawned with max memory set at %s", worker.pid,
106 _format_data_size(_memory_max_usage))
110 _format_data_size(_memory_max_usage))
107 else:
111 else:
108 server.log.info("[%-10s] WORKER spawned", worker.pid)
112 server.log.info("[%-10s] WORKER spawned", worker.pid)
109
113
110
114
111 def pre_exec(server):
115 def pre_exec(server):
112 server.log.info("Forked child, re-executing.")
116 server.log.info("Forked child, re-executing.")
113
117
114
118
115 def on_starting(server):
119 def on_starting(server):
116 server_lbl = '{} {}'.format(server.proc_name, server.address)
120 server_lbl = '{} {}'.format(server.proc_name, server.address)
117 server.log.info("Server %s is starting.", server_lbl)
121 server.log.info("Server %s is starting.", server_lbl)
118
122
119
123
120 def when_ready(server):
124 def when_ready(server):
121 server.log.info("Server %s is ready. Spawning workers", server)
125 server.log.info("Server %s is ready. Spawning workers", server)
122
126
123
127
124 def on_reload(server):
128 def on_reload(server):
125 pass
129 pass
126
130
127
131
128 def _format_data_size(size, unit="B", precision=1, binary=True):
132 def _format_data_size(size, unit="B", precision=1, binary=True):
129 """Format a number using SI units (kilo, mega, etc.).
133 """Format a number using SI units (kilo, mega, etc.).
130
134
131 ``size``: The number as a float or int.
135 ``size``: The number as a float or int.
132
136
133 ``unit``: The unit name in plural form. Examples: "bytes", "B".
137 ``unit``: The unit name in plural form. Examples: "bytes", "B".
134
138
135 ``precision``: How many digits to the right of the decimal point. Default
139 ``precision``: How many digits to the right of the decimal point. Default
136 is 1. 0 suppresses the decimal point.
140 is 1. 0 suppresses the decimal point.
137
141
138 ``binary``: If false, use base-10 decimal prefixes (kilo = K = 1000).
142 ``binary``: If false, use base-10 decimal prefixes (kilo = K = 1000).
139 If true, use base-2 binary prefixes (kibi = Ki = 1024).
143 If true, use base-2 binary prefixes (kibi = Ki = 1024).
140
144
141 ``full_name``: If false (default), use the prefix abbreviation ("k" or
145 ``full_name``: If false (default), use the prefix abbreviation ("k" or
142 "Ki"). If true, use the full prefix ("kilo" or "kibi"). If false,
146 "Ki"). If true, use the full prefix ("kilo" or "kibi"). If false,
143 use abbreviation ("k" or "Ki").
147 use abbreviation ("k" or "Ki").
144
148
145 """
149 """
146
150
147 if not binary:
151 if not binary:
148 base = 1000
152 base = 1000
149 multiples = ('', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y')
153 multiples = ('', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y')
150 else:
154 else:
151 base = 1024
155 base = 1024
152 multiples = ('', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi')
156 multiples = ('', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi')
153
157
154 sign = ""
158 sign = ""
155 if size > 0:
159 if size > 0:
156 m = int(math.log(size, base))
160 m = int(math.log(size, base))
157 elif size < 0:
161 elif size < 0:
158 sign = "-"
162 sign = "-"
159 size = -size
163 size = -size
160 m = int(math.log(size, base))
164 m = int(math.log(size, base))
161 else:
165 else:
162 m = 0
166 m = 0
163 if m > 8:
167 if m > 8:
164 m = 8
168 m = 8
165
169
166 if m == 0:
170 if m == 0:
167 precision = '%.0f'
171 precision = '%.0f'
168 else:
172 else:
169 precision = '%%.%df' % precision
173 precision = '%%.%df' % precision
170
174
171 size = precision % (size / math.pow(base, m))
175 size = precision % (size / math.pow(base, m))
172
176
173 return '%s%s %s%s' % (sign, size.strip(), multiples[m], unit)
177 return '%s%s %s%s' % (sign, size.strip(), multiples[m], unit)
174
178
175
179
176 def _check_memory_usage(worker):
180 def _check_memory_usage(worker):
177 memory_max_usage = worker._memory_max_usage
181 memory_max_usage = worker._memory_max_usage
178 if not memory_max_usage:
182 if not memory_max_usage:
179 return
183 return
180
184
181 memory_usage_check_interval = worker._memory_usage_check_interval
185 memory_usage_check_interval = worker._memory_usage_check_interval
182 memory_usage_recovery_threshold = memory_max_usage * worker._memory_usage_recovery_threshold
186 memory_usage_recovery_threshold = memory_max_usage * worker._memory_usage_recovery_threshold
183
187
184 elapsed = time.time() - worker._last_memory_check_time
188 elapsed = time.time() - worker._last_memory_check_time
185 if elapsed > memory_usage_check_interval:
189 if elapsed > memory_usage_check_interval:
186 mem_usage = _get_process_rss()
190 mem_usage = _get_process_rss()
187 if mem_usage and mem_usage > memory_max_usage:
191 if mem_usage and mem_usage > memory_max_usage:
188 worker.log.info(
192 worker.log.info(
189 "memory usage %s > %s, forcing gc",
193 "memory usage %s > %s, forcing gc",
190 _format_data_size(mem_usage), _format_data_size(memory_max_usage))
194 _format_data_size(mem_usage), _format_data_size(memory_max_usage))
191 # Try to clean it up by forcing a full collection.
195 # Try to clean it up by forcing a full collection.
192 gc.collect()
196 gc.collect()
193 mem_usage = _get_process_rss()
197 mem_usage = _get_process_rss()
194 if mem_usage > memory_usage_recovery_threshold:
198 if mem_usage > memory_usage_recovery_threshold:
195 # Didn't clean up enough, we'll have to terminate.
199 # Didn't clean up enough, we'll have to terminate.
196 worker.log.warning(
200 worker.log.warning(
197 "memory usage %s > %s after gc, quitting",
201 "memory usage %s > %s after gc, quitting",
198 _format_data_size(mem_usage), _format_data_size(memory_max_usage))
202 _format_data_size(mem_usage), _format_data_size(memory_max_usage))
199 # This will cause worker to auto-restart itself
203 # This will cause worker to auto-restart itself
200 worker.alive = False
204 worker.alive = False
201 worker._last_memory_check_time = time.time()
205 worker._last_memory_check_time = time.time()
202
206
203
207
204 def worker_int(worker):
208 def worker_int(worker):
205 worker.log.info("[%-10s] worker received INT or QUIT signal", worker.pid)
209 worker.log.info("[%-10s] worker received INT or QUIT signal", worker.pid)
206
210
207 # get traceback info, on worker crash
211 # get traceback info, on worker crash
208 id2name = dict([(th.ident, th.name) for th in threading.enumerate()])
212 id2name = dict([(th.ident, th.name) for th in threading.enumerate()])
209 code = []
213 code = []
210 for thread_id, stack in sys._current_frames().items():
214 for thread_id, stack in sys._current_frames().items():
211 code.append(
215 code.append(
212 "\n# Thread: %s(%d)" % (id2name.get(thread_id, ""), thread_id))
216 "\n# Thread: %s(%d)" % (id2name.get(thread_id, ""), thread_id))
213 for fname, lineno, name, line in traceback.extract_stack(stack):
217 for fname, lineno, name, line in traceback.extract_stack(stack):
214 code.append('File: "%s", line %d, in %s' % (fname, lineno, name))
218 code.append('File: "%s", line %d, in %s' % (fname, lineno, name))
215 if line:
219 if line:
216 code.append(" %s" % (line.strip()))
220 code.append(" %s" % (line.strip()))
217 worker.log.debug("\n".join(code))
221 worker.log.debug("\n".join(code))
218
222
219
223
220 def worker_abort(worker):
224 def worker_abort(worker):
221 worker.log.info("[%-10s] worker received SIGABRT signal", worker.pid)
225 worker.log.info("[%-10s] worker received SIGABRT signal", worker.pid)
222
226
223
227
224 def worker_exit(server, worker):
228 def worker_exit(server, worker):
225 worker.log.info("[%-10s] worker exit", worker.pid)
229 worker.log.info("[%-10s] worker exit", worker.pid)
226
230
227
231
228 def child_exit(server, worker):
232 def child_exit(server, worker):
229 worker.log.info("[%-10s] worker child exit", worker.pid)
233 worker.log.info("[%-10s] worker child exit", worker.pid)
230
234
231
235
232 def pre_request(worker, req):
236 def pre_request(worker, req):
233 worker.start_time = time.time()
237 worker.start_time = time.time()
234 worker.log.debug(
238 worker.log.debug(
235 "GNCRN PRE WORKER [cnt:%s]: %s %s", worker.nr, req.method, req.path)
239 "GNCRN PRE WORKER [cnt:%s]: %s %s", worker.nr, req.method, req.path)
236
240
237
241
238 def post_request(worker, req, environ, resp):
242 def post_request(worker, req, environ, resp):
239 total_time = time.time() - worker.start_time
243 total_time = time.time() - worker.start_time
240 # Gunicorn sometimes has problems with reading the status_code
244 # Gunicorn sometimes has problems with reading the status_code
241 status_code = getattr(resp, 'status_code', '')
245 status_code = getattr(resp, 'status_code', '')
242 worker.log.debug(
246 worker.log.debug(
243 "GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.4fs",
247 "GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.4fs",
244 worker.nr, req.method, req.path, status_code, total_time)
248 worker.nr, req.method, req.path, status_code, total_time)
245 _check_memory_usage(worker)
249 _check_memory_usage(worker)
246
250
247
251
248 class RhodeCodeLogger(Logger):
252 class RhodeCodeLogger(Logger):
249 """
253 """
250 Custom Logger that allows some customization that gunicorn doesn't allow
254 Custom Logger that allows some customization that gunicorn doesn't allow
251 """
255 """
252
256
253 datefmt = r"%Y-%m-%d %H:%M:%S"
257 datefmt = r"%Y-%m-%d %H:%M:%S"
254
258
255 def __init__(self, cfg):
259 def __init__(self, cfg):
256 Logger.__init__(self, cfg)
260 Logger.__init__(self, cfg)
257
261
258 def now(self):
262 def now(self):
259 """ return date in RhodeCode Log format """
263 """ return date in RhodeCode Log format """
260 now = time.time()
264 now = time.time()
261 msecs = int((now - long(now)) * 1000)
265 msecs = int((now - long(now)) * 1000)
262 return time.strftime(self.datefmt, time.localtime(now)) + '.{0:03d}'.format(msecs)
266 return time.strftime(self.datefmt, time.localtime(now)) + '.{0:03d}'.format(msecs)
263
267
264
268
265 logger_class = RhodeCodeLogger
269 logger_class = RhodeCodeLogger
@@ -1,808 +1,816 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 --log-config rhodecode.ini --paste rhodecode.ini
39 ; run with gunicorn --log-config rhodecode.ini --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 ; In addition ENVIRONMENT variables usage is possible, e.g
129 ; In addition ENVIRONMENT variables usage is possible, e.g
130 ; sqlalchemy.db1.url = {ENV_RC_DB_URL}
130 ; sqlalchemy.db1.url = {ENV_RC_DB_URL}
131
131
132 use = egg:rhodecode-enterprise-ce
132 use = egg:rhodecode-enterprise-ce
133
133
134 ; enable proxy prefix middleware, defined above
134 ; enable proxy prefix middleware, defined above
135 #filter-with = proxy-prefix
135 #filter-with = proxy-prefix
136
136
137 ; encryption key used to encrypt social plugin tokens,
137 ; encryption key used to encrypt social plugin tokens,
138 ; remote_urls with credentials etc, if not set it defaults to
138 ; remote_urls with credentials etc, if not set it defaults to
139 ; `beaker.session.secret`
139 ; `beaker.session.secret`
140 #rhodecode.encrypted_values.secret =
140 #rhodecode.encrypted_values.secret =
141
141
142 ; decryption strict mode (enabled by default). It controls if decryption raises
142 ; decryption strict mode (enabled by default). It controls if decryption raises
143 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
143 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
144 #rhodecode.encrypted_values.strict = false
144 #rhodecode.encrypted_values.strict = false
145
145
146 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
146 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
147 ; fernet is safer, and we strongly recommend switching to it.
147 ; fernet is safer, and we strongly recommend switching to it.
148 ; Due to backward compatibility aes is used as default.
148 ; Due to backward compatibility aes is used as default.
149 #rhodecode.encrypted_values.algorithm = fernet
149 #rhodecode.encrypted_values.algorithm = fernet
150
150
151 ; Return gzipped responses from RhodeCode (static files/application)
151 ; Return gzipped responses from RhodeCode (static files/application)
152 gzip_responses = false
152 gzip_responses = false
153
153
154 ; Auto-generate javascript routes file on startup
154 ; Auto-generate javascript routes file on startup
155 generate_js_files = false
155 generate_js_files = false
156
156
157 ; System global default language.
157 ; System global default language.
158 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
158 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
159 lang = en
159 lang = en
160
160
161 ; Perform a full repository scan and import on each server start.
161 ; Perform a full repository scan and import on each server start.
162 ; Settings this to true could lead to very long startup time.
162 ; Settings this to true could lead to very long startup time.
163 startup.import_repos = false
163 startup.import_repos = false
164
164
165 ; Uncomment and set this path to use archive download cache.
165 ; Uncomment and set this path to use archive download cache.
166 ; Once enabled, generated archives will be cached at this location
166 ; Once enabled, generated archives will be cached at this location
167 ; and served from the cache during subsequent requests for the same archive of
167 ; and served from the cache during subsequent requests for the same archive of
168 ; the repository.
168 ; the repository.
169 #archive_cache_dir = /tmp/tarballcache
169 #archive_cache_dir = /tmp/tarballcache
170
170
171 ; URL at which the application is running. This is used for Bootstrapping
171 ; URL at which the application is running. This is used for Bootstrapping
172 ; requests in context when no web request is available. Used in ishell, or
172 ; requests in context when no web request is available. Used in ishell, or
173 ; SSH calls. Set this for events to receive proper url for SSH calls.
173 ; SSH calls. Set this for events to receive proper url for SSH calls.
174 app.base_url = http://rhodecode.local
174 app.base_url = http://rhodecode.local
175
175
176 ; Unique application ID. Should be a random unique string for security.
176 ; Unique application ID. Should be a random unique string for security.
177 app_instance_uuid = rc-production
177 app_instance_uuid = rc-production
178
178
179 ; Cut off limit for large diffs (size in bytes). If overall diff size on
179 ; Cut off limit for large diffs (size in bytes). If overall diff size on
180 ; commit, or pull request exceeds this limit this diff will be displayed
180 ; commit, or pull request exceeds this limit this diff will be displayed
181 ; partially. E.g 512000 == 512Kb
181 ; partially. E.g 512000 == 512Kb
182 cut_off_limit_diff = 512000
182 cut_off_limit_diff = 512000
183
183
184 ; Cut off limit for large files inside diffs (size in bytes). Each individual
184 ; Cut off limit for large files inside diffs (size in bytes). Each individual
185 ; file inside diff which exceeds this limit will be displayed partially.
185 ; file inside diff which exceeds this limit will be displayed partially.
186 ; E.g 128000 == 128Kb
186 ; E.g 128000 == 128Kb
187 cut_off_limit_file = 128000
187 cut_off_limit_file = 128000
188
188
189 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
189 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
190 vcs_full_cache = true
190 vcs_full_cache = true
191
191
192 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
192 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
193 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
193 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
194 force_https = false
194 force_https = false
195
195
196 ; use Strict-Transport-Security headers
196 ; use Strict-Transport-Security headers
197 use_htsts = false
197 use_htsts = false
198
198
199 ; Set to true if your repos are exposed using the dumb protocol
199 ; Set to true if your repos are exposed using the dumb protocol
200 git_update_server_info = false
200 git_update_server_info = false
201
201
202 ; RSS/ATOM feed options
202 ; RSS/ATOM feed options
203 rss_cut_off_limit = 256000
203 rss_cut_off_limit = 256000
204 rss_items_per_page = 10
204 rss_items_per_page = 10
205 rss_include_diff = false
205 rss_include_diff = false
206
206
207 ; gist URL alias, used to create nicer urls for gist. This should be an
207 ; gist URL alias, used to create nicer urls for gist. This should be an
208 ; url that does rewrites to _admin/gists/{gistid}.
208 ; url that does rewrites to _admin/gists/{gistid}.
209 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
209 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
210 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
210 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
211 gist_alias_url =
211 gist_alias_url =
212
212
213 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
213 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
214 ; used for access.
214 ; used for access.
215 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
215 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
216 ; came from the the logged in user who own this authentication token.
216 ; came from the the logged in user who own this authentication token.
217 ; Additionally @TOKEN syntax can be used to bound the view to specific
217 ; Additionally @TOKEN syntax can be used to bound the view to specific
218 ; authentication token. Such view would be only accessible when used together
218 ; authentication token. Such view would be only accessible when used together
219 ; with this authentication token
219 ; with this authentication token
220 ; list of all views can be found under `/_admin/permissions/auth_token_access`
220 ; list of all views can be found under `/_admin/permissions/auth_token_access`
221 ; The list should be "," separated and on a single line.
221 ; The list should be "," separated and on a single line.
222 ; Most common views to enable:
222 ; Most common views to enable:
223
223
224 # RepoCommitsView:repo_commit_download
224 # RepoCommitsView:repo_commit_download
225 # RepoCommitsView:repo_commit_patch
225 # RepoCommitsView:repo_commit_patch
226 # RepoCommitsView:repo_commit_raw
226 # RepoCommitsView:repo_commit_raw
227 # RepoCommitsView:repo_commit_raw@TOKEN
227 # RepoCommitsView:repo_commit_raw@TOKEN
228 # RepoFilesView:repo_files_diff
228 # RepoFilesView:repo_files_diff
229 # RepoFilesView:repo_archivefile
229 # RepoFilesView:repo_archivefile
230 # RepoFilesView:repo_file_raw
230 # RepoFilesView:repo_file_raw
231 # GistView:*
231 # GistView:*
232 api_access_controllers_whitelist =
232 api_access_controllers_whitelist =
233
233
234 ; Default encoding used to convert from and to unicode
234 ; Default encoding used to convert from and to unicode
235 ; can be also a comma separated list of encoding in case of mixed encodings
235 ; can be also a comma separated list of encoding in case of mixed encodings
236 default_encoding = UTF-8
236 default_encoding = UTF-8
237
237
238 ; instance-id prefix
238 ; instance-id prefix
239 ; a prefix key for this instance used for cache invalidation when running
239 ; a prefix key for this instance used for cache invalidation when running
240 ; multiple instances of RhodeCode, make sure it's globally unique for
240 ; multiple instances of RhodeCode, make sure it's globally unique for
241 ; all running RhodeCode instances. Leave empty if you don't use it
241 ; all running RhodeCode instances. Leave empty if you don't use it
242 instance_id =
242 instance_id =
243
243
244 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
244 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
245 ; of an authentication plugin also if it is disabled by it's settings.
245 ; of an authentication plugin also if it is disabled by it's settings.
246 ; This could be useful if you are unable to log in to the system due to broken
246 ; This could be useful if you are unable to log in to the system due to broken
247 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
247 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
248 ; module to log in again and fix the settings.
248 ; module to log in again and fix the settings.
249 ; Available builtin plugin IDs (hash is part of the ID):
249 ; Available builtin plugin IDs (hash is part of the ID):
250 ; egg:rhodecode-enterprise-ce#rhodecode
250 ; egg:rhodecode-enterprise-ce#rhodecode
251 ; egg:rhodecode-enterprise-ce#pam
251 ; egg:rhodecode-enterprise-ce#pam
252 ; egg:rhodecode-enterprise-ce#ldap
252 ; egg:rhodecode-enterprise-ce#ldap
253 ; egg:rhodecode-enterprise-ce#jasig_cas
253 ; egg:rhodecode-enterprise-ce#jasig_cas
254 ; egg:rhodecode-enterprise-ce#headers
254 ; egg:rhodecode-enterprise-ce#headers
255 ; egg:rhodecode-enterprise-ce#crowd
255 ; egg:rhodecode-enterprise-ce#crowd
256
256
257 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
257 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
258
258
259 ; Flag to control loading of legacy plugins in py:/path format
259 ; Flag to control loading of legacy plugins in py:/path format
260 auth_plugin.import_legacy_plugins = true
260 auth_plugin.import_legacy_plugins = true
261
261
262 ; alternative return HTTP header for failed authentication. Default HTTP
262 ; alternative return HTTP header for failed authentication. Default HTTP
263 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
263 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
264 ; handling that causing a series of failed authentication calls.
264 ; handling that causing a series of failed authentication calls.
265 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
265 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
266 ; This will be served instead of default 401 on bad authentication
266 ; This will be served instead of default 401 on bad authentication
267 auth_ret_code =
267 auth_ret_code =
268
268
269 ; use special detection method when serving auth_ret_code, instead of serving
269 ; use special detection method when serving auth_ret_code, instead of serving
270 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
270 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
271 ; and then serve auth_ret_code to clients
271 ; and then serve auth_ret_code to clients
272 auth_ret_code_detection = false
272 auth_ret_code_detection = false
273
273
274 ; locking return code. When repository is locked return this HTTP code. 2XX
274 ; locking return code. When repository is locked return this HTTP code. 2XX
275 ; codes don't break the transactions while 4XX codes do
275 ; codes don't break the transactions while 4XX codes do
276 lock_ret_code = 423
276 lock_ret_code = 423
277
277
278 ; allows to change the repository location in settings page
278 ; allows to change the repository location in settings page
279 allow_repo_location_change = true
279 allow_repo_location_change = true
280
280
281 ; allows to setup custom hooks in settings page
281 ; allows to setup custom hooks in settings page
282 allow_custom_hooks_settings = true
282 allow_custom_hooks_settings = true
283
283
284 ; Generated license token required for EE edition license.
284 ; Generated license token required for EE edition license.
285 ; New generated token value can be found in Admin > settings > license page.
285 ; New generated token value can be found in Admin > settings > license page.
286 license_token =
286 license_token =
287
287
288 ; This flag hides sensitive information on the license page such as token, and license data
288 ; This flag hides sensitive information on the license page such as token, and license data
289 license.hide_license_info = false
289 license.hide_license_info = false
290
290
291 ; supervisor connection uri, for managing supervisor and logs.
291 ; supervisor connection uri, for managing supervisor and logs.
292 supervisor.uri =
292 supervisor.uri =
293
293
294 ; supervisord group name/id we only want this RC instance to handle
294 ; supervisord group name/id we only want this RC instance to handle
295 supervisor.group_id = prod
295 supervisor.group_id = prod
296
296
297 ; Display extended labs settings
297 ; Display extended labs settings
298 labs_settings_active = true
298 labs_settings_active = true
299
299
300 ; Custom exception store path, defaults to TMPDIR
300 ; Custom exception store path, defaults to TMPDIR
301 ; This is used to store exception from RhodeCode in shared directory
301 ; This is used to store exception from RhodeCode in shared directory
302 #exception_tracker.store_path =
302 #exception_tracker.store_path =
303
303
304 ; Send email with exception details when it happens
304 ; Send email with exception details when it happens
305 #exception_tracker.send_email = false
305 #exception_tracker.send_email = false
306
306
307 ; Comma separated list of recipients for exception emails,
307 ; Comma separated list of recipients for exception emails,
308 ; e.g admin@rhodecode.com,devops@rhodecode.com
308 ; e.g admin@rhodecode.com,devops@rhodecode.com
309 ; Can be left empty, then emails will be sent to ALL super-admins
309 ; Can be left empty, then emails will be sent to ALL super-admins
310 #exception_tracker.send_email_recipients =
310 #exception_tracker.send_email_recipients =
311
311
312 ; optional prefix to Add to email Subject
312 ; optional prefix to Add to email Subject
313 #exception_tracker.email_prefix = [RHODECODE ERROR]
313 #exception_tracker.email_prefix = [RHODECODE ERROR]
314
314
315 ; File store configuration. This is used to store and serve uploaded files
315 ; File store configuration. This is used to store and serve uploaded files
316 file_store.enabled = true
316 file_store.enabled = true
317
317
318 ; Storage backend, available options are: local
318 ; Storage backend, available options are: local
319 file_store.backend = local
319 file_store.backend = local
320
320
321 ; path to store the uploaded binaries
321 ; path to store the uploaded binaries
322 file_store.storage_path = %(here)s/data/file_store
322 file_store.storage_path = %(here)s/data/file_store
323
323
324
324
325 ; #############
325 ; #############
326 ; CELERY CONFIG
326 ; CELERY CONFIG
327 ; #############
327 ; #############
328
328
329 ; 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
329 ; 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
330
330
331 use_celery = false
331 use_celery = false
332
332
333 ; connection url to the message broker (default redis)
333 ; connection url to the message broker (default redis)
334 celery.broker_url = redis://localhost:6379/8
334 celery.broker_url = redis://localhost:6379/8
335
335
336 ; rabbitmq example
336 ; rabbitmq example
337 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
337 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
338
338
339 ; maximum tasks to execute before worker restart
339 ; maximum tasks to execute before worker restart
340 celery.max_tasks_per_child = 100
340 celery.max_tasks_per_child = 100
341
341
342 ; tasks will never be sent to the queue, but executed locally instead.
342 ; tasks will never be sent to the queue, but executed locally instead.
343 celery.task_always_eager = false
343 celery.task_always_eager = false
344
344
345 ; #############
345 ; #############
346 ; DOGPILE CACHE
346 ; DOGPILE CACHE
347 ; #############
347 ; #############
348
348
349 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
349 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
350 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
350 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
351 cache_dir = %(here)s/data
351 cache_dir = %(here)s/data
352
352
353 ; *********************************************
353 ; *********************************************
354 ; `sql_cache_short` cache for heavy SQL queries
354 ; `sql_cache_short` cache for heavy SQL queries
355 ; Only supported backend is `memory_lru`
355 ; Only supported backend is `memory_lru`
356 ; *********************************************
356 ; *********************************************
357 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
357 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
358 rc_cache.sql_cache_short.expiration_time = 30
358 rc_cache.sql_cache_short.expiration_time = 30
359
359
360
360
361 ; *****************************************************
361 ; *****************************************************
362 ; `cache_repo_longterm` cache for repo object instances
362 ; `cache_repo_longterm` cache for repo object instances
363 ; Only supported backend is `memory_lru`
363 ; Only supported backend is `memory_lru`
364 ; *****************************************************
364 ; *****************************************************
365 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
365 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
366 ; by default we use 30 Days, cache is still invalidated on push
366 ; by default we use 30 Days, cache is still invalidated on push
367 rc_cache.cache_repo_longterm.expiration_time = 2592000
367 rc_cache.cache_repo_longterm.expiration_time = 2592000
368 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
368 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
369 rc_cache.cache_repo_longterm.max_size = 10000
369 rc_cache.cache_repo_longterm.max_size = 10000
370
370
371
371
372 ; *************************************************
372 ; *************************************************
373 ; `cache_perms` cache for permission tree, auth TTL
373 ; `cache_perms` cache for permission tree, auth TTL
374 ; *************************************************
374 ; *************************************************
375 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
375 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
376 rc_cache.cache_perms.expiration_time = 300
376 rc_cache.cache_perms.expiration_time = 300
377 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
377 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
378 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
378 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db
379
379
380 ; alternative `cache_perms` redis backend with distributed lock
380 ; alternative `cache_perms` redis backend with distributed lock
381 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
381 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
382 #rc_cache.cache_perms.expiration_time = 300
382 #rc_cache.cache_perms.expiration_time = 300
383
383
384 ; redis_expiration_time needs to be greater then expiration_time
384 ; redis_expiration_time needs to be greater then expiration_time
385 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
385 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
386
386
387 #rc_cache.cache_perms.arguments.host = localhost
387 #rc_cache.cache_perms.arguments.host = localhost
388 #rc_cache.cache_perms.arguments.port = 6379
388 #rc_cache.cache_perms.arguments.port = 6379
389 #rc_cache.cache_perms.arguments.db = 0
389 #rc_cache.cache_perms.arguments.db = 0
390 #rc_cache.cache_perms.arguments.socket_timeout = 30
390 #rc_cache.cache_perms.arguments.socket_timeout = 30
391 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
391 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
392 #rc_cache.cache_perms.arguments.distributed_lock = true
392 #rc_cache.cache_perms.arguments.distributed_lock = true
393
393
394 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
394 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
395 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
395 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
396
396
397 ; ***************************************************
397 ; ***************************************************
398 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
398 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
399 ; ***************************************************
399 ; ***************************************************
400 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
400 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
401 rc_cache.cache_repo.expiration_time = 2592000
401 rc_cache.cache_repo.expiration_time = 2592000
402 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
402 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
403 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
403 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo.db
404
404
405 ; alternative `cache_repo` redis backend with distributed lock
405 ; alternative `cache_repo` redis backend with distributed lock
406 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
406 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
407 #rc_cache.cache_repo.expiration_time = 2592000
407 #rc_cache.cache_repo.expiration_time = 2592000
408
408
409 ; redis_expiration_time needs to be greater then expiration_time
409 ; redis_expiration_time needs to be greater then expiration_time
410 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
410 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
411
411
412 #rc_cache.cache_repo.arguments.host = localhost
412 #rc_cache.cache_repo.arguments.host = localhost
413 #rc_cache.cache_repo.arguments.port = 6379
413 #rc_cache.cache_repo.arguments.port = 6379
414 #rc_cache.cache_repo.arguments.db = 1
414 #rc_cache.cache_repo.arguments.db = 1
415 #rc_cache.cache_repo.arguments.socket_timeout = 30
415 #rc_cache.cache_repo.arguments.socket_timeout = 30
416 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
416 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
417 #rc_cache.cache_repo.arguments.distributed_lock = true
417 #rc_cache.cache_repo.arguments.distributed_lock = true
418
418
419 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
419 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
420 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
420 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
421
421
422 ; ##############
422 ; ##############
423 ; BEAKER SESSION
423 ; BEAKER SESSION
424 ; ##############
424 ; ##############
425
425
426 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
426 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
427 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
427 ; types are file, ext:redis, ext:database, ext:memcached, and memory (default if not specified).
428 ; Fastest ones are Redis and ext:database
428 ; Fastest ones are Redis and ext:database
429 beaker.session.type = file
429 beaker.session.type = file
430 beaker.session.data_dir = %(here)s/data/sessions
430 beaker.session.data_dir = %(here)s/data/sessions
431
431
432 ; Redis based sessions
432 ; Redis based sessions
433 #beaker.session.type = ext:redis
433 #beaker.session.type = ext:redis
434 #beaker.session.url = redis://127.0.0.1:6379/2
434 #beaker.session.url = redis://127.0.0.1:6379/2
435
435
436 ; DB based session, fast, and allows easy management over logged in users
436 ; DB based session, fast, and allows easy management over logged in users
437 #beaker.session.type = ext:database
437 #beaker.session.type = ext:database
438 #beaker.session.table_name = db_session
438 #beaker.session.table_name = db_session
439 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
439 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
440 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
440 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
441 #beaker.session.sa.pool_recycle = 3600
441 #beaker.session.sa.pool_recycle = 3600
442 #beaker.session.sa.echo = false
442 #beaker.session.sa.echo = false
443
443
444 beaker.session.key = rhodecode
444 beaker.session.key = rhodecode
445 beaker.session.secret = production-rc-uytcxaz
445 beaker.session.secret = production-rc-uytcxaz
446 beaker.session.lock_dir = %(here)s/data/sessions/lock
446 beaker.session.lock_dir = %(here)s/data/sessions/lock
447
447
448 ; Secure encrypted cookie. Requires AES and AES python libraries
448 ; Secure encrypted cookie. Requires AES and AES python libraries
449 ; you must disable beaker.session.secret to use this
449 ; you must disable beaker.session.secret to use this
450 #beaker.session.encrypt_key = key_for_encryption
450 #beaker.session.encrypt_key = key_for_encryption
451 #beaker.session.validate_key = validation_key
451 #beaker.session.validate_key = validation_key
452
452
453 ; Sets session as invalid (also logging out user) if it haven not been
453 ; Sets session as invalid (also logging out user) if it haven not been
454 ; accessed for given amount of time in seconds
454 ; accessed for given amount of time in seconds
455 beaker.session.timeout = 2592000
455 beaker.session.timeout = 2592000
456 beaker.session.httponly = true
456 beaker.session.httponly = true
457
457
458 ; Path to use for the cookie. Set to prefix if you use prefix middleware
458 ; Path to use for the cookie. Set to prefix if you use prefix middleware
459 #beaker.session.cookie_path = /custom_prefix
459 #beaker.session.cookie_path = /custom_prefix
460
460
461 ; Set https secure cookie
461 ; Set https secure cookie
462 beaker.session.secure = false
462 beaker.session.secure = false
463
463
464 ; default cookie expiration time in seconds, set to `true` to set expire
464 ; default cookie expiration time in seconds, set to `true` to set expire
465 ; at browser close
465 ; at browser close
466 #beaker.session.cookie_expires = 3600
466 #beaker.session.cookie_expires = 3600
467
467
468 ; #############################
468 ; #############################
469 ; SEARCH INDEXING CONFIGURATION
469 ; SEARCH INDEXING CONFIGURATION
470 ; #############################
470 ; #############################
471
471
472 ; Full text search indexer is available in rhodecode-tools under
472 ; Full text search indexer is available in rhodecode-tools under
473 ; `rhodecode-tools index` command
473 ; `rhodecode-tools index` command
474
474
475 ; WHOOSH Backend, doesn't require additional services to run
475 ; WHOOSH Backend, doesn't require additional services to run
476 ; it works good with few dozen repos
476 ; it works good with few dozen repos
477 search.module = rhodecode.lib.index.whoosh
477 search.module = rhodecode.lib.index.whoosh
478 search.location = %(here)s/data/index
478 search.location = %(here)s/data/index
479
479
480 ; ####################
480 ; ####################
481 ; CHANNELSTREAM CONFIG
481 ; CHANNELSTREAM CONFIG
482 ; ####################
482 ; ####################
483
483
484 ; channelstream enables persistent connections and live notification
484 ; channelstream enables persistent connections and live notification
485 ; in the system. It's also used by the chat system
485 ; in the system. It's also used by the chat system
486
486
487 channelstream.enabled = false
487 channelstream.enabled = false
488
488
489 ; server address for channelstream server on the backend
489 ; server address for channelstream server on the backend
490 channelstream.server = 127.0.0.1:9800
490 channelstream.server = 127.0.0.1:9800
491
491
492 ; location of the channelstream server from outside world
492 ; location of the channelstream server from outside world
493 ; use ws:// for http or wss:// for https. This address needs to be handled
493 ; use ws:// for http or wss:// for https. This address needs to be handled
494 ; by external HTTP server such as Nginx or Apache
494 ; by external HTTP server such as Nginx or Apache
495 ; see Nginx/Apache configuration examples in our docs
495 ; see Nginx/Apache configuration examples in our docs
496 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
496 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
497 channelstream.secret = secret
497 channelstream.secret = secret
498 channelstream.history.location = %(here)s/channelstream_history
498 channelstream.history.location = %(here)s/channelstream_history
499
499
500 ; Internal application path that Javascript uses to connect into.
500 ; Internal application path that Javascript uses to connect into.
501 ; If you use proxy-prefix the prefix should be added before /_channelstream
501 ; If you use proxy-prefix the prefix should be added before /_channelstream
502 channelstream.proxy_path = /_channelstream
502 channelstream.proxy_path = /_channelstream
503
503
504
504
505 ; ##############################
505 ; ##############################
506 ; MAIN RHODECODE DATABASE CONFIG
506 ; MAIN RHODECODE DATABASE CONFIG
507 ; ##############################
507 ; ##############################
508
508
509 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
509 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
510 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
510 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
511 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
511 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
512 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
512 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
513 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
513 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
514
514
515 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
515 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
516
516
517 ; see sqlalchemy docs for other advanced settings
517 ; see sqlalchemy docs for other advanced settings
518 ; print the sql statements to output
518 ; print the sql statements to output
519 sqlalchemy.db1.echo = false
519 sqlalchemy.db1.echo = false
520
520
521 ; recycle the connections after this amount of seconds
521 ; recycle the connections after this amount of seconds
522 sqlalchemy.db1.pool_recycle = 3600
522 sqlalchemy.db1.pool_recycle = 3600
523 sqlalchemy.db1.convert_unicode = true
523 sqlalchemy.db1.convert_unicode = true
524
524
525 ; the number of connections to keep open inside the connection pool.
525 ; the number of connections to keep open inside the connection pool.
526 ; 0 indicates no limit
526 ; 0 indicates no limit
527 #sqlalchemy.db1.pool_size = 5
527 #sqlalchemy.db1.pool_size = 5
528
528
529 ; The number of connections to allow in connection pool "overflow", that is
529 ; The number of connections to allow in connection pool "overflow", that is
530 ; connections that can be opened above and beyond the pool_size setting,
530 ; connections that can be opened above and beyond the pool_size setting,
531 ; which defaults to five.
531 ; which defaults to five.
532 #sqlalchemy.db1.max_overflow = 10
532 #sqlalchemy.db1.max_overflow = 10
533
533
534 ; Connection check ping, used to detect broken database connections
534 ; Connection check ping, used to detect broken database connections
535 ; could be enabled to better handle cases if MySQL has gone away errors
535 ; could be enabled to better handle cases if MySQL has gone away errors
536 #sqlalchemy.db1.ping_connection = true
536 #sqlalchemy.db1.ping_connection = true
537
537
538 ; ##########
538 ; ##########
539 ; VCS CONFIG
539 ; VCS CONFIG
540 ; ##########
540 ; ##########
541 vcs.server.enable = true
541 vcs.server.enable = true
542 vcs.server = localhost:9900
542 vcs.server = localhost:9900
543
543
544 ; Web server connectivity protocol, responsible for web based VCS operations
544 ; Web server connectivity protocol, responsible for web based VCS operations
545 ; Available protocols are:
545 ; Available protocols are:
546 ; `http` - use http-rpc backend (default)
546 ; `http` - use http-rpc backend (default)
547 vcs.server.protocol = http
547 vcs.server.protocol = http
548
548
549 ; Push/Pull operations protocol, available options are:
549 ; Push/Pull operations protocol, available options are:
550 ; `http` - use http-rpc backend (default)
550 ; `http` - use http-rpc backend (default)
551 vcs.scm_app_implementation = http
551 vcs.scm_app_implementation = http
552
552
553 ; Push/Pull operations hooks protocol, available options are:
553 ; Push/Pull operations hooks protocol, available options are:
554 ; `http` - use http-rpc backend (default)
554 ; `http` - use http-rpc backend (default)
555 vcs.hooks.protocol = http
555 vcs.hooks.protocol = http
556
556
557 ; Host on which this instance is listening for hooks. If vcsserver is in other location
557 ; Host on which this instance is listening for hooks. If vcsserver is in other location
558 ; this should be adjusted.
558 ; this should be adjusted.
559 vcs.hooks.host = 127.0.0.1
559 vcs.hooks.host = 127.0.0.1
560
560
561 ; Start VCSServer with this instance as a subprocess, useful for development
561 ; Start VCSServer with this instance as a subprocess, useful for development
562 vcs.start_server = false
562 vcs.start_server = false
563
563
564 ; List of enabled VCS backends, available options are:
564 ; List of enabled VCS backends, available options are:
565 ; `hg` - mercurial
565 ; `hg` - mercurial
566 ; `git` - git
566 ; `git` - git
567 ; `svn` - subversion
567 ; `svn` - subversion
568 vcs.backends = hg, git, svn
568 vcs.backends = hg, git, svn
569
569
570 ; Wait this number of seconds before killing connection to the vcsserver
570 ; Wait this number of seconds before killing connection to the vcsserver
571 vcs.connection_timeout = 3600
571 vcs.connection_timeout = 3600
572
572
573 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
573 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
574 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
574 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
575 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
575 ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible
576 #vcs.svn.compatible_version = 1.8
576 #vcs.svn.compatible_version = 1.8
577
577
578
578
579 ; ####################################################
579 ; ####################################################
580 ; Subversion proxy support (mod_dav_svn)
580 ; Subversion proxy support (mod_dav_svn)
581 ; Maps RhodeCode repo groups into SVN paths for Apache
581 ; Maps RhodeCode repo groups into SVN paths for Apache
582 ; ####################################################
582 ; ####################################################
583
583
584 ; Enable or disable the config file generation.
584 ; Enable or disable the config file generation.
585 svn.proxy.generate_config = false
585 svn.proxy.generate_config = false
586
586
587 ; Generate config file with `SVNListParentPath` set to `On`.
587 ; Generate config file with `SVNListParentPath` set to `On`.
588 svn.proxy.list_parent_path = true
588 svn.proxy.list_parent_path = true
589
589
590 ; Set location and file name of generated config file.
590 ; Set location and file name of generated config file.
591 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
591 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
592
592
593 ; alternative mod_dav config template. This needs to be a valid mako template
593 ; alternative mod_dav config template. This needs to be a valid mako template
594 ; Example template can be found in the source code:
594 ; Example template can be found in the source code:
595 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
595 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
596 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
596 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
597
597
598 ; Used as a prefix to the `Location` block in the generated config file.
598 ; Used as a prefix to the `Location` block in the generated config file.
599 ; In most cases it should be set to `/`.
599 ; In most cases it should be set to `/`.
600 svn.proxy.location_root = /
600 svn.proxy.location_root = /
601
601
602 ; Command to reload the mod dav svn configuration on change.
602 ; Command to reload the mod dav svn configuration on change.
603 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
603 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
604 ; Make sure user who runs RhodeCode process is allowed to reload Apache
604 ; Make sure user who runs RhodeCode process is allowed to reload Apache
605 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
605 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
606
606
607 ; If the timeout expires before the reload command finishes, the command will
607 ; If the timeout expires before the reload command finishes, the command will
608 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
608 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
609 #svn.proxy.reload_timeout = 10
609 #svn.proxy.reload_timeout = 10
610
610
611 ; ####################
611 ; ####################
612 ; SSH Support Settings
612 ; SSH Support Settings
613 ; ####################
613 ; ####################
614
614
615 ; Defines if a custom authorized_keys file should be created and written on
615 ; Defines if a custom authorized_keys file should be created and written on
616 ; any change user ssh keys. Setting this to false also disables possibility
616 ; any change user ssh keys. Setting this to false also disables possibility
617 ; of adding SSH keys by users from web interface. Super admins can still
617 ; of adding SSH keys by users from web interface. Super admins can still
618 ; manage SSH Keys.
618 ; manage SSH Keys.
619 ssh.generate_authorized_keyfile = false
619 ssh.generate_authorized_keyfile = false
620
620
621 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
621 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
622 # ssh.authorized_keys_ssh_opts =
622 # ssh.authorized_keys_ssh_opts =
623
623
624 ; Path to the authorized_keys file where the generate entries are placed.
624 ; Path to the authorized_keys file where the generate entries are placed.
625 ; It is possible to have multiple key files specified in `sshd_config` e.g.
625 ; It is possible to have multiple key files specified in `sshd_config` e.g.
626 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
626 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
627 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
627 ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode
628
628
629 ; Command to execute the SSH wrapper. The binary is available in the
629 ; Command to execute the SSH wrapper. The binary is available in the
630 ; RhodeCode installation directory.
630 ; RhodeCode installation directory.
631 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
631 ; e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper
632 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
632 ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper
633
633
634 ; Allow shell when executing the ssh-wrapper command
634 ; Allow shell when executing the ssh-wrapper command
635 ssh.wrapper_cmd_allow_shell = false
635 ssh.wrapper_cmd_allow_shell = false
636
636
637 ; Enables logging, and detailed output send back to the client during SSH
637 ; Enables logging, and detailed output send back to the client during SSH
638 ; operations. Useful for debugging, shouldn't be used in production.
638 ; operations. Useful for debugging, shouldn't be used in production.
639 ssh.enable_debug_logging = false
639 ssh.enable_debug_logging = false
640
640
641 ; Paths to binary executable, by default they are the names, but we can
641 ; Paths to binary executable, by default they are the names, but we can
642 ; override them if we want to use a custom one
642 ; override them if we want to use a custom one
643 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
643 ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg
644 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
644 ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git
645 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
645 ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve
646
646
647 ; Enables SSH key generator web interface. Disabling this still allows users
647 ; Enables SSH key generator web interface. Disabling this still allows users
648 ; to add their own keys.
648 ; to add their own keys.
649 ssh.enable_ui_key_generator = true
649 ssh.enable_ui_key_generator = true
650
650
651
651
652 ; #################
652 ; #################
653 ; APPENLIGHT CONFIG
653 ; APPENLIGHT CONFIG
654 ; #################
654 ; #################
655
655
656 ; Appenlight is tailored to work with RhodeCode, see
656 ; Appenlight is tailored to work with RhodeCode, see
657 ; http://appenlight.rhodecode.com for details how to obtain an account
657 ; http://appenlight.rhodecode.com for details how to obtain an account
658
658
659 ; Appenlight integration enabled
659 ; Appenlight integration enabled
660 appenlight = false
660 appenlight = false
661
661
662 appenlight.server_url = https://api.appenlight.com
662 appenlight.server_url = https://api.appenlight.com
663 appenlight.api_key = YOUR_API_KEY
663 appenlight.api_key = YOUR_API_KEY
664 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
664 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
665
665
666 ; used for JS client
666 ; used for JS client
667 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
667 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
668
668
669 ; TWEAK AMOUNT OF INFO SENT HERE
669 ; TWEAK AMOUNT OF INFO SENT HERE
670
670
671 ; enables 404 error logging (default False)
671 ; enables 404 error logging (default False)
672 appenlight.report_404 = false
672 appenlight.report_404 = false
673
673
674 ; time in seconds after request is considered being slow (default 1)
674 ; time in seconds after request is considered being slow (default 1)
675 appenlight.slow_request_time = 1
675 appenlight.slow_request_time = 1
676
676
677 ; record slow requests in application
677 ; record slow requests in application
678 ; (needs to be enabled for slow datastore recording and time tracking)
678 ; (needs to be enabled for slow datastore recording and time tracking)
679 appenlight.slow_requests = true
679 appenlight.slow_requests = true
680
680
681 ; enable hooking to application loggers
681 ; enable hooking to application loggers
682 appenlight.logging = true
682 appenlight.logging = true
683
683
684 ; minimum log level for log capture
684 ; minimum log level for log capture
685 appenlight.logging.level = WARNING
685 appenlight.logging.level = WARNING
686
686
687 ; send logs only from erroneous/slow requests
687 ; send logs only from erroneous/slow requests
688 ; (saves API quota for intensive logging)
688 ; (saves API quota for intensive logging)
689 appenlight.logging_on_error = false
689 appenlight.logging_on_error = false
690
690
691 ; list of additional keywords that should be grabbed from environ object
691 ; list of additional keywords that should be grabbed from environ object
692 ; can be string with comma separated list of words in lowercase
692 ; can be string with comma separated list of words in lowercase
693 ; (by default client will always send following info:
693 ; (by default client will always send following info:
694 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
694 ; 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
695 ; start with HTTP* this list be extended with additional keywords here
695 ; start with HTTP* this list be extended with additional keywords here
696 appenlight.environ_keys_whitelist =
696 appenlight.environ_keys_whitelist =
697
697
698 ; list of keywords that should be blanked from request object
698 ; list of keywords that should be blanked from request object
699 ; can be string with comma separated list of words in lowercase
699 ; can be string with comma separated list of words in lowercase
700 ; (by default client will always blank keys that contain following words
700 ; (by default client will always blank keys that contain following words
701 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
701 ; 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
702 ; this list be extended with additional keywords set here
702 ; this list be extended with additional keywords set here
703 appenlight.request_keys_blacklist =
703 appenlight.request_keys_blacklist =
704
704
705 ; list of namespaces that should be ignores when gathering log entries
705 ; list of namespaces that should be ignores when gathering log entries
706 ; can be string with comma separated list of namespaces
706 ; can be string with comma separated list of namespaces
707 ; (by default the client ignores own entries: appenlight_client.client)
707 ; (by default the client ignores own entries: appenlight_client.client)
708 appenlight.log_namespace_blacklist =
708 appenlight.log_namespace_blacklist =
709
709
710 ; Statsd client config, this is used to send metrics to statsd
710 ; Statsd client config, this is used to send metrics to statsd
711 ; We recommend setting statsd_exported and scrape them using Promethues
711 ; We recommend setting statsd_exported and scrape them using Promethues
712 #statsd.enabled = false
712 #statsd.enabled = false
713 #statsd.statsd_host = 0.0.0.0
713 #statsd.statsd_host = 0.0.0.0
714 #statsd.statsd_port = 8125
714 #statsd.statsd_port = 8125
715 #statsd.statsd_prefix =
715 #statsd.statsd_prefix =
716 #statsd.statsd_ipv6 = false
716 #statsd.statsd_ipv6 = false
717
717
718
718 ; Dummy marker to add new entries after.
719 ; Dummy marker to add new entries after.
719 ; Add any custom entries below. Please don't remove this marker.
720 ; Add any custom entries below. Please don't remove this marker.
720 custom.conf = 1
721 custom.conf = 1
721
722
722
723
723 ; #####################
724 ; #####################
724 ; LOGGING CONFIGURATION
725 ; LOGGING CONFIGURATION
725 ; #####################
726 ; #####################
726 [loggers]
727 [loggers]
727 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
728 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
728
729
729 [handlers]
730 [handlers]
730 keys = console, console_sql
731 keys = console, console_sql
731
732
732 [formatters]
733 [formatters]
733 keys = generic, color_formatter, color_formatter_sql
734 keys = generic, color_formatter, color_formatter_sql
734
735
735 ; #######
736 ; #######
736 ; LOGGERS
737 ; LOGGERS
737 ; #######
738 ; #######
738 [logger_root]
739 [logger_root]
739 level = NOTSET
740 level = NOTSET
740 handlers = console
741 handlers = console
741
742
742 [logger_sqlalchemy]
743 [logger_sqlalchemy]
743 level = INFO
744 level = INFO
744 handlers = console_sql
745 handlers = console_sql
745 qualname = sqlalchemy.engine
746 qualname = sqlalchemy.engine
746 propagate = 0
747 propagate = 0
747
748
748 [logger_beaker]
749 [logger_beaker]
749 level = DEBUG
750 level = DEBUG
750 handlers =
751 handlers =
751 qualname = beaker.container
752 qualname = beaker.container
752 propagate = 1
753 propagate = 1
753
754
754 [logger_rhodecode]
755 [logger_rhodecode]
755 level = DEBUG
756 level = DEBUG
756 handlers =
757 handlers =
757 qualname = rhodecode
758 qualname = rhodecode
758 propagate = 1
759 propagate = 1
759
760
760 [logger_ssh_wrapper]
761 [logger_ssh_wrapper]
761 level = DEBUG
762 level = DEBUG
762 handlers =
763 handlers =
763 qualname = ssh_wrapper
764 qualname = ssh_wrapper
764 propagate = 1
765 propagate = 1
765
766
766 [logger_celery]
767 [logger_celery]
767 level = DEBUG
768 level = DEBUG
768 handlers =
769 handlers =
769 qualname = celery
770 qualname = celery
770
771
771
772
772 ; ########
773 ; ########
773 ; HANDLERS
774 ; HANDLERS
774 ; ########
775 ; ########
775
776
776 [handler_console]
777 [handler_console]
777 class = StreamHandler
778 class = StreamHandler
778 args = (sys.stderr, )
779 args = (sys.stderr, )
779 level = INFO
780 level = INFO
780 formatter = generic
781 formatter = generic
782 ; To enable JSON formatted logs replace generic with json
783 ; This allows sending properly formatted logs to grafana loki or elasticsearch
784 #formatter = json
781
785
782 [handler_console_sql]
786 [handler_console_sql]
783 ; "level = DEBUG" logs SQL queries and results.
787 ; "level = DEBUG" logs SQL queries and results.
784 ; "level = INFO" logs SQL queries.
788 ; "level = INFO" logs SQL queries.
785 ; "level = WARN" logs neither. (Recommended for production systems.)
789 ; "level = WARN" logs neither. (Recommended for production systems.)
786 class = StreamHandler
790 class = StreamHandler
787 args = (sys.stderr, )
791 args = (sys.stderr, )
788 level = WARN
792 level = WARN
789 formatter = generic
793 formatter = generic
790
794
791 ; ##########
795 ; ##########
792 ; FORMATTERS
796 ; FORMATTERS
793 ; ##########
797 ; ##########
794
798
795 [formatter_generic]
799 [formatter_generic]
796 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
800 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
797 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
801 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
798 datefmt = %Y-%m-%d %H:%M:%S
802 datefmt = %Y-%m-%d %H:%M:%S
799
803
800 [formatter_color_formatter]
804 [formatter_color_formatter]
801 class = rhodecode.lib.logging_formatter.ColorFormatter
805 class = rhodecode.lib.logging_formatter.ColorFormatter
802 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
806 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
803 datefmt = %Y-%m-%d %H:%M:%S
807 datefmt = %Y-%m-%d %H:%M:%S
804
808
805 [formatter_color_formatter_sql]
809 [formatter_color_formatter_sql]
806 class = rhodecode.lib.logging_formatter.ColorFormatterSql
810 class = rhodecode.lib.logging_formatter.ColorFormatterSql
807 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
811 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
808 datefmt = %Y-%m-%d %H:%M:%S
812 datefmt = %Y-%m-%d %H:%M:%S
813
814 [formatter_json]
815 format = %(message)s
816 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now