##// END OF EJS Templates
added initial_repo_scan flag for controll if repo scaning should be performed on every startup....
marcink -
r3778:88f11b5e beta
parent child Browse files
Show More
@@ -1,487 +1,491 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
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 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE
32 ## PASTE
33 ## nr of threads to spawn
33 ## nr of threads to spawn
34 #threadpool_workers = 5
34 #threadpool_workers = 5
35
35
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38
38
39 ## option to use threads of process
39 ## option to use threads of process
40 #use_threadpool = true
40 #use_threadpool = true
41
41
42 #use = egg:Paste#http
42 #use = egg:Paste#http
43
43
44 ## WAITRESS
44 ## WAITRESS
45 threads = 5
45 threads = 5
46 ## 100GB
46 ## 100GB
47 max_request_body_size = 107374182400
47 max_request_body_size = 107374182400
48 use = egg:waitress#main
48 use = egg:waitress#main
49
49
50 host = 0.0.0.0
50 host = 0.0.0.0
51 port = 5000
51 port = 5000
52
52
53 ## prefix middleware for rc
53 ## prefix middleware for rc
54 #[filter:proxy-prefix]
54 #[filter:proxy-prefix]
55 #use = egg:PasteDeploy#prefix
55 #use = egg:PasteDeploy#prefix
56 #prefix = /<your-prefix>
56 #prefix = /<your-prefix>
57
57
58 [app:main]
58 [app:main]
59 use = egg:rhodecode
59 use = egg:rhodecode
60 ## enable proxy prefix middleware
60 ## enable proxy prefix middleware
61 #filter-with = proxy-prefix
61 #filter-with = proxy-prefix
62
62
63 full_stack = true
63 full_stack = true
64 static_files = true
64 static_files = true
65 ## Optional Languages
65 ## Optional Languages
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
67 lang = en
67 lang = en
68 cache_dir = %(here)s/data
68 cache_dir = %(here)s/data
69 index_dir = %(here)s/data/index
69 index_dir = %(here)s/data/index
70
70
71 ## perform a full repository scan on each server start, this should be
72 ## set to false after first startup, to allow faster server restarts.
73 initial_repo_scan = true
74
71 ## uncomment and set this path to use archive download cache
75 ## uncomment and set this path to use archive download cache
72 #archive_cache_dir = /tmp/tarballcache
76 #archive_cache_dir = /tmp/tarballcache
73
77
74 ## change this to unique ID for security
78 ## change this to unique ID for security
75 app_instance_uuid = rc-production
79 app_instance_uuid = rc-production
76
80
77 ## cut off limit for large diffs (size in bytes)
81 ## cut off limit for large diffs (size in bytes)
78 cut_off_limit = 256000
82 cut_off_limit = 256000
79
83
80 ## use cache version of scm repo everywhere
84 ## use cache version of scm repo everywhere
81 vcs_full_cache = true
85 vcs_full_cache = true
82
86
83 ## force https in RhodeCode, fixes https redirects, assumes it's always https
87 ## force https in RhodeCode, fixes https redirects, assumes it's always https
84 force_https = false
88 force_https = false
85
89
86 ## use Strict-Transport-Security headers
90 ## use Strict-Transport-Security headers
87 use_htsts = false
91 use_htsts = false
88
92
89 ## number of commits stats will parse on each iteration
93 ## number of commits stats will parse on each iteration
90 commit_parse_limit = 25
94 commit_parse_limit = 25
91
95
92 ## number of items displayed in lightweight dashboard before paginating is shown
96 ## number of items displayed in lightweight dashboard before paginating is shown
93 dashboard_items = 100
97 dashboard_items = 100
94
98
95 ## use gravatar service to display avatars
99 ## use gravatar service to display avatars
96 use_gravatar = true
100 use_gravatar = true
97
101
98 ## path to git executable
102 ## path to git executable
99 git_path = git
103 git_path = git
100
104
101 ## git rev filter option, --all is the default filter, if you need to
105 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
106 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
107 git_rev_filter=--all
104
108
105 ## RSS feed options
109 ## RSS feed options
106 rss_cut_off_limit = 256000
110 rss_cut_off_limit = 256000
107 rss_items_per_page = 10
111 rss_items_per_page = 10
108 rss_include_diff = false
112 rss_include_diff = false
109
113
110 ## options for showing and identifying changesets
114 ## options for showing and identifying changesets
111 show_sha_length = 12
115 show_sha_length = 12
112 show_revision_number = true
116 show_revision_number = true
113
117
114 ## white list of API enabled controllers. This allows to add list of
118 ## white list of API enabled controllers. This allows to add list of
115 ## controllers to which access will be enabled by api_key. eg: to enable
119 ## controllers to which access will be enabled by api_key. eg: to enable
116 ## api access to raw_files put `FilesController:raw`, to enable access to patches
120 ## api access to raw_files put `FilesController:raw`, to enable access to patches
117 ## add `ChangesetController:changeset_patch`. This list should be "," separated
121 ## add `ChangesetController:changeset_patch`. This list should be "," separated
118 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
122 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
119 api_access_controllers_whitelist =
123 api_access_controllers_whitelist =
120
124
121 ## alternative_gravatar_url allows you to use your own avatar server application
125 ## alternative_gravatar_url allows you to use your own avatar server application
122 ## the following parts of the URL will be replaced
126 ## the following parts of the URL will be replaced
123 ## {email} user email
127 ## {email} user email
124 ## {md5email} md5 hash of the user email (like at gravatar.com)
128 ## {md5email} md5 hash of the user email (like at gravatar.com)
125 ## {size} size of the image that is expected from the server application
129 ## {size} size of the image that is expected from the server application
126 ## {scheme} http/https from RhodeCode server
130 ## {scheme} http/https from RhodeCode server
127 ## {netloc} network location from RhodeCode server
131 ## {netloc} network location from RhodeCode server
128 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
132 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
129 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
133 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
130
134
131
135
132 ## container auth options
136 ## container auth options
133 container_auth_enabled = false
137 container_auth_enabled = false
134 proxypass_auth_enabled = false
138 proxypass_auth_enabled = false
135
139
136 ## default encoding used to convert from and to unicode
140 ## default encoding used to convert from and to unicode
137 ## can be also a comma seperated list of encoding in case of mixed encodings
141 ## can be also a comma seperated list of encoding in case of mixed encodings
138 default_encoding = utf8
142 default_encoding = utf8
139
143
140 ## overwrite schema of clone url
144 ## overwrite schema of clone url
141 ## available vars:
145 ## available vars:
142 ## scheme - http/https
146 ## scheme - http/https
143 ## user - current user
147 ## user - current user
144 ## pass - password
148 ## pass - password
145 ## netloc - network location
149 ## netloc - network location
146 ## path - usually repo_name
150 ## path - usually repo_name
147
151
148 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
152 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
149
153
150 ## issue tracking mapping for commits messages
154 ## issue tracking mapping for commits messages
151 ## comment out issue_pat, issue_server, issue_prefix to enable
155 ## comment out issue_pat, issue_server, issue_prefix to enable
152
156
153 ## pattern to get the issues from commit messages
157 ## pattern to get the issues from commit messages
154 ## default one used here is #<numbers> with a regex passive group for `#`
158 ## default one used here is #<numbers> with a regex passive group for `#`
155 ## {id} will be all groups matched from this pattern
159 ## {id} will be all groups matched from this pattern
156
160
157 issue_pat = (?:\s*#)(\d+)
161 issue_pat = (?:\s*#)(\d+)
158
162
159 ## server url to the issue, each {id} will be replaced with match
163 ## server url to the issue, each {id} will be replaced with match
160 ## fetched from the regex and {repo} is replaced with full repository name
164 ## fetched from the regex and {repo} is replaced with full repository name
161 ## including groups {repo_name} is replaced with just name of repo
165 ## including groups {repo_name} is replaced with just name of repo
162
166
163 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
167 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
164
168
165 ## prefix to add to link to indicate it's an url
169 ## prefix to add to link to indicate it's an url
166 ## #314 will be replaced by <issue_prefix><id>
170 ## #314 will be replaced by <issue_prefix><id>
167
171
168 issue_prefix = #
172 issue_prefix = #
169
173
170 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
174 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
171 ## multiple patterns, to other issues server, wiki or others
175 ## multiple patterns, to other issues server, wiki or others
172 ## below an example how to create a wiki pattern
176 ## below an example how to create a wiki pattern
173 # #wiki-some-id -> https://mywiki.com/some-id
177 # #wiki-some-id -> https://mywiki.com/some-id
174
178
175 #issue_pat_wiki = (?:wiki-)(.+)
179 #issue_pat_wiki = (?:wiki-)(.+)
176 #issue_server_link_wiki = https://mywiki.com/{id}
180 #issue_server_link_wiki = https://mywiki.com/{id}
177 #issue_prefix_wiki = WIKI-
181 #issue_prefix_wiki = WIKI-
178
182
179
183
180 ## instance-id prefix
184 ## instance-id prefix
181 ## a prefix key for this instance used for cache invalidation when running
185 ## a prefix key for this instance used for cache invalidation when running
182 ## multiple instances of rhodecode, make sure it's globally unique for
186 ## multiple instances of rhodecode, make sure it's globally unique for
183 ## all running rhodecode instances. Leave empty if you don't use it
187 ## all running rhodecode instances. Leave empty if you don't use it
184 instance_id =
188 instance_id =
185
189
186 ## alternative return HTTP header for failed authentication. Default HTTP
190 ## alternative return HTTP header for failed authentication. Default HTTP
187 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
191 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
188 ## handling that. Set this variable to 403 to return HTTPForbidden
192 ## handling that. Set this variable to 403 to return HTTPForbidden
189 auth_ret_code =
193 auth_ret_code =
190
194
191 ## locking return code. When repository is locked return this HTTP code. 2XX
195 ## locking return code. When repository is locked return this HTTP code. 2XX
192 ## codes don't break the transactions while 4XX codes do
196 ## codes don't break the transactions while 4XX codes do
193 lock_ret_code = 423
197 lock_ret_code = 423
194
198
195
199
196 ####################################
200 ####################################
197 ### CELERY CONFIG ####
201 ### CELERY CONFIG ####
198 ####################################
202 ####################################
199 use_celery = false
203 use_celery = false
200 broker.host = localhost
204 broker.host = localhost
201 broker.vhost = rabbitmqhost
205 broker.vhost = rabbitmqhost
202 broker.port = 5672
206 broker.port = 5672
203 broker.user = rabbitmq
207 broker.user = rabbitmq
204 broker.password = qweqwe
208 broker.password = qweqwe
205
209
206 celery.imports = rhodecode.lib.celerylib.tasks
210 celery.imports = rhodecode.lib.celerylib.tasks
207
211
208 celery.result.backend = amqp
212 celery.result.backend = amqp
209 celery.result.dburi = amqp://
213 celery.result.dburi = amqp://
210 celery.result.serialier = json
214 celery.result.serialier = json
211
215
212 #celery.send.task.error.emails = true
216 #celery.send.task.error.emails = true
213 #celery.amqp.task.result.expires = 18000
217 #celery.amqp.task.result.expires = 18000
214
218
215 celeryd.concurrency = 2
219 celeryd.concurrency = 2
216 #celeryd.log.file = celeryd.log
220 #celeryd.log.file = celeryd.log
217 celeryd.log.level = debug
221 celeryd.log.level = debug
218 celeryd.max.tasks.per.child = 1
222 celeryd.max.tasks.per.child = 1
219
223
220 ## tasks will never be sent to the queue, but executed locally instead.
224 ## tasks will never be sent to the queue, but executed locally instead.
221 celery.always.eager = false
225 celery.always.eager = false
222
226
223 ####################################
227 ####################################
224 ### BEAKER CACHE ####
228 ### BEAKER CACHE ####
225 ####################################
229 ####################################
226 beaker.cache.data_dir=%(here)s/data/cache/data
230 beaker.cache.data_dir=%(here)s/data/cache/data
227 beaker.cache.lock_dir=%(here)s/data/cache/lock
231 beaker.cache.lock_dir=%(here)s/data/cache/lock
228
232
229 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
233 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
230
234
231 beaker.cache.super_short_term.type=memory
235 beaker.cache.super_short_term.type=memory
232 beaker.cache.super_short_term.expire=10
236 beaker.cache.super_short_term.expire=10
233 beaker.cache.super_short_term.key_length = 256
237 beaker.cache.super_short_term.key_length = 256
234
238
235 beaker.cache.short_term.type=memory
239 beaker.cache.short_term.type=memory
236 beaker.cache.short_term.expire=60
240 beaker.cache.short_term.expire=60
237 beaker.cache.short_term.key_length = 256
241 beaker.cache.short_term.key_length = 256
238
242
239 beaker.cache.long_term.type=memory
243 beaker.cache.long_term.type=memory
240 beaker.cache.long_term.expire=36000
244 beaker.cache.long_term.expire=36000
241 beaker.cache.long_term.key_length = 256
245 beaker.cache.long_term.key_length = 256
242
246
243 beaker.cache.sql_cache_short.type=memory
247 beaker.cache.sql_cache_short.type=memory
244 beaker.cache.sql_cache_short.expire=10
248 beaker.cache.sql_cache_short.expire=10
245 beaker.cache.sql_cache_short.key_length = 256
249 beaker.cache.sql_cache_short.key_length = 256
246
250
247 beaker.cache.sql_cache_med.type=memory
251 beaker.cache.sql_cache_med.type=memory
248 beaker.cache.sql_cache_med.expire=360
252 beaker.cache.sql_cache_med.expire=360
249 beaker.cache.sql_cache_med.key_length = 256
253 beaker.cache.sql_cache_med.key_length = 256
250
254
251 beaker.cache.sql_cache_long.type=file
255 beaker.cache.sql_cache_long.type=file
252 beaker.cache.sql_cache_long.expire=3600
256 beaker.cache.sql_cache_long.expire=3600
253 beaker.cache.sql_cache_long.key_length = 256
257 beaker.cache.sql_cache_long.key_length = 256
254
258
255 ####################################
259 ####################################
256 ### BEAKER SESSION ####
260 ### BEAKER SESSION ####
257 ####################################
261 ####################################
258 ## Type of storage used for the session, current types are
262 ## Type of storage used for the session, current types are
259 ## dbm, file, memcached, database, and memory.
263 ## dbm, file, memcached, database, and memory.
260 ## The storage uses the Container API
264 ## The storage uses the Container API
261 ## that is also used by the cache system.
265 ## that is also used by the cache system.
262
266
263 ## db session ##
267 ## db session ##
264 #beaker.session.type = ext:database
268 #beaker.session.type = ext:database
265 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
269 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
266 #beaker.session.table_name = db_session
270 #beaker.session.table_name = db_session
267
271
268 ## encrypted cookie client side session, good for many instances ##
272 ## encrypted cookie client side session, good for many instances ##
269 #beaker.session.type = cookie
273 #beaker.session.type = cookie
270
274
271 ## file based cookies (default) ##
275 ## file based cookies (default) ##
272 #beaker.session.type = file
276 #beaker.session.type = file
273
277
274
278
275 beaker.session.key = rhodecode
279 beaker.session.key = rhodecode
276 ## secure cookie requires AES python libraries
280 ## secure cookie requires AES python libraries
277 #beaker.session.encrypt_key = <key_for_encryption>
281 #beaker.session.encrypt_key = <key_for_encryption>
278 #beaker.session.validate_key = <validation_key>
282 #beaker.session.validate_key = <validation_key>
279
283
280 ## sets session as invalid if it haven't been accessed for given amount of time
284 ## sets session as invalid if it haven't been accessed for given amount of time
281 beaker.session.timeout = 2592000
285 beaker.session.timeout = 2592000
282 beaker.session.httponly = true
286 beaker.session.httponly = true
283 #beaker.session.cookie_path = /<your-prefix>
287 #beaker.session.cookie_path = /<your-prefix>
284
288
285 ## uncomment for https secure cookie
289 ## uncomment for https secure cookie
286 beaker.session.secure = false
290 beaker.session.secure = false
287
291
288 ## auto save the session to not to use .save()
292 ## auto save the session to not to use .save()
289 beaker.session.auto = False
293 beaker.session.auto = False
290
294
291 ## default cookie expiration time in seconds `true` expire at browser close ##
295 ## default cookie expiration time in seconds `true` expire at browser close ##
292 #beaker.session.cookie_expires = 3600
296 #beaker.session.cookie_expires = 3600
293
297
294
298
295 ############################
299 ############################
296 ## ERROR HANDLING SYSTEMS ##
300 ## ERROR HANDLING SYSTEMS ##
297 ############################
301 ############################
298
302
299 ####################
303 ####################
300 ### [errormator] ###
304 ### [errormator] ###
301 ####################
305 ####################
302
306
303 ## Errormator is tailored to work with RhodeCode, see
307 ## Errormator is tailored to work with RhodeCode, see
304 ## http://errormator.com for details how to obtain an account
308 ## http://errormator.com for details how to obtain an account
305 ## you must install python package `errormator_client` to make it work
309 ## you must install python package `errormator_client` to make it work
306
310
307 ## errormator enabled
311 ## errormator enabled
308 errormator = false
312 errormator = false
309
313
310 errormator.server_url = https://api.errormator.com
314 errormator.server_url = https://api.errormator.com
311 errormator.api_key = YOUR_API_KEY
315 errormator.api_key = YOUR_API_KEY
312
316
313 ## TWEAK AMOUNT OF INFO SENT HERE
317 ## TWEAK AMOUNT OF INFO SENT HERE
314
318
315 ## enables 404 error logging (default False)
319 ## enables 404 error logging (default False)
316 errormator.report_404 = false
320 errormator.report_404 = false
317
321
318 ## time in seconds after request is considered being slow (default 1)
322 ## time in seconds after request is considered being slow (default 1)
319 errormator.slow_request_time = 1
323 errormator.slow_request_time = 1
320
324
321 ## record slow requests in application
325 ## record slow requests in application
322 ## (needs to be enabled for slow datastore recording and time tracking)
326 ## (needs to be enabled for slow datastore recording and time tracking)
323 errormator.slow_requests = true
327 errormator.slow_requests = true
324
328
325 ## enable hooking to application loggers
329 ## enable hooking to application loggers
326 # errormator.logging = true
330 # errormator.logging = true
327
331
328 ## minimum log level for log capture
332 ## minimum log level for log capture
329 # errormator.logging.level = WARNING
333 # errormator.logging.level = WARNING
330
334
331 ## send logs only from erroneous/slow requests
335 ## send logs only from erroneous/slow requests
332 ## (saves API quota for intensive logging)
336 ## (saves API quota for intensive logging)
333 errormator.logging_on_error = false
337 errormator.logging_on_error = false
334
338
335 ## list of additonal keywords that should be grabbed from environ object
339 ## list of additonal keywords that should be grabbed from environ object
336 ## can be string with comma separated list of words in lowercase
340 ## can be string with comma separated list of words in lowercase
337 ## (by default client will always send following info:
341 ## (by default client will always send following info:
338 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
342 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
339 ## start with HTTP* this list be extended with additional keywords here
343 ## start with HTTP* this list be extended with additional keywords here
340 errormator.environ_keys_whitelist =
344 errormator.environ_keys_whitelist =
341
345
342
346
343 ## list of keywords that should be blanked from request object
347 ## list of keywords that should be blanked from request object
344 ## can be string with comma separated list of words in lowercase
348 ## can be string with comma separated list of words in lowercase
345 ## (by default client will always blank keys that contain following words
349 ## (by default client will always blank keys that contain following words
346 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
350 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
347 ## this list be extended with additional keywords set here
351 ## this list be extended with additional keywords set here
348 errormator.request_keys_blacklist =
352 errormator.request_keys_blacklist =
349
353
350
354
351 ## list of namespaces that should be ignores when gathering log entries
355 ## list of namespaces that should be ignores when gathering log entries
352 ## can be string with comma separated list of namespaces
356 ## can be string with comma separated list of namespaces
353 ## (by default the client ignores own entries: errormator_client.client)
357 ## (by default the client ignores own entries: errormator_client.client)
354 errormator.log_namespace_blacklist =
358 errormator.log_namespace_blacklist =
355
359
356
360
357 ################
361 ################
358 ### [sentry] ###
362 ### [sentry] ###
359 ################
363 ################
360
364
361 ## sentry is a alternative open source error aggregator
365 ## sentry is a alternative open source error aggregator
362 ## you must install python packages `sentry` and `raven` to enable
366 ## you must install python packages `sentry` and `raven` to enable
363
367
364 sentry.dsn = YOUR_DNS
368 sentry.dsn = YOUR_DNS
365 sentry.servers =
369 sentry.servers =
366 sentry.name =
370 sentry.name =
367 sentry.key =
371 sentry.key =
368 sentry.public_key =
372 sentry.public_key =
369 sentry.secret_key =
373 sentry.secret_key =
370 sentry.project =
374 sentry.project =
371 sentry.site =
375 sentry.site =
372 sentry.include_paths =
376 sentry.include_paths =
373 sentry.exclude_paths =
377 sentry.exclude_paths =
374
378
375
379
376 ################################################################################
380 ################################################################################
377 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
381 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
378 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
382 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
379 ## execute malicious code after an exception is raised. ##
383 ## execute malicious code after an exception is raised. ##
380 ################################################################################
384 ################################################################################
381 #set debug = false
385 #set debug = false
382
386
383 ##################################
387 ##################################
384 ### LOGVIEW CONFIG ###
388 ### LOGVIEW CONFIG ###
385 ##################################
389 ##################################
386 logview.sqlalchemy = #faa
390 logview.sqlalchemy = #faa
387 logview.pylons.templating = #bfb
391 logview.pylons.templating = #bfb
388 logview.pylons.util = #eee
392 logview.pylons.util = #eee
389
393
390 #########################################################
394 #########################################################
391 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
395 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
392 #########################################################
396 #########################################################
393 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
397 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
394 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
398 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
395 sqlalchemy.db1.echo = false
399 sqlalchemy.db1.echo = false
396 sqlalchemy.db1.pool_recycle = 3600
400 sqlalchemy.db1.pool_recycle = 3600
397 sqlalchemy.db1.convert_unicode = true
401 sqlalchemy.db1.convert_unicode = true
398
402
399 ################################
403 ################################
400 ### LOGGING CONFIGURATION ####
404 ### LOGGING CONFIGURATION ####
401 ################################
405 ################################
402 [loggers]
406 [loggers]
403 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
407 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
404
408
405 [handlers]
409 [handlers]
406 keys = console, console_sql
410 keys = console, console_sql
407
411
408 [formatters]
412 [formatters]
409 keys = generic, color_formatter, color_formatter_sql
413 keys = generic, color_formatter, color_formatter_sql
410
414
411 #############
415 #############
412 ## LOGGERS ##
416 ## LOGGERS ##
413 #############
417 #############
414 [logger_root]
418 [logger_root]
415 level = NOTSET
419 level = NOTSET
416 handlers = console
420 handlers = console
417
421
418 [logger_routes]
422 [logger_routes]
419 level = DEBUG
423 level = DEBUG
420 handlers =
424 handlers =
421 qualname = routes.middleware
425 qualname = routes.middleware
422 ## "level = DEBUG" logs the route matched and routing variables.
426 ## "level = DEBUG" logs the route matched and routing variables.
423 propagate = 1
427 propagate = 1
424
428
425 [logger_beaker]
429 [logger_beaker]
426 level = DEBUG
430 level = DEBUG
427 handlers =
431 handlers =
428 qualname = beaker.container
432 qualname = beaker.container
429 propagate = 1
433 propagate = 1
430
434
431 [logger_templates]
435 [logger_templates]
432 level = INFO
436 level = INFO
433 handlers =
437 handlers =
434 qualname = pylons.templating
438 qualname = pylons.templating
435 propagate = 1
439 propagate = 1
436
440
437 [logger_rhodecode]
441 [logger_rhodecode]
438 level = DEBUG
442 level = DEBUG
439 handlers =
443 handlers =
440 qualname = rhodecode
444 qualname = rhodecode
441 propagate = 1
445 propagate = 1
442
446
443 [logger_sqlalchemy]
447 [logger_sqlalchemy]
444 level = INFO
448 level = INFO
445 handlers = console_sql
449 handlers = console_sql
446 qualname = sqlalchemy.engine
450 qualname = sqlalchemy.engine
447 propagate = 0
451 propagate = 0
448
452
449 [logger_whoosh_indexer]
453 [logger_whoosh_indexer]
450 level = DEBUG
454 level = DEBUG
451 handlers =
455 handlers =
452 qualname = whoosh_indexer
456 qualname = whoosh_indexer
453 propagate = 1
457 propagate = 1
454
458
455 ##############
459 ##############
456 ## HANDLERS ##
460 ## HANDLERS ##
457 ##############
461 ##############
458
462
459 [handler_console]
463 [handler_console]
460 class = StreamHandler
464 class = StreamHandler
461 args = (sys.stderr,)
465 args = (sys.stderr,)
462 level = DEBUG
466 level = DEBUG
463 formatter = color_formatter
467 formatter = color_formatter
464
468
465 [handler_console_sql]
469 [handler_console_sql]
466 class = StreamHandler
470 class = StreamHandler
467 args = (sys.stderr,)
471 args = (sys.stderr,)
468 level = DEBUG
472 level = DEBUG
469 formatter = color_formatter_sql
473 formatter = color_formatter_sql
470
474
471 ################
475 ################
472 ## FORMATTERS ##
476 ## FORMATTERS ##
473 ################
477 ################
474
478
475 [formatter_generic]
479 [formatter_generic]
476 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
480 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
477 datefmt = %Y-%m-%d %H:%M:%S
481 datefmt = %Y-%m-%d %H:%M:%S
478
482
479 [formatter_color_formatter]
483 [formatter_color_formatter]
480 class=rhodecode.lib.colored_formatter.ColorFormatter
484 class=rhodecode.lib.colored_formatter.ColorFormatter
481 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
485 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
482 datefmt = %Y-%m-%d %H:%M:%S
486 datefmt = %Y-%m-%d %H:%M:%S
483
487
484 [formatter_color_formatter_sql]
488 [formatter_color_formatter_sql]
485 class=rhodecode.lib.colored_formatter.ColorFormatterSql
489 class=rhodecode.lib.colored_formatter.ColorFormatterSql
486 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
490 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
487 datefmt = %Y-%m-%d %H:%M:%S
491 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,487 +1,491 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
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 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE
32 ## PASTE
33 ## nr of threads to spawn
33 ## nr of threads to spawn
34 #threadpool_workers = 5
34 #threadpool_workers = 5
35
35
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38
38
39 ## option to use threads of process
39 ## option to use threads of process
40 #use_threadpool = true
40 #use_threadpool = true
41
41
42 #use = egg:Paste#http
42 #use = egg:Paste#http
43
43
44 ## WAITRESS
44 ## WAITRESS
45 threads = 5
45 threads = 5
46 ## 100GB
46 ## 100GB
47 max_request_body_size = 107374182400
47 max_request_body_size = 107374182400
48 use = egg:waitress#main
48 use = egg:waitress#main
49
49
50 host = 127.0.0.1
50 host = 127.0.0.1
51 port = 8001
51 port = 8001
52
52
53 ## prefix middleware for rc
53 ## prefix middleware for rc
54 #[filter:proxy-prefix]
54 #[filter:proxy-prefix]
55 #use = egg:PasteDeploy#prefix
55 #use = egg:PasteDeploy#prefix
56 #prefix = /<your-prefix>
56 #prefix = /<your-prefix>
57
57
58 [app:main]
58 [app:main]
59 use = egg:rhodecode
59 use = egg:rhodecode
60 ## enable proxy prefix middleware
60 ## enable proxy prefix middleware
61 #filter-with = proxy-prefix
61 #filter-with = proxy-prefix
62
62
63 full_stack = true
63 full_stack = true
64 static_files = true
64 static_files = true
65 ## Optional Languages
65 ## Optional Languages
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
67 lang = en
67 lang = en
68 cache_dir = %(here)s/data
68 cache_dir = %(here)s/data
69 index_dir = %(here)s/data/index
69 index_dir = %(here)s/data/index
70
70
71 ## perform a full repository scan on each server start, this should be
72 ## set to false after first startup, to allow faster server restarts.
73 initial_repo_scan = true
74
71 ## uncomment and set this path to use archive download cache
75 ## uncomment and set this path to use archive download cache
72 #archive_cache_dir = /tmp/tarballcache
76 #archive_cache_dir = /tmp/tarballcache
73
77
74 ## change this to unique ID for security
78 ## change this to unique ID for security
75 app_instance_uuid = rc-production
79 app_instance_uuid = rc-production
76
80
77 ## cut off limit for large diffs (size in bytes)
81 ## cut off limit for large diffs (size in bytes)
78 cut_off_limit = 256000
82 cut_off_limit = 256000
79
83
80 ## use cache version of scm repo everywhere
84 ## use cache version of scm repo everywhere
81 vcs_full_cache = true
85 vcs_full_cache = true
82
86
83 ## force https in RhodeCode, fixes https redirects, assumes it's always https
87 ## force https in RhodeCode, fixes https redirects, assumes it's always https
84 force_https = false
88 force_https = false
85
89
86 ## use Strict-Transport-Security headers
90 ## use Strict-Transport-Security headers
87 use_htsts = false
91 use_htsts = false
88
92
89 ## number of commits stats will parse on each iteration
93 ## number of commits stats will parse on each iteration
90 commit_parse_limit = 25
94 commit_parse_limit = 25
91
95
92 ## number of items displayed in lightweight dashboard before paginating is shown
96 ## number of items displayed in lightweight dashboard before paginating is shown
93 dashboard_items = 100
97 dashboard_items = 100
94
98
95 ## use gravatar service to display avatars
99 ## use gravatar service to display avatars
96 use_gravatar = true
100 use_gravatar = true
97
101
98 ## path to git executable
102 ## path to git executable
99 git_path = git
103 git_path = git
100
104
101 ## git rev filter option, --all is the default filter, if you need to
105 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
106 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
107 git_rev_filter=--all
104
108
105 ## RSS feed options
109 ## RSS feed options
106 rss_cut_off_limit = 256000
110 rss_cut_off_limit = 256000
107 rss_items_per_page = 10
111 rss_items_per_page = 10
108 rss_include_diff = false
112 rss_include_diff = false
109
113
110 ## options for showing and identifying changesets
114 ## options for showing and identifying changesets
111 show_sha_length = 12
115 show_sha_length = 12
112 show_revision_number = true
116 show_revision_number = true
113
117
114 ## white list of API enabled controllers. This allows to add list of
118 ## white list of API enabled controllers. This allows to add list of
115 ## controllers to which access will be enabled by api_key. eg: to enable
119 ## controllers to which access will be enabled by api_key. eg: to enable
116 ## api access to raw_files put `FilesController:raw`, to enable access to patches
120 ## api access to raw_files put `FilesController:raw`, to enable access to patches
117 ## add `ChangesetController:changeset_patch`. This list should be "," separated
121 ## add `ChangesetController:changeset_patch`. This list should be "," separated
118 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
122 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
119 api_access_controllers_whitelist =
123 api_access_controllers_whitelist =
120
124
121 ## alternative_gravatar_url allows you to use your own avatar server application
125 ## alternative_gravatar_url allows you to use your own avatar server application
122 ## the following parts of the URL will be replaced
126 ## the following parts of the URL will be replaced
123 ## {email} user email
127 ## {email} user email
124 ## {md5email} md5 hash of the user email (like at gravatar.com)
128 ## {md5email} md5 hash of the user email (like at gravatar.com)
125 ## {size} size of the image that is expected from the server application
129 ## {size} size of the image that is expected from the server application
126 ## {scheme} http/https from RhodeCode server
130 ## {scheme} http/https from RhodeCode server
127 ## {netloc} network location from RhodeCode server
131 ## {netloc} network location from RhodeCode server
128 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
132 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
129 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
133 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
130
134
131
135
132 ## container auth options
136 ## container auth options
133 container_auth_enabled = false
137 container_auth_enabled = false
134 proxypass_auth_enabled = false
138 proxypass_auth_enabled = false
135
139
136 ## default encoding used to convert from and to unicode
140 ## default encoding used to convert from and to unicode
137 ## can be also a comma seperated list of encoding in case of mixed encodings
141 ## can be also a comma seperated list of encoding in case of mixed encodings
138 default_encoding = utf8
142 default_encoding = utf8
139
143
140 ## overwrite schema of clone url
144 ## overwrite schema of clone url
141 ## available vars:
145 ## available vars:
142 ## scheme - http/https
146 ## scheme - http/https
143 ## user - current user
147 ## user - current user
144 ## pass - password
148 ## pass - password
145 ## netloc - network location
149 ## netloc - network location
146 ## path - usually repo_name
150 ## path - usually repo_name
147
151
148 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
152 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
149
153
150 ## issue tracking mapping for commits messages
154 ## issue tracking mapping for commits messages
151 ## comment out issue_pat, issue_server, issue_prefix to enable
155 ## comment out issue_pat, issue_server, issue_prefix to enable
152
156
153 ## pattern to get the issues from commit messages
157 ## pattern to get the issues from commit messages
154 ## default one used here is #<numbers> with a regex passive group for `#`
158 ## default one used here is #<numbers> with a regex passive group for `#`
155 ## {id} will be all groups matched from this pattern
159 ## {id} will be all groups matched from this pattern
156
160
157 issue_pat = (?:\s*#)(\d+)
161 issue_pat = (?:\s*#)(\d+)
158
162
159 ## server url to the issue, each {id} will be replaced with match
163 ## server url to the issue, each {id} will be replaced with match
160 ## fetched from the regex and {repo} is replaced with full repository name
164 ## fetched from the regex and {repo} is replaced with full repository name
161 ## including groups {repo_name} is replaced with just name of repo
165 ## including groups {repo_name} is replaced with just name of repo
162
166
163 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
167 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
164
168
165 ## prefix to add to link to indicate it's an url
169 ## prefix to add to link to indicate it's an url
166 ## #314 will be replaced by <issue_prefix><id>
170 ## #314 will be replaced by <issue_prefix><id>
167
171
168 issue_prefix = #
172 issue_prefix = #
169
173
170 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
174 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
171 ## multiple patterns, to other issues server, wiki or others
175 ## multiple patterns, to other issues server, wiki or others
172 ## below an example how to create a wiki pattern
176 ## below an example how to create a wiki pattern
173 # #wiki-some-id -> https://mywiki.com/some-id
177 # #wiki-some-id -> https://mywiki.com/some-id
174
178
175 #issue_pat_wiki = (?:wiki-)(.+)
179 #issue_pat_wiki = (?:wiki-)(.+)
176 #issue_server_link_wiki = https://mywiki.com/{id}
180 #issue_server_link_wiki = https://mywiki.com/{id}
177 #issue_prefix_wiki = WIKI-
181 #issue_prefix_wiki = WIKI-
178
182
179
183
180 ## instance-id prefix
184 ## instance-id prefix
181 ## a prefix key for this instance used for cache invalidation when running
185 ## a prefix key for this instance used for cache invalidation when running
182 ## multiple instances of rhodecode, make sure it's globally unique for
186 ## multiple instances of rhodecode, make sure it's globally unique for
183 ## all running rhodecode instances. Leave empty if you don't use it
187 ## all running rhodecode instances. Leave empty if you don't use it
184 instance_id =
188 instance_id =
185
189
186 ## alternative return HTTP header for failed authentication. Default HTTP
190 ## alternative return HTTP header for failed authentication. Default HTTP
187 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
191 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
188 ## handling that. Set this variable to 403 to return HTTPForbidden
192 ## handling that. Set this variable to 403 to return HTTPForbidden
189 auth_ret_code =
193 auth_ret_code =
190
194
191 ## locking return code. When repository is locked return this HTTP code. 2XX
195 ## locking return code. When repository is locked return this HTTP code. 2XX
192 ## codes don't break the transactions while 4XX codes do
196 ## codes don't break the transactions while 4XX codes do
193 lock_ret_code = 423
197 lock_ret_code = 423
194
198
195
199
196 ####################################
200 ####################################
197 ### CELERY CONFIG ####
201 ### CELERY CONFIG ####
198 ####################################
202 ####################################
199 use_celery = false
203 use_celery = false
200 broker.host = localhost
204 broker.host = localhost
201 broker.vhost = rabbitmqhost
205 broker.vhost = rabbitmqhost
202 broker.port = 5672
206 broker.port = 5672
203 broker.user = rabbitmq
207 broker.user = rabbitmq
204 broker.password = qweqwe
208 broker.password = qweqwe
205
209
206 celery.imports = rhodecode.lib.celerylib.tasks
210 celery.imports = rhodecode.lib.celerylib.tasks
207
211
208 celery.result.backend = amqp
212 celery.result.backend = amqp
209 celery.result.dburi = amqp://
213 celery.result.dburi = amqp://
210 celery.result.serialier = json
214 celery.result.serialier = json
211
215
212 #celery.send.task.error.emails = true
216 #celery.send.task.error.emails = true
213 #celery.amqp.task.result.expires = 18000
217 #celery.amqp.task.result.expires = 18000
214
218
215 celeryd.concurrency = 2
219 celeryd.concurrency = 2
216 #celeryd.log.file = celeryd.log
220 #celeryd.log.file = celeryd.log
217 celeryd.log.level = debug
221 celeryd.log.level = debug
218 celeryd.max.tasks.per.child = 1
222 celeryd.max.tasks.per.child = 1
219
223
220 ## tasks will never be sent to the queue, but executed locally instead.
224 ## tasks will never be sent to the queue, but executed locally instead.
221 celery.always.eager = false
225 celery.always.eager = false
222
226
223 ####################################
227 ####################################
224 ### BEAKER CACHE ####
228 ### BEAKER CACHE ####
225 ####################################
229 ####################################
226 beaker.cache.data_dir=%(here)s/data/cache/data
230 beaker.cache.data_dir=%(here)s/data/cache/data
227 beaker.cache.lock_dir=%(here)s/data/cache/lock
231 beaker.cache.lock_dir=%(here)s/data/cache/lock
228
232
229 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
233 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
230
234
231 beaker.cache.super_short_term.type=memory
235 beaker.cache.super_short_term.type=memory
232 beaker.cache.super_short_term.expire=10
236 beaker.cache.super_short_term.expire=10
233 beaker.cache.super_short_term.key_length = 256
237 beaker.cache.super_short_term.key_length = 256
234
238
235 beaker.cache.short_term.type=memory
239 beaker.cache.short_term.type=memory
236 beaker.cache.short_term.expire=60
240 beaker.cache.short_term.expire=60
237 beaker.cache.short_term.key_length = 256
241 beaker.cache.short_term.key_length = 256
238
242
239 beaker.cache.long_term.type=memory
243 beaker.cache.long_term.type=memory
240 beaker.cache.long_term.expire=36000
244 beaker.cache.long_term.expire=36000
241 beaker.cache.long_term.key_length = 256
245 beaker.cache.long_term.key_length = 256
242
246
243 beaker.cache.sql_cache_short.type=memory
247 beaker.cache.sql_cache_short.type=memory
244 beaker.cache.sql_cache_short.expire=10
248 beaker.cache.sql_cache_short.expire=10
245 beaker.cache.sql_cache_short.key_length = 256
249 beaker.cache.sql_cache_short.key_length = 256
246
250
247 beaker.cache.sql_cache_med.type=memory
251 beaker.cache.sql_cache_med.type=memory
248 beaker.cache.sql_cache_med.expire=360
252 beaker.cache.sql_cache_med.expire=360
249 beaker.cache.sql_cache_med.key_length = 256
253 beaker.cache.sql_cache_med.key_length = 256
250
254
251 beaker.cache.sql_cache_long.type=file
255 beaker.cache.sql_cache_long.type=file
252 beaker.cache.sql_cache_long.expire=3600
256 beaker.cache.sql_cache_long.expire=3600
253 beaker.cache.sql_cache_long.key_length = 256
257 beaker.cache.sql_cache_long.key_length = 256
254
258
255 ####################################
259 ####################################
256 ### BEAKER SESSION ####
260 ### BEAKER SESSION ####
257 ####################################
261 ####################################
258 ## Type of storage used for the session, current types are
262 ## Type of storage used for the session, current types are
259 ## dbm, file, memcached, database, and memory.
263 ## dbm, file, memcached, database, and memory.
260 ## The storage uses the Container API
264 ## The storage uses the Container API
261 ## that is also used by the cache system.
265 ## that is also used by the cache system.
262
266
263 ## db session ##
267 ## db session ##
264 #beaker.session.type = ext:database
268 #beaker.session.type = ext:database
265 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
269 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
266 #beaker.session.table_name = db_session
270 #beaker.session.table_name = db_session
267
271
268 ## encrypted cookie client side session, good for many instances ##
272 ## encrypted cookie client side session, good for many instances ##
269 #beaker.session.type = cookie
273 #beaker.session.type = cookie
270
274
271 ## file based cookies (default) ##
275 ## file based cookies (default) ##
272 #beaker.session.type = file
276 #beaker.session.type = file
273
277
274
278
275 beaker.session.key = rhodecode
279 beaker.session.key = rhodecode
276 ## secure cookie requires AES python libraries
280 ## secure cookie requires AES python libraries
277 #beaker.session.encrypt_key = <key_for_encryption>
281 #beaker.session.encrypt_key = <key_for_encryption>
278 #beaker.session.validate_key = <validation_key>
282 #beaker.session.validate_key = <validation_key>
279
283
280 ## sets session as invalid if it haven't been accessed for given amount of time
284 ## sets session as invalid if it haven't been accessed for given amount of time
281 beaker.session.timeout = 2592000
285 beaker.session.timeout = 2592000
282 beaker.session.httponly = true
286 beaker.session.httponly = true
283 #beaker.session.cookie_path = /<your-prefix>
287 #beaker.session.cookie_path = /<your-prefix>
284
288
285 ## uncomment for https secure cookie
289 ## uncomment for https secure cookie
286 beaker.session.secure = false
290 beaker.session.secure = false
287
291
288 ## auto save the session to not to use .save()
292 ## auto save the session to not to use .save()
289 beaker.session.auto = False
293 beaker.session.auto = False
290
294
291 ## default cookie expiration time in seconds `true` expire at browser close ##
295 ## default cookie expiration time in seconds `true` expire at browser close ##
292 #beaker.session.cookie_expires = 3600
296 #beaker.session.cookie_expires = 3600
293
297
294
298
295 ############################
299 ############################
296 ## ERROR HANDLING SYSTEMS ##
300 ## ERROR HANDLING SYSTEMS ##
297 ############################
301 ############################
298
302
299 ####################
303 ####################
300 ### [errormator] ###
304 ### [errormator] ###
301 ####################
305 ####################
302
306
303 ## Errormator is tailored to work with RhodeCode, see
307 ## Errormator is tailored to work with RhodeCode, see
304 ## http://errormator.com for details how to obtain an account
308 ## http://errormator.com for details how to obtain an account
305 ## you must install python package `errormator_client` to make it work
309 ## you must install python package `errormator_client` to make it work
306
310
307 ## errormator enabled
311 ## errormator enabled
308 errormator = false
312 errormator = false
309
313
310 errormator.server_url = https://api.errormator.com
314 errormator.server_url = https://api.errormator.com
311 errormator.api_key = YOUR_API_KEY
315 errormator.api_key = YOUR_API_KEY
312
316
313 ## TWEAK AMOUNT OF INFO SENT HERE
317 ## TWEAK AMOUNT OF INFO SENT HERE
314
318
315 ## enables 404 error logging (default False)
319 ## enables 404 error logging (default False)
316 errormator.report_404 = false
320 errormator.report_404 = false
317
321
318 ## time in seconds after request is considered being slow (default 1)
322 ## time in seconds after request is considered being slow (default 1)
319 errormator.slow_request_time = 1
323 errormator.slow_request_time = 1
320
324
321 ## record slow requests in application
325 ## record slow requests in application
322 ## (needs to be enabled for slow datastore recording and time tracking)
326 ## (needs to be enabled for slow datastore recording and time tracking)
323 errormator.slow_requests = true
327 errormator.slow_requests = true
324
328
325 ## enable hooking to application loggers
329 ## enable hooking to application loggers
326 # errormator.logging = true
330 # errormator.logging = true
327
331
328 ## minimum log level for log capture
332 ## minimum log level for log capture
329 # errormator.logging.level = WARNING
333 # errormator.logging.level = WARNING
330
334
331 ## send logs only from erroneous/slow requests
335 ## send logs only from erroneous/slow requests
332 ## (saves API quota for intensive logging)
336 ## (saves API quota for intensive logging)
333 errormator.logging_on_error = false
337 errormator.logging_on_error = false
334
338
335 ## list of additonal keywords that should be grabbed from environ object
339 ## list of additonal keywords that should be grabbed from environ object
336 ## can be string with comma separated list of words in lowercase
340 ## can be string with comma separated list of words in lowercase
337 ## (by default client will always send following info:
341 ## (by default client will always send following info:
338 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
342 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
339 ## start with HTTP* this list be extended with additional keywords here
343 ## start with HTTP* this list be extended with additional keywords here
340 errormator.environ_keys_whitelist =
344 errormator.environ_keys_whitelist =
341
345
342
346
343 ## list of keywords that should be blanked from request object
347 ## list of keywords that should be blanked from request object
344 ## can be string with comma separated list of words in lowercase
348 ## can be string with comma separated list of words in lowercase
345 ## (by default client will always blank keys that contain following words
349 ## (by default client will always blank keys that contain following words
346 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
350 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
347 ## this list be extended with additional keywords set here
351 ## this list be extended with additional keywords set here
348 errormator.request_keys_blacklist =
352 errormator.request_keys_blacklist =
349
353
350
354
351 ## list of namespaces that should be ignores when gathering log entries
355 ## list of namespaces that should be ignores when gathering log entries
352 ## can be string with comma separated list of namespaces
356 ## can be string with comma separated list of namespaces
353 ## (by default the client ignores own entries: errormator_client.client)
357 ## (by default the client ignores own entries: errormator_client.client)
354 errormator.log_namespace_blacklist =
358 errormator.log_namespace_blacklist =
355
359
356
360
357 ################
361 ################
358 ### [sentry] ###
362 ### [sentry] ###
359 ################
363 ################
360
364
361 ## sentry is a alternative open source error aggregator
365 ## sentry is a alternative open source error aggregator
362 ## you must install python packages `sentry` and `raven` to enable
366 ## you must install python packages `sentry` and `raven` to enable
363
367
364 sentry.dsn = YOUR_DNS
368 sentry.dsn = YOUR_DNS
365 sentry.servers =
369 sentry.servers =
366 sentry.name =
370 sentry.name =
367 sentry.key =
371 sentry.key =
368 sentry.public_key =
372 sentry.public_key =
369 sentry.secret_key =
373 sentry.secret_key =
370 sentry.project =
374 sentry.project =
371 sentry.site =
375 sentry.site =
372 sentry.include_paths =
376 sentry.include_paths =
373 sentry.exclude_paths =
377 sentry.exclude_paths =
374
378
375
379
376 ################################################################################
380 ################################################################################
377 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
381 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
378 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
382 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
379 ## execute malicious code after an exception is raised. ##
383 ## execute malicious code after an exception is raised. ##
380 ################################################################################
384 ################################################################################
381 set debug = false
385 set debug = false
382
386
383 ##################################
387 ##################################
384 ### LOGVIEW CONFIG ###
388 ### LOGVIEW CONFIG ###
385 ##################################
389 ##################################
386 logview.sqlalchemy = #faa
390 logview.sqlalchemy = #faa
387 logview.pylons.templating = #bfb
391 logview.pylons.templating = #bfb
388 logview.pylons.util = #eee
392 logview.pylons.util = #eee
389
393
390 #########################################################
394 #########################################################
391 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
395 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
392 #########################################################
396 #########################################################
393 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
397 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
394 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
398 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
395 sqlalchemy.db1.echo = false
399 sqlalchemy.db1.echo = false
396 sqlalchemy.db1.pool_recycle = 3600
400 sqlalchemy.db1.pool_recycle = 3600
397 sqlalchemy.db1.convert_unicode = true
401 sqlalchemy.db1.convert_unicode = true
398
402
399 ################################
403 ################################
400 ### LOGGING CONFIGURATION ####
404 ### LOGGING CONFIGURATION ####
401 ################################
405 ################################
402 [loggers]
406 [loggers]
403 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
407 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
404
408
405 [handlers]
409 [handlers]
406 keys = console, console_sql
410 keys = console, console_sql
407
411
408 [formatters]
412 [formatters]
409 keys = generic, color_formatter, color_formatter_sql
413 keys = generic, color_formatter, color_formatter_sql
410
414
411 #############
415 #############
412 ## LOGGERS ##
416 ## LOGGERS ##
413 #############
417 #############
414 [logger_root]
418 [logger_root]
415 level = NOTSET
419 level = NOTSET
416 handlers = console
420 handlers = console
417
421
418 [logger_routes]
422 [logger_routes]
419 level = DEBUG
423 level = DEBUG
420 handlers =
424 handlers =
421 qualname = routes.middleware
425 qualname = routes.middleware
422 ## "level = DEBUG" logs the route matched and routing variables.
426 ## "level = DEBUG" logs the route matched and routing variables.
423 propagate = 1
427 propagate = 1
424
428
425 [logger_beaker]
429 [logger_beaker]
426 level = DEBUG
430 level = DEBUG
427 handlers =
431 handlers =
428 qualname = beaker.container
432 qualname = beaker.container
429 propagate = 1
433 propagate = 1
430
434
431 [logger_templates]
435 [logger_templates]
432 level = INFO
436 level = INFO
433 handlers =
437 handlers =
434 qualname = pylons.templating
438 qualname = pylons.templating
435 propagate = 1
439 propagate = 1
436
440
437 [logger_rhodecode]
441 [logger_rhodecode]
438 level = DEBUG
442 level = DEBUG
439 handlers =
443 handlers =
440 qualname = rhodecode
444 qualname = rhodecode
441 propagate = 1
445 propagate = 1
442
446
443 [logger_sqlalchemy]
447 [logger_sqlalchemy]
444 level = INFO
448 level = INFO
445 handlers = console_sql
449 handlers = console_sql
446 qualname = sqlalchemy.engine
450 qualname = sqlalchemy.engine
447 propagate = 0
451 propagate = 0
448
452
449 [logger_whoosh_indexer]
453 [logger_whoosh_indexer]
450 level = DEBUG
454 level = DEBUG
451 handlers =
455 handlers =
452 qualname = whoosh_indexer
456 qualname = whoosh_indexer
453 propagate = 1
457 propagate = 1
454
458
455 ##############
459 ##############
456 ## HANDLERS ##
460 ## HANDLERS ##
457 ##############
461 ##############
458
462
459 [handler_console]
463 [handler_console]
460 class = StreamHandler
464 class = StreamHandler
461 args = (sys.stderr,)
465 args = (sys.stderr,)
462 level = INFO
466 level = INFO
463 formatter = generic
467 formatter = generic
464
468
465 [handler_console_sql]
469 [handler_console_sql]
466 class = StreamHandler
470 class = StreamHandler
467 args = (sys.stderr,)
471 args = (sys.stderr,)
468 level = WARN
472 level = WARN
469 formatter = generic
473 formatter = generic
470
474
471 ################
475 ################
472 ## FORMATTERS ##
476 ## FORMATTERS ##
473 ################
477 ################
474
478
475 [formatter_generic]
479 [formatter_generic]
476 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
480 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
477 datefmt = %Y-%m-%d %H:%M:%S
481 datefmt = %Y-%m-%d %H:%M:%S
478
482
479 [formatter_color_formatter]
483 [formatter_color_formatter]
480 class=rhodecode.lib.colored_formatter.ColorFormatter
484 class=rhodecode.lib.colored_formatter.ColorFormatter
481 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
485 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
482 datefmt = %Y-%m-%d %H:%M:%S
486 datefmt = %Y-%m-%d %H:%M:%S
483
487
484 [formatter_color_formatter_sql]
488 [formatter_color_formatter_sql]
485 class=rhodecode.lib.colored_formatter.ColorFormatterSql
489 class=rhodecode.lib.colored_formatter.ColorFormatterSql
486 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
490 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
487 datefmt = %Y-%m-%d %H:%M:%S
491 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,497 +1,501 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
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 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE
32 ## PASTE
33 ## nr of threads to spawn
33 ## nr of threads to spawn
34 #threadpool_workers = 5
34 #threadpool_workers = 5
35
35
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38
38
39 ## option to use threads of process
39 ## option to use threads of process
40 #use_threadpool = true
40 #use_threadpool = true
41
41
42 #use = egg:Paste#http
42 #use = egg:Paste#http
43
43
44 ## WAITRESS
44 ## WAITRESS
45 threads = 5
45 threads = 5
46 ## 100GB
46 ## 100GB
47 max_request_body_size = 107374182400
47 max_request_body_size = 107374182400
48 use = egg:waitress#main
48 use = egg:waitress#main
49
49
50 host = 127.0.0.1
50 host = 127.0.0.1
51 port = 5000
51 port = 5000
52
52
53 ## prefix middleware for rc
53 ## prefix middleware for rc
54 #[filter:proxy-prefix]
54 #[filter:proxy-prefix]
55 #use = egg:PasteDeploy#prefix
55 #use = egg:PasteDeploy#prefix
56 #prefix = /<your-prefix>
56 #prefix = /<your-prefix>
57
57
58 [app:main]
58 [app:main]
59 use = egg:rhodecode
59 use = egg:rhodecode
60 ## enable proxy prefix middleware
60 ## enable proxy prefix middleware
61 #filter-with = proxy-prefix
61 #filter-with = proxy-prefix
62
62
63 full_stack = true
63 full_stack = true
64 static_files = true
64 static_files = true
65 ## Optional Languages
65 ## Optional Languages
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
67 lang = en
67 lang = en
68 cache_dir = %(here)s/data
68 cache_dir = %(here)s/data
69 index_dir = %(here)s/data/index
69 index_dir = %(here)s/data/index
70
70
71 ## perform a full repository scan on each server start, this should be
72 ## set to false after first startup, to allow faster server restarts.
73 initial_repo_scan = true
74
71 ## uncomment and set this path to use archive download cache
75 ## uncomment and set this path to use archive download cache
72 #archive_cache_dir = /tmp/tarballcache
76 #archive_cache_dir = /tmp/tarballcache
73
77
74 ## change this to unique ID for security
78 ## change this to unique ID for security
75 app_instance_uuid = ${app_instance_uuid}
79 app_instance_uuid = ${app_instance_uuid}
76
80
77 ## cut off limit for large diffs (size in bytes)
81 ## cut off limit for large diffs (size in bytes)
78 cut_off_limit = 256000
82 cut_off_limit = 256000
79
83
80 ## use cache version of scm repo everywhere
84 ## use cache version of scm repo everywhere
81 vcs_full_cache = true
85 vcs_full_cache = true
82
86
83 ## force https in RhodeCode, fixes https redirects, assumes it's always https
87 ## force https in RhodeCode, fixes https redirects, assumes it's always https
84 force_https = false
88 force_https = false
85
89
86 ## use Strict-Transport-Security headers
90 ## use Strict-Transport-Security headers
87 use_htsts = false
91 use_htsts = false
88
92
89 ## number of commits stats will parse on each iteration
93 ## number of commits stats will parse on each iteration
90 commit_parse_limit = 25
94 commit_parse_limit = 25
91
95
92 ## number of items displayed in lightweight dashboard before paginating is shown
96 ## number of items displayed in lightweight dashboard before paginating is shown
93 dashboard_items = 100
97 dashboard_items = 100
94
98
95 ## use gravatar service to display avatars
99 ## use gravatar service to display avatars
96 use_gravatar = true
100 use_gravatar = true
97
101
98 ## path to git executable
102 ## path to git executable
99 git_path = git
103 git_path = git
100
104
101 ## git rev filter option, --all is the default filter, if you need to
105 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
106 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
107 git_rev_filter=--all
104
108
105 ## RSS feed options
109 ## RSS feed options
106 rss_cut_off_limit = 256000
110 rss_cut_off_limit = 256000
107 rss_items_per_page = 10
111 rss_items_per_page = 10
108 rss_include_diff = false
112 rss_include_diff = false
109
113
110 ## options for showing and identifying changesets
114 ## options for showing and identifying changesets
111 show_sha_length = 12
115 show_sha_length = 12
112 show_revision_number = true
116 show_revision_number = true
113
117
114 ## white list of API enabled controllers. This allows to add list of
118 ## white list of API enabled controllers. This allows to add list of
115 ## controllers to which access will be enabled by api_key. eg: to enable
119 ## controllers to which access will be enabled by api_key. eg: to enable
116 ## api access to raw_files put `FilesController:raw`, to enable access to patches
120 ## api access to raw_files put `FilesController:raw`, to enable access to patches
117 ## add `ChangesetController:changeset_patch`. This list should be "," separated
121 ## add `ChangesetController:changeset_patch`. This list should be "," separated
118 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
122 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
119 api_access_controllers_whitelist =
123 api_access_controllers_whitelist =
120
124
121 ## alternative_gravatar_url allows you to use your own avatar server application
125 ## alternative_gravatar_url allows you to use your own avatar server application
122 ## the following parts of the URL will be replaced
126 ## the following parts of the URL will be replaced
123 ## {email} user email
127 ## {email} user email
124 ## {md5email} md5 hash of the user email (like at gravatar.com)
128 ## {md5email} md5 hash of the user email (like at gravatar.com)
125 ## {size} size of the image that is expected from the server application
129 ## {size} size of the image that is expected from the server application
126 ## {scheme} http/https from RhodeCode server
130 ## {scheme} http/https from RhodeCode server
127 ## {netloc} network location from RhodeCode server
131 ## {netloc} network location from RhodeCode server
128 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
132 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
129 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
133 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
130
134
131
135
132 ## container auth options
136 ## container auth options
133 container_auth_enabled = false
137 container_auth_enabled = false
134 proxypass_auth_enabled = false
138 proxypass_auth_enabled = false
135
139
136 ## default encoding used to convert from and to unicode
140 ## default encoding used to convert from and to unicode
137 ## can be also a comma seperated list of encoding in case of mixed encodings
141 ## can be also a comma seperated list of encoding in case of mixed encodings
138 default_encoding = utf8
142 default_encoding = utf8
139
143
140 ## overwrite schema of clone url
144 ## overwrite schema of clone url
141 ## available vars:
145 ## available vars:
142 ## scheme - http/https
146 ## scheme - http/https
143 ## user - current user
147 ## user - current user
144 ## pass - password
148 ## pass - password
145 ## netloc - network location
149 ## netloc - network location
146 ## path - usually repo_name
150 ## path - usually repo_name
147
151
148 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
152 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
149
153
150 ## issue tracking mapping for commits messages
154 ## issue tracking mapping for commits messages
151 ## comment out issue_pat, issue_server, issue_prefix to enable
155 ## comment out issue_pat, issue_server, issue_prefix to enable
152
156
153 ## pattern to get the issues from commit messages
157 ## pattern to get the issues from commit messages
154 ## default one used here is #<numbers> with a regex passive group for `#`
158 ## default one used here is #<numbers> with a regex passive group for `#`
155 ## {id} will be all groups matched from this pattern
159 ## {id} will be all groups matched from this pattern
156
160
157 issue_pat = (?:\s*#)(\d+)
161 issue_pat = (?:\s*#)(\d+)
158
162
159 ## server url to the issue, each {id} will be replaced with match
163 ## server url to the issue, each {id} will be replaced with match
160 ## fetched from the regex and {repo} is replaced with full repository name
164 ## fetched from the regex and {repo} is replaced with full repository name
161 ## including groups {repo_name} is replaced with just name of repo
165 ## including groups {repo_name} is replaced with just name of repo
162
166
163 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
167 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
164
168
165 ## prefix to add to link to indicate it's an url
169 ## prefix to add to link to indicate it's an url
166 ## #314 will be replaced by <issue_prefix><id>
170 ## #314 will be replaced by <issue_prefix><id>
167
171
168 issue_prefix = #
172 issue_prefix = #
169
173
170 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
174 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
171 ## multiple patterns, to other issues server, wiki or others
175 ## multiple patterns, to other issues server, wiki or others
172 ## below an example how to create a wiki pattern
176 ## below an example how to create a wiki pattern
173 # #wiki-some-id -> https://mywiki.com/some-id
177 # #wiki-some-id -> https://mywiki.com/some-id
174
178
175 #issue_pat_wiki = (?:wiki-)(.+)
179 #issue_pat_wiki = (?:wiki-)(.+)
176 #issue_server_link_wiki = https://mywiki.com/{id}
180 #issue_server_link_wiki = https://mywiki.com/{id}
177 #issue_prefix_wiki = WIKI-
181 #issue_prefix_wiki = WIKI-
178
182
179
183
180 ## instance-id prefix
184 ## instance-id prefix
181 ## a prefix key for this instance used for cache invalidation when running
185 ## a prefix key for this instance used for cache invalidation when running
182 ## multiple instances of rhodecode, make sure it's globally unique for
186 ## multiple instances of rhodecode, make sure it's globally unique for
183 ## all running rhodecode instances. Leave empty if you don't use it
187 ## all running rhodecode instances. Leave empty if you don't use it
184 instance_id =
188 instance_id =
185
189
186 ## alternative return HTTP header for failed authentication. Default HTTP
190 ## alternative return HTTP header for failed authentication. Default HTTP
187 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
191 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
188 ## handling that. Set this variable to 403 to return HTTPForbidden
192 ## handling that. Set this variable to 403 to return HTTPForbidden
189 auth_ret_code =
193 auth_ret_code =
190
194
191 ## locking return code. When repository is locked return this HTTP code. 2XX
195 ## locking return code. When repository is locked return this HTTP code. 2XX
192 ## codes don't break the transactions while 4XX codes do
196 ## codes don't break the transactions while 4XX codes do
193 lock_ret_code = 423
197 lock_ret_code = 423
194
198
195
199
196 ####################################
200 ####################################
197 ### CELERY CONFIG ####
201 ### CELERY CONFIG ####
198 ####################################
202 ####################################
199 use_celery = false
203 use_celery = false
200 broker.host = localhost
204 broker.host = localhost
201 broker.vhost = rabbitmqhost
205 broker.vhost = rabbitmqhost
202 broker.port = 5672
206 broker.port = 5672
203 broker.user = rabbitmq
207 broker.user = rabbitmq
204 broker.password = qweqwe
208 broker.password = qweqwe
205
209
206 celery.imports = rhodecode.lib.celerylib.tasks
210 celery.imports = rhodecode.lib.celerylib.tasks
207
211
208 celery.result.backend = amqp
212 celery.result.backend = amqp
209 celery.result.dburi = amqp://
213 celery.result.dburi = amqp://
210 celery.result.serialier = json
214 celery.result.serialier = json
211
215
212 #celery.send.task.error.emails = true
216 #celery.send.task.error.emails = true
213 #celery.amqp.task.result.expires = 18000
217 #celery.amqp.task.result.expires = 18000
214
218
215 celeryd.concurrency = 2
219 celeryd.concurrency = 2
216 #celeryd.log.file = celeryd.log
220 #celeryd.log.file = celeryd.log
217 celeryd.log.level = debug
221 celeryd.log.level = debug
218 celeryd.max.tasks.per.child = 1
222 celeryd.max.tasks.per.child = 1
219
223
220 ## tasks will never be sent to the queue, but executed locally instead.
224 ## tasks will never be sent to the queue, but executed locally instead.
221 celery.always.eager = false
225 celery.always.eager = false
222
226
223 ####################################
227 ####################################
224 ### BEAKER CACHE ####
228 ### BEAKER CACHE ####
225 ####################################
229 ####################################
226 beaker.cache.data_dir=%(here)s/data/cache/data
230 beaker.cache.data_dir=%(here)s/data/cache/data
227 beaker.cache.lock_dir=%(here)s/data/cache/lock
231 beaker.cache.lock_dir=%(here)s/data/cache/lock
228
232
229 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
233 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
230
234
231 beaker.cache.super_short_term.type=memory
235 beaker.cache.super_short_term.type=memory
232 beaker.cache.super_short_term.expire=10
236 beaker.cache.super_short_term.expire=10
233 beaker.cache.super_short_term.key_length = 256
237 beaker.cache.super_short_term.key_length = 256
234
238
235 beaker.cache.short_term.type=memory
239 beaker.cache.short_term.type=memory
236 beaker.cache.short_term.expire=60
240 beaker.cache.short_term.expire=60
237 beaker.cache.short_term.key_length = 256
241 beaker.cache.short_term.key_length = 256
238
242
239 beaker.cache.long_term.type=memory
243 beaker.cache.long_term.type=memory
240 beaker.cache.long_term.expire=36000
244 beaker.cache.long_term.expire=36000
241 beaker.cache.long_term.key_length = 256
245 beaker.cache.long_term.key_length = 256
242
246
243 beaker.cache.sql_cache_short.type=memory
247 beaker.cache.sql_cache_short.type=memory
244 beaker.cache.sql_cache_short.expire=10
248 beaker.cache.sql_cache_short.expire=10
245 beaker.cache.sql_cache_short.key_length = 256
249 beaker.cache.sql_cache_short.key_length = 256
246
250
247 beaker.cache.sql_cache_med.type=memory
251 beaker.cache.sql_cache_med.type=memory
248 beaker.cache.sql_cache_med.expire=360
252 beaker.cache.sql_cache_med.expire=360
249 beaker.cache.sql_cache_med.key_length = 256
253 beaker.cache.sql_cache_med.key_length = 256
250
254
251 beaker.cache.sql_cache_long.type=file
255 beaker.cache.sql_cache_long.type=file
252 beaker.cache.sql_cache_long.expire=3600
256 beaker.cache.sql_cache_long.expire=3600
253 beaker.cache.sql_cache_long.key_length = 256
257 beaker.cache.sql_cache_long.key_length = 256
254
258
255 ####################################
259 ####################################
256 ### BEAKER SESSION ####
260 ### BEAKER SESSION ####
257 ####################################
261 ####################################
258 ## Type of storage used for the session, current types are
262 ## Type of storage used for the session, current types are
259 ## dbm, file, memcached, database, and memory.
263 ## dbm, file, memcached, database, and memory.
260 ## The storage uses the Container API
264 ## The storage uses the Container API
261 ## that is also used by the cache system.
265 ## that is also used by the cache system.
262
266
263 ## db session ##
267 ## db session ##
264 #beaker.session.type = ext:database
268 #beaker.session.type = ext:database
265 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
269 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
266 #beaker.session.table_name = db_session
270 #beaker.session.table_name = db_session
267
271
268 ## encrypted cookie client side session, good for many instances ##
272 ## encrypted cookie client side session, good for many instances ##
269 #beaker.session.type = cookie
273 #beaker.session.type = cookie
270
274
271 ## file based cookies (default) ##
275 ## file based cookies (default) ##
272 #beaker.session.type = file
276 #beaker.session.type = file
273
277
274
278
275 beaker.session.key = rhodecode
279 beaker.session.key = rhodecode
276 ## secure cookie requires AES python libraries
280 ## secure cookie requires AES python libraries
277 #beaker.session.encrypt_key = <key_for_encryption>
281 #beaker.session.encrypt_key = <key_for_encryption>
278 #beaker.session.validate_key = <validation_key>
282 #beaker.session.validate_key = <validation_key>
279
283
280 ## sets session as invalid if it haven't been accessed for given amount of time
284 ## sets session as invalid if it haven't been accessed for given amount of time
281 beaker.session.timeout = 2592000
285 beaker.session.timeout = 2592000
282 beaker.session.httponly = true
286 beaker.session.httponly = true
283 #beaker.session.cookie_path = /<your-prefix>
287 #beaker.session.cookie_path = /<your-prefix>
284
288
285 ## uncomment for https secure cookie
289 ## uncomment for https secure cookie
286 beaker.session.secure = false
290 beaker.session.secure = false
287
291
288 ## auto save the session to not to use .save()
292 ## auto save the session to not to use .save()
289 beaker.session.auto = False
293 beaker.session.auto = False
290
294
291 ## default cookie expiration time in seconds `true` expire at browser close ##
295 ## default cookie expiration time in seconds `true` expire at browser close ##
292 #beaker.session.cookie_expires = 3600
296 #beaker.session.cookie_expires = 3600
293
297
294
298
295 ############################
299 ############################
296 ## ERROR HANDLING SYSTEMS ##
300 ## ERROR HANDLING SYSTEMS ##
297 ############################
301 ############################
298
302
299 ####################
303 ####################
300 ### [errormator] ###
304 ### [errormator] ###
301 ####################
305 ####################
302
306
303 ## Errormator is tailored to work with RhodeCode, see
307 ## Errormator is tailored to work with RhodeCode, see
304 ## http://errormator.com for details how to obtain an account
308 ## http://errormator.com for details how to obtain an account
305 ## you must install python package `errormator_client` to make it work
309 ## you must install python package `errormator_client` to make it work
306
310
307 ## errormator enabled
311 ## errormator enabled
308 errormator = false
312 errormator = false
309
313
310 errormator.server_url = https://api.errormator.com
314 errormator.server_url = https://api.errormator.com
311 errormator.api_key = YOUR_API_KEY
315 errormator.api_key = YOUR_API_KEY
312
316
313 ## TWEAK AMOUNT OF INFO SENT HERE
317 ## TWEAK AMOUNT OF INFO SENT HERE
314
318
315 ## enables 404 error logging (default False)
319 ## enables 404 error logging (default False)
316 errormator.report_404 = false
320 errormator.report_404 = false
317
321
318 ## time in seconds after request is considered being slow (default 1)
322 ## time in seconds after request is considered being slow (default 1)
319 errormator.slow_request_time = 1
323 errormator.slow_request_time = 1
320
324
321 ## record slow requests in application
325 ## record slow requests in application
322 ## (needs to be enabled for slow datastore recording and time tracking)
326 ## (needs to be enabled for slow datastore recording and time tracking)
323 errormator.slow_requests = true
327 errormator.slow_requests = true
324
328
325 ## enable hooking to application loggers
329 ## enable hooking to application loggers
326 # errormator.logging = true
330 # errormator.logging = true
327
331
328 ## minimum log level for log capture
332 ## minimum log level for log capture
329 # errormator.logging.level = WARNING
333 # errormator.logging.level = WARNING
330
334
331 ## send logs only from erroneous/slow requests
335 ## send logs only from erroneous/slow requests
332 ## (saves API quota for intensive logging)
336 ## (saves API quota for intensive logging)
333 errormator.logging_on_error = false
337 errormator.logging_on_error = false
334
338
335 ## list of additonal keywords that should be grabbed from environ object
339 ## list of additonal keywords that should be grabbed from environ object
336 ## can be string with comma separated list of words in lowercase
340 ## can be string with comma separated list of words in lowercase
337 ## (by default client will always send following info:
341 ## (by default client will always send following info:
338 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
342 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
339 ## start with HTTP* this list be extended with additional keywords here
343 ## start with HTTP* this list be extended with additional keywords here
340 errormator.environ_keys_whitelist =
344 errormator.environ_keys_whitelist =
341
345
342
346
343 ## list of keywords that should be blanked from request object
347 ## list of keywords that should be blanked from request object
344 ## can be string with comma separated list of words in lowercase
348 ## can be string with comma separated list of words in lowercase
345 ## (by default client will always blank keys that contain following words
349 ## (by default client will always blank keys that contain following words
346 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
350 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
347 ## this list be extended with additional keywords set here
351 ## this list be extended with additional keywords set here
348 errormator.request_keys_blacklist =
352 errormator.request_keys_blacklist =
349
353
350
354
351 ## list of namespaces that should be ignores when gathering log entries
355 ## list of namespaces that should be ignores when gathering log entries
352 ## can be string with comma separated list of namespaces
356 ## can be string with comma separated list of namespaces
353 ## (by default the client ignores own entries: errormator_client.client)
357 ## (by default the client ignores own entries: errormator_client.client)
354 errormator.log_namespace_blacklist =
358 errormator.log_namespace_blacklist =
355
359
356
360
357 ################
361 ################
358 ### [sentry] ###
362 ### [sentry] ###
359 ################
363 ################
360
364
361 ## sentry is a alternative open source error aggregator
365 ## sentry is a alternative open source error aggregator
362 ## you must install python packages `sentry` and `raven` to enable
366 ## you must install python packages `sentry` and `raven` to enable
363
367
364 sentry.dsn = YOUR_DNS
368 sentry.dsn = YOUR_DNS
365 sentry.servers =
369 sentry.servers =
366 sentry.name =
370 sentry.name =
367 sentry.key =
371 sentry.key =
368 sentry.public_key =
372 sentry.public_key =
369 sentry.secret_key =
373 sentry.secret_key =
370 sentry.project =
374 sentry.project =
371 sentry.site =
375 sentry.site =
372 sentry.include_paths =
376 sentry.include_paths =
373 sentry.exclude_paths =
377 sentry.exclude_paths =
374
378
375
379
376 ################################################################################
380 ################################################################################
377 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
381 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
378 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
382 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
379 ## execute malicious code after an exception is raised. ##
383 ## execute malicious code after an exception is raised. ##
380 ################################################################################
384 ################################################################################
381 set debug = false
385 set debug = false
382
386
383 ##################################
387 ##################################
384 ### LOGVIEW CONFIG ###
388 ### LOGVIEW CONFIG ###
385 ##################################
389 ##################################
386 logview.sqlalchemy = #faa
390 logview.sqlalchemy = #faa
387 logview.pylons.templating = #bfb
391 logview.pylons.templating = #bfb
388 logview.pylons.util = #eee
392 logview.pylons.util = #eee
389
393
390 #########################################################
394 #########################################################
391 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
395 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
392 #########################################################
396 #########################################################
393
397
394 # SQLITE [default]
398 # SQLITE [default]
395 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
399 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
396
400
397 # POSTGRESQL
401 # POSTGRESQL
398 # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
402 # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
399
403
400 # MySQL
404 # MySQL
401 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
405 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
402
406
403 # see sqlalchemy docs for others
407 # see sqlalchemy docs for others
404
408
405 sqlalchemy.db1.echo = false
409 sqlalchemy.db1.echo = false
406 sqlalchemy.db1.pool_recycle = 3600
410 sqlalchemy.db1.pool_recycle = 3600
407 sqlalchemy.db1.convert_unicode = true
411 sqlalchemy.db1.convert_unicode = true
408
412
409 ################################
413 ################################
410 ### LOGGING CONFIGURATION ####
414 ### LOGGING CONFIGURATION ####
411 ################################
415 ################################
412 [loggers]
416 [loggers]
413 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
417 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
414
418
415 [handlers]
419 [handlers]
416 keys = console, console_sql
420 keys = console, console_sql
417
421
418 [formatters]
422 [formatters]
419 keys = generic, color_formatter, color_formatter_sql
423 keys = generic, color_formatter, color_formatter_sql
420
424
421 #############
425 #############
422 ## LOGGERS ##
426 ## LOGGERS ##
423 #############
427 #############
424 [logger_root]
428 [logger_root]
425 level = NOTSET
429 level = NOTSET
426 handlers = console
430 handlers = console
427
431
428 [logger_routes]
432 [logger_routes]
429 level = DEBUG
433 level = DEBUG
430 handlers =
434 handlers =
431 qualname = routes.middleware
435 qualname = routes.middleware
432 ## "level = DEBUG" logs the route matched and routing variables.
436 ## "level = DEBUG" logs the route matched and routing variables.
433 propagate = 1
437 propagate = 1
434
438
435 [logger_beaker]
439 [logger_beaker]
436 level = DEBUG
440 level = DEBUG
437 handlers =
441 handlers =
438 qualname = beaker.container
442 qualname = beaker.container
439 propagate = 1
443 propagate = 1
440
444
441 [logger_templates]
445 [logger_templates]
442 level = INFO
446 level = INFO
443 handlers =
447 handlers =
444 qualname = pylons.templating
448 qualname = pylons.templating
445 propagate = 1
449 propagate = 1
446
450
447 [logger_rhodecode]
451 [logger_rhodecode]
448 level = DEBUG
452 level = DEBUG
449 handlers =
453 handlers =
450 qualname = rhodecode
454 qualname = rhodecode
451 propagate = 1
455 propagate = 1
452
456
453 [logger_sqlalchemy]
457 [logger_sqlalchemy]
454 level = INFO
458 level = INFO
455 handlers = console_sql
459 handlers = console_sql
456 qualname = sqlalchemy.engine
460 qualname = sqlalchemy.engine
457 propagate = 0
461 propagate = 0
458
462
459 [logger_whoosh_indexer]
463 [logger_whoosh_indexer]
460 level = DEBUG
464 level = DEBUG
461 handlers =
465 handlers =
462 qualname = whoosh_indexer
466 qualname = whoosh_indexer
463 propagate = 1
467 propagate = 1
464
468
465 ##############
469 ##############
466 ## HANDLERS ##
470 ## HANDLERS ##
467 ##############
471 ##############
468
472
469 [handler_console]
473 [handler_console]
470 class = StreamHandler
474 class = StreamHandler
471 args = (sys.stderr,)
475 args = (sys.stderr,)
472 level = INFO
476 level = INFO
473 formatter = generic
477 formatter = generic
474
478
475 [handler_console_sql]
479 [handler_console_sql]
476 class = StreamHandler
480 class = StreamHandler
477 args = (sys.stderr,)
481 args = (sys.stderr,)
478 level = WARN
482 level = WARN
479 formatter = generic
483 formatter = generic
480
484
481 ################
485 ################
482 ## FORMATTERS ##
486 ## FORMATTERS ##
483 ################
487 ################
484
488
485 [formatter_generic]
489 [formatter_generic]
486 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
490 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
487 datefmt = %Y-%m-%d %H:%M:%S
491 datefmt = %Y-%m-%d %H:%M:%S
488
492
489 [formatter_color_formatter]
493 [formatter_color_formatter]
490 class=rhodecode.lib.colored_formatter.ColorFormatter
494 class=rhodecode.lib.colored_formatter.ColorFormatter
491 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
495 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
492 datefmt = %Y-%m-%d %H:%M:%S
496 datefmt = %Y-%m-%d %H:%M:%S
493
497
494 [formatter_color_formatter_sql]
498 [formatter_color_formatter_sql]
495 class=rhodecode.lib.colored_formatter.ColorFormatterSql
499 class=rhodecode.lib.colored_formatter.ColorFormatterSql
496 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
500 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
497 datefmt = %Y-%m-%d %H:%M:%S
501 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,116 +1,117 b''
1 """Pylons environment configuration"""
1 """Pylons environment configuration"""
2
2
3 import os
3 import os
4 import logging
4 import logging
5 import rhodecode
5 import rhodecode
6
6
7 from mako.lookup import TemplateLookup
7 from mako.lookup import TemplateLookup
8 from pylons.configuration import PylonsConfig
8 from pylons.configuration import PylonsConfig
9 from pylons.error import handle_mako_error
9 from pylons.error import handle_mako_error
10
10
11 # don't remove this import it does magic for celery
11 # don't remove this import it does magic for celery
12 from rhodecode.lib import celerypylons
12 from rhodecode.lib import celerypylons
13
13
14 import rhodecode.lib.app_globals as app_globals
14 import rhodecode.lib.app_globals as app_globals
15
15
16 from rhodecode.config.routing import make_map
16 from rhodecode.config.routing import make_map
17
17
18 from rhodecode.lib import helpers
18 from rhodecode.lib import helpers
19 from rhodecode.lib.auth import set_available_permissions
19 from rhodecode.lib.auth import set_available_permissions
20 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
20 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
21 load_rcextensions, check_git_version
21 load_rcextensions, check_git_version
22 from rhodecode.lib.utils2 import engine_from_config, str2bool
22 from rhodecode.lib.utils2 import engine_from_config, str2bool
23 from rhodecode.lib.db_manage import DbManage
23 from rhodecode.lib.db_manage import DbManage
24 from rhodecode.model import init_model
24 from rhodecode.model import init_model
25 from rhodecode.model.scm import ScmModel
25 from rhodecode.model.scm import ScmModel
26
26
27 log = logging.getLogger(__name__)
27 log = logging.getLogger(__name__)
28
28
29
29
30 def load_environment(global_conf, app_conf, initial=False):
30 def load_environment(global_conf, app_conf, initial=False):
31 """
31 """
32 Configure the Pylons environment via the ``pylons.config``
32 Configure the Pylons environment via the ``pylons.config``
33 object
33 object
34 """
34 """
35 config = PylonsConfig()
35 config = PylonsConfig()
36
36
37 # Pylons paths
37 # Pylons paths
38 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
38 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
39 paths = dict(
39 paths = dict(
40 root=root,
40 root=root,
41 controllers=os.path.join(root, 'controllers'),
41 controllers=os.path.join(root, 'controllers'),
42 static_files=os.path.join(root, 'public'),
42 static_files=os.path.join(root, 'public'),
43 templates=[os.path.join(root, 'templates')]
43 templates=[os.path.join(root, 'templates')]
44 )
44 )
45
45
46 # Initialize config with the basic options
46 # Initialize config with the basic options
47 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
47 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
48
48
49 # store some globals into rhodecode
49 # store some globals into rhodecode
50 rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
50 rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
51 rhodecode.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
51 rhodecode.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
52
52
53 config['routes.map'] = make_map(config)
53 config['routes.map'] = make_map(config)
54 config['pylons.app_globals'] = app_globals.Globals(config)
54 config['pylons.app_globals'] = app_globals.Globals(config)
55 config['pylons.h'] = helpers
55 config['pylons.h'] = helpers
56 rhodecode.CONFIG = config
56 rhodecode.CONFIG = config
57
57
58 load_rcextensions(root_path=config['here'])
58 load_rcextensions(root_path=config['here'])
59
59
60 # Setup cache object as early as possible
60 # Setup cache object as early as possible
61 import pylons
61 import pylons
62 pylons.cache._push_object(config['pylons.app_globals'].cache)
62 pylons.cache._push_object(config['pylons.app_globals'].cache)
63
63
64 # Create the Mako TemplateLookup, with the default auto-escaping
64 # Create the Mako TemplateLookup, with the default auto-escaping
65 config['pylons.app_globals'].mako_lookup = TemplateLookup(
65 config['pylons.app_globals'].mako_lookup = TemplateLookup(
66 directories=paths['templates'],
66 directories=paths['templates'],
67 error_handler=handle_mako_error,
67 error_handler=handle_mako_error,
68 module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
68 module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
69 input_encoding='utf-8', default_filters=['escape'],
69 input_encoding='utf-8', default_filters=['escape'],
70 imports=['from webhelpers.html import escape'])
70 imports=['from webhelpers.html import escape'])
71
71
72 # sets the c attribute access when don't existing attribute are accessed
72 # sets the c attribute access when don't existing attribute are accessed
73 config['pylons.strict_tmpl_context'] = True
73 config['pylons.strict_tmpl_context'] = True
74 test = os.path.split(config['__file__'])[-1] == 'test.ini'
74 test = os.path.split(config['__file__'])[-1] == 'test.ini'
75 if test:
75 if test:
76 if os.environ.get('TEST_DB'):
76 if os.environ.get('TEST_DB'):
77 # swap config if we pass enviroment variable
77 # swap config if we pass enviroment variable
78 config['sqlalchemy.db1.url'] = os.environ.get('TEST_DB')
78 config['sqlalchemy.db1.url'] = os.environ.get('TEST_DB')
79
79
80 from rhodecode.lib.utils import create_test_env, create_test_index
80 from rhodecode.lib.utils import create_test_env, create_test_index
81 from rhodecode.tests import TESTS_TMP_PATH
81 from rhodecode.tests import TESTS_TMP_PATH
82 # set RC_NO_TMP_PATH=1 to disable re-creating the database and
82 # set RC_NO_TMP_PATH=1 to disable re-creating the database and
83 # test repos
83 # test repos
84 if not int(os.environ.get('RC_NO_TMP_PATH', 0)):
84 if not int(os.environ.get('RC_NO_TMP_PATH', 0)):
85 create_test_env(TESTS_TMP_PATH, config)
85 create_test_env(TESTS_TMP_PATH, config)
86 # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
86 # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
87 if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
87 if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
88 create_test_index(TESTS_TMP_PATH, config, True)
88 create_test_index(TESTS_TMP_PATH, config, True)
89
89
90 #check git version
90 #check git version
91 check_git_version()
91 check_git_version()
92 DbManage.check_waitress()
92 DbManage.check_waitress()
93 # MULTIPLE DB configs
93 # MULTIPLE DB configs
94 # Setup the SQLAlchemy database engine
94 # Setup the SQLAlchemy database engine
95 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
95 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
96 init_model(sa_engine_db1)
96 init_model(sa_engine_db1)
97
97
98 repos_path = make_ui('db').configitems('paths')[0][1]
98 repos_path = make_ui('db').configitems('paths')[0][1]
99 repo2db_mapper(ScmModel().repo_scan(repos_path),
99 if str2bool(config.get('initial_repo_scan', True)):
100 remove_obsolete=False, install_git_hook=False)
100 repo2db_mapper(ScmModel().repo_scan(repos_path),
101 remove_obsolete=False, install_git_hook=False)
101 set_available_permissions(config)
102 set_available_permissions(config)
102 config['base_path'] = repos_path
103 config['base_path'] = repos_path
103 set_rhodecode_config(config)
104 set_rhodecode_config(config)
104
105
105 instance_id = rhodecode.CONFIG.get('instance_id')
106 instance_id = rhodecode.CONFIG.get('instance_id')
106 if instance_id == '*':
107 if instance_id == '*':
107 instance_id = '%s-%s' % (os.uname()[1], os.getpid())
108 instance_id = '%s-%s' % (os.uname()[1], os.getpid())
108 rhodecode.CONFIG['instance_id'] = instance_id
109 rhodecode.CONFIG['instance_id'] = instance_id
109
110
110 # CONFIGURATION OPTIONS HERE (note: all config options will override
111 # CONFIGURATION OPTIONS HERE (note: all config options will override
111 # any Pylons config options)
112 # any Pylons config options)
112
113
113 # store config reference into our module to skip import magic of
114 # store config reference into our module to skip import magic of
114 # pylons
115 # pylons
115 rhodecode.CONFIG.update(config)
116 rhodecode.CONFIG.update(config)
116 return config
117 return config
@@ -1,482 +1,486 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
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 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE
32 ## PASTE
33 ## nr of threads to spawn
33 ## nr of threads to spawn
34 #threadpool_workers = 5
34 #threadpool_workers = 5
35
35
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38
38
39 ## option to use threads of process
39 ## option to use threads of process
40 #use_threadpool = true
40 #use_threadpool = true
41
41
42 #use = egg:Paste#http
42 #use = egg:Paste#http
43
43
44 ## WAITRESS
44 ## WAITRESS
45 threads = 5
45 threads = 5
46 ## 100GB
46 ## 100GB
47 max_request_body_size = 107374182400
47 max_request_body_size = 107374182400
48 use = egg:waitress#main
48 use = egg:waitress#main
49
49
50 host = 127.0.0.1
50 host = 127.0.0.1
51 port = 5000
51 port = 5000
52
52
53 ## prefix middleware for rc
53 ## prefix middleware for rc
54 #[filter:proxy-prefix]
54 #[filter:proxy-prefix]
55 #use = egg:PasteDeploy#prefix
55 #use = egg:PasteDeploy#prefix
56 #prefix = /<your-prefix>
56 #prefix = /<your-prefix>
57
57
58 [app:main]
58 [app:main]
59 use = egg:rhodecode
59 use = egg:rhodecode
60 ## enable proxy prefix middleware
60 ## enable proxy prefix middleware
61 #filter-with = proxy-prefix
61 #filter-with = proxy-prefix
62
62
63 full_stack = true
63 full_stack = true
64 static_files = true
64 static_files = true
65 ## Optional Languages
65 ## Optional Languages
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
66 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
67 lang = en
67 lang = en
68 cache_dir = /tmp/rc/data
68 cache_dir = /tmp/rc/data
69 index_dir = /tmp/rc/index
69 index_dir = /tmp/rc/index
70
70
71 ## perform a full repository scan on each server start, this should be
72 ## set to false after first startup, to allow faster server restarts.
73 initial_repo_scan = true
74
71 ## uncomment and set this path to use archive download cache
75 ## uncomment and set this path to use archive download cache
72 #archive_cache_dir = /tmp/tarballcache
76 #archive_cache_dir = /tmp/tarballcache
73
77
74 ## change this to unique ID for security
78 ## change this to unique ID for security
75 app_instance_uuid = rc-production
79 app_instance_uuid = rc-production
76
80
77 ## cut off limit for large diffs (size in bytes)
81 ## cut off limit for large diffs (size in bytes)
78 cut_off_limit = 256000
82 cut_off_limit = 256000
79
83
80 ## use cache version of scm repo everywhere
84 ## use cache version of scm repo everywhere
81 vcs_full_cache = false
85 vcs_full_cache = false
82
86
83 ## force https in RhodeCode, fixes https redirects, assumes it's always https
87 ## force https in RhodeCode, fixes https redirects, assumes it's always https
84 force_https = false
88 force_https = false
85
89
86 ## use Strict-Transport-Security headers
90 ## use Strict-Transport-Security headers
87 use_htsts = false
91 use_htsts = false
88
92
89 ## number of commits stats will parse on each iteration
93 ## number of commits stats will parse on each iteration
90 commit_parse_limit = 25
94 commit_parse_limit = 25
91
95
92 ## number of items displayed in lightweight dashboard before paginating is shown
96 ## number of items displayed in lightweight dashboard before paginating is shown
93 dashboard_items = 100
97 dashboard_items = 100
94
98
95 ## use gravatar service to display avatars
99 ## use gravatar service to display avatars
96 use_gravatar = true
100 use_gravatar = true
97
101
98 ## path to git executable
102 ## path to git executable
99 git_path = git
103 git_path = git
100
104
101 ## git rev filter option, --all is the default filter, if you need to
105 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
106 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
107 git_rev_filter=--all
104
108
105 ## RSS feed options
109 ## RSS feed options
106 rss_cut_off_limit = 256000
110 rss_cut_off_limit = 256000
107 rss_items_per_page = 10
111 rss_items_per_page = 10
108 rss_include_diff = false
112 rss_include_diff = false
109
113
110 ## options for showing and identifying changesets
114 ## options for showing and identifying changesets
111 show_sha_length = 12
115 show_sha_length = 12
112 show_revision_number = true
116 show_revision_number = true
113
117
114
118
115 ## alternative_gravatar_url allows you to use your own avatar server application
119 ## alternative_gravatar_url allows you to use your own avatar server application
116 ## the following parts of the URL will be replaced
120 ## the following parts of the URL will be replaced
117 ## {email} user email
121 ## {email} user email
118 ## {md5email} md5 hash of the user email (like at gravatar.com)
122 ## {md5email} md5 hash of the user email (like at gravatar.com)
119 ## {size} size of the image that is expected from the server application
123 ## {size} size of the image that is expected from the server application
120 ## {scheme} http/https from RhodeCode server
124 ## {scheme} http/https from RhodeCode server
121 ## {netloc} network location from RhodeCode server
125 ## {netloc} network location from RhodeCode server
122 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
126 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
123 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
127 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
124
128
125
129
126 ## container auth options
130 ## container auth options
127 container_auth_enabled = false
131 container_auth_enabled = false
128 proxypass_auth_enabled = false
132 proxypass_auth_enabled = false
129
133
130 ## default encoding used to convert from and to unicode
134 ## default encoding used to convert from and to unicode
131 ## can be also a comma seperated list of encoding in case of mixed encodings
135 ## can be also a comma seperated list of encoding in case of mixed encodings
132 default_encoding = utf8
136 default_encoding = utf8
133
137
134 ## overwrite schema of clone url
138 ## overwrite schema of clone url
135 ## available vars:
139 ## available vars:
136 ## scheme - http/https
140 ## scheme - http/https
137 ## user - current user
141 ## user - current user
138 ## pass - password
142 ## pass - password
139 ## netloc - network location
143 ## netloc - network location
140 ## path - usually repo_name
144 ## path - usually repo_name
141
145
142 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
146 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
143
147
144 ## issue tracking mapping for commits messages
148 ## issue tracking mapping for commits messages
145 ## comment out issue_pat, issue_server, issue_prefix to enable
149 ## comment out issue_pat, issue_server, issue_prefix to enable
146
150
147 ## pattern to get the issues from commit messages
151 ## pattern to get the issues from commit messages
148 ## default one used here is #<numbers> with a regex passive group for `#`
152 ## default one used here is #<numbers> with a regex passive group for `#`
149 ## {id} will be all groups matched from this pattern
153 ## {id} will be all groups matched from this pattern
150
154
151 issue_pat = (?:\s*#)(\d+)
155 issue_pat = (?:\s*#)(\d+)
152
156
153 ## server url to the issue, each {id} will be replaced with match
157 ## server url to the issue, each {id} will be replaced with match
154 ## fetched from the regex and {repo} is replaced with full repository name
158 ## fetched from the regex and {repo} is replaced with full repository name
155 ## including groups {repo_name} is replaced with just name of repo
159 ## including groups {repo_name} is replaced with just name of repo
156
160
157 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
161 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
158
162
159 ## prefix to add to link to indicate it's an url
163 ## prefix to add to link to indicate it's an url
160 ## #314 will be replaced by <issue_prefix><id>
164 ## #314 will be replaced by <issue_prefix><id>
161
165
162 issue_prefix = #
166 issue_prefix = #
163
167
164 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
168 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
165 ## multiple patterns, to other issues server, wiki or others
169 ## multiple patterns, to other issues server, wiki or others
166 ## below an example how to create a wiki pattern
170 ## below an example how to create a wiki pattern
167 # #wiki-some-id -> https://mywiki.com/some-id
171 # #wiki-some-id -> https://mywiki.com/some-id
168
172
169 #issue_pat_wiki = (?:wiki-)(.+)
173 #issue_pat_wiki = (?:wiki-)(.+)
170 #issue_server_link_wiki = https://mywiki.com/{id}
174 #issue_server_link_wiki = https://mywiki.com/{id}
171 #issue_prefix_wiki = WIKI-
175 #issue_prefix_wiki = WIKI-
172
176
173
177
174 ## instance-id prefix
178 ## instance-id prefix
175 ## a prefix key for this instance used for cache invalidation when running
179 ## a prefix key for this instance used for cache invalidation when running
176 ## multiple instances of rhodecode, make sure it's globally unique for
180 ## multiple instances of rhodecode, make sure it's globally unique for
177 ## all running rhodecode instances. Leave empty if you don't use it
181 ## all running rhodecode instances. Leave empty if you don't use it
178 instance_id =
182 instance_id =
179
183
180 ## alternative return HTTP header for failed authentication. Default HTTP
184 ## alternative return HTTP header for failed authentication. Default HTTP
181 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
185 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
182 ## handling that. Set this variable to 403 to return HTTPForbidden
186 ## handling that. Set this variable to 403 to return HTTPForbidden
183 auth_ret_code =
187 auth_ret_code =
184
188
185 ## locking return code. When repository is locked return this HTTP code. 2XX
189 ## locking return code. When repository is locked return this HTTP code. 2XX
186 ## codes don't break the transactions while 4XX codes do
190 ## codes don't break the transactions while 4XX codes do
187 lock_ret_code = 423
191 lock_ret_code = 423
188
192
189
193
190 ####################################
194 ####################################
191 ### CELERY CONFIG ####
195 ### CELERY CONFIG ####
192 ####################################
196 ####################################
193 use_celery = false
197 use_celery = false
194 broker.host = localhost
198 broker.host = localhost
195 broker.vhost = rabbitmqhost
199 broker.vhost = rabbitmqhost
196 broker.port = 5672
200 broker.port = 5672
197 broker.user = rabbitmq
201 broker.user = rabbitmq
198 broker.password = qweqwe
202 broker.password = qweqwe
199
203
200 celery.imports = rhodecode.lib.celerylib.tasks
204 celery.imports = rhodecode.lib.celerylib.tasks
201
205
202 celery.result.backend = amqp
206 celery.result.backend = amqp
203 celery.result.dburi = amqp://
207 celery.result.dburi = amqp://
204 celery.result.serialier = json
208 celery.result.serialier = json
205
209
206 #celery.send.task.error.emails = true
210 #celery.send.task.error.emails = true
207 #celery.amqp.task.result.expires = 18000
211 #celery.amqp.task.result.expires = 18000
208
212
209 celeryd.concurrency = 2
213 celeryd.concurrency = 2
210 #celeryd.log.file = celeryd.log
214 #celeryd.log.file = celeryd.log
211 celeryd.log.level = debug
215 celeryd.log.level = debug
212 celeryd.max.tasks.per.child = 1
216 celeryd.max.tasks.per.child = 1
213
217
214 ## tasks will never be sent to the queue, but executed locally instead.
218 ## tasks will never be sent to the queue, but executed locally instead.
215 celery.always.eager = false
219 celery.always.eager = false
216
220
217 ####################################
221 ####################################
218 ### BEAKER CACHE ####
222 ### BEAKER CACHE ####
219 ####################################
223 ####################################
220 beaker.cache.data_dir=/tmp/rc/data/cache/data
224 beaker.cache.data_dir=/tmp/rc/data/cache/data
221 beaker.cache.lock_dir=/tmp/rc/data/cache/lock
225 beaker.cache.lock_dir=/tmp/rc/data/cache/lock
222
226
223 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
227 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
224
228
225 beaker.cache.super_short_term.type=memory
229 beaker.cache.super_short_term.type=memory
226 beaker.cache.super_short_term.expire=1
230 beaker.cache.super_short_term.expire=1
227 beaker.cache.super_short_term.key_length = 256
231 beaker.cache.super_short_term.key_length = 256
228
232
229 beaker.cache.short_term.type=memory
233 beaker.cache.short_term.type=memory
230 beaker.cache.short_term.expire=60
234 beaker.cache.short_term.expire=60
231 beaker.cache.short_term.key_length = 256
235 beaker.cache.short_term.key_length = 256
232
236
233 beaker.cache.long_term.type=memory
237 beaker.cache.long_term.type=memory
234 beaker.cache.long_term.expire=36000
238 beaker.cache.long_term.expire=36000
235 beaker.cache.long_term.key_length = 256
239 beaker.cache.long_term.key_length = 256
236
240
237 beaker.cache.sql_cache_short.type=memory
241 beaker.cache.sql_cache_short.type=memory
238 beaker.cache.sql_cache_short.expire=1
242 beaker.cache.sql_cache_short.expire=1
239 beaker.cache.sql_cache_short.key_length = 256
243 beaker.cache.sql_cache_short.key_length = 256
240
244
241 beaker.cache.sql_cache_med.type=memory
245 beaker.cache.sql_cache_med.type=memory
242 beaker.cache.sql_cache_med.expire=360
246 beaker.cache.sql_cache_med.expire=360
243 beaker.cache.sql_cache_med.key_length = 256
247 beaker.cache.sql_cache_med.key_length = 256
244
248
245 beaker.cache.sql_cache_long.type=file
249 beaker.cache.sql_cache_long.type=file
246 beaker.cache.sql_cache_long.expire=3600
250 beaker.cache.sql_cache_long.expire=3600
247 beaker.cache.sql_cache_long.key_length = 256
251 beaker.cache.sql_cache_long.key_length = 256
248
252
249 ####################################
253 ####################################
250 ### BEAKER SESSION ####
254 ### BEAKER SESSION ####
251 ####################################
255 ####################################
252 ## Type of storage used for the session, current types are
256 ## Type of storage used for the session, current types are
253 ## dbm, file, memcached, database, and memory.
257 ## dbm, file, memcached, database, and memory.
254 ## The storage uses the Container API
258 ## The storage uses the Container API
255 ## that is also used by the cache system.
259 ## that is also used by the cache system.
256
260
257 ## db session ##
261 ## db session ##
258 #beaker.session.type = ext:database
262 #beaker.session.type = ext:database
259 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
263 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
260 #beaker.session.table_name = db_session
264 #beaker.session.table_name = db_session
261
265
262 ## encrypted cookie client side session, good for many instances ##
266 ## encrypted cookie client side session, good for many instances ##
263 #beaker.session.type = cookie
267 #beaker.session.type = cookie
264
268
265 ## file based cookies (default) ##
269 ## file based cookies (default) ##
266 #beaker.session.type = file
270 #beaker.session.type = file
267
271
268
272
269 beaker.session.key = rhodecode
273 beaker.session.key = rhodecode
270 ## secure cookie requires AES python libraries
274 ## secure cookie requires AES python libraries
271 #beaker.session.encrypt_key = <key_for_encryption>
275 #beaker.session.encrypt_key = <key_for_encryption>
272 #beaker.session.validate_key = <validation_key>
276 #beaker.session.validate_key = <validation_key>
273
277
274 ## sets session as invalid if it haven't been accessed for given amount of time
278 ## sets session as invalid if it haven't been accessed for given amount of time
275 beaker.session.timeout = 3600
279 beaker.session.timeout = 3600
276 beaker.session.httponly = true
280 beaker.session.httponly = true
277 #beaker.session.cookie_path = /<your-prefix>
281 #beaker.session.cookie_path = /<your-prefix>
278
282
279 ## uncomment for https secure cookie
283 ## uncomment for https secure cookie
280 beaker.session.secure = false
284 beaker.session.secure = false
281
285
282 ## auto save the session to not to use .save()
286 ## auto save the session to not to use .save()
283 beaker.session.auto = False
287 beaker.session.auto = False
284
288
285 ## default cookie expiration time in seconds `true` expire at browser close ##
289 ## default cookie expiration time in seconds `true` expire at browser close ##
286 #beaker.session.cookie_expires = 3600
290 #beaker.session.cookie_expires = 3600
287
291
288
292
289 ############################
293 ############################
290 ## ERROR HANDLING SYSTEMS ##
294 ## ERROR HANDLING SYSTEMS ##
291 ############################
295 ############################
292
296
293 ####################
297 ####################
294 ### [errormator] ###
298 ### [errormator] ###
295 ####################
299 ####################
296
300
297 ## Errormator is tailored to work with RhodeCode, see
301 ## Errormator is tailored to work with RhodeCode, see
298 ## http://errormator.com for details how to obtain an account
302 ## http://errormator.com for details how to obtain an account
299 ## you must install python package `errormator_client` to make it work
303 ## you must install python package `errormator_client` to make it work
300
304
301 ## errormator enabled
305 ## errormator enabled
302 errormator = false
306 errormator = false
303
307
304 errormator.server_url = https://api.errormator.com
308 errormator.server_url = https://api.errormator.com
305 errormator.api_key = YOUR_API_KEY
309 errormator.api_key = YOUR_API_KEY
306
310
307 ## TWEAK AMOUNT OF INFO SENT HERE
311 ## TWEAK AMOUNT OF INFO SENT HERE
308
312
309 ## enables 404 error logging (default False)
313 ## enables 404 error logging (default False)
310 errormator.report_404 = false
314 errormator.report_404 = false
311
315
312 ## time in seconds after request is considered being slow (default 1)
316 ## time in seconds after request is considered being slow (default 1)
313 errormator.slow_request_time = 1
317 errormator.slow_request_time = 1
314
318
315 ## record slow requests in application
319 ## record slow requests in application
316 ## (needs to be enabled for slow datastore recording and time tracking)
320 ## (needs to be enabled for slow datastore recording and time tracking)
317 errormator.slow_requests = true
321 errormator.slow_requests = true
318
322
319 ## enable hooking to application loggers
323 ## enable hooking to application loggers
320 # errormator.logging = true
324 # errormator.logging = true
321
325
322 ## minimum log level for log capture
326 ## minimum log level for log capture
323 # errormator.logging.level = WARNING
327 # errormator.logging.level = WARNING
324
328
325 ## send logs only from erroneous/slow requests
329 ## send logs only from erroneous/slow requests
326 ## (saves API quota for intensive logging)
330 ## (saves API quota for intensive logging)
327 errormator.logging_on_error = false
331 errormator.logging_on_error = false
328
332
329 ## list of additonal keywords that should be grabbed from environ object
333 ## list of additonal keywords that should be grabbed from environ object
330 ## can be string with comma separated list of words in lowercase
334 ## can be string with comma separated list of words in lowercase
331 ## (by default client will always send following info:
335 ## (by default client will always send following info:
332 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
336 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
333 ## start with HTTP* this list be extended with additional keywords here
337 ## start with HTTP* this list be extended with additional keywords here
334 errormator.environ_keys_whitelist =
338 errormator.environ_keys_whitelist =
335
339
336
340
337 ## list of keywords that should be blanked from request object
341 ## list of keywords that should be blanked from request object
338 ## can be string with comma separated list of words in lowercase
342 ## can be string with comma separated list of words in lowercase
339 ## (by default client will always blank keys that contain following words
343 ## (by default client will always blank keys that contain following words
340 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
344 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
341 ## this list be extended with additional keywords set here
345 ## this list be extended with additional keywords set here
342 errormator.request_keys_blacklist =
346 errormator.request_keys_blacklist =
343
347
344
348
345 ## list of namespaces that should be ignores when gathering log entries
349 ## list of namespaces that should be ignores when gathering log entries
346 ## can be string with comma separated list of namespaces
350 ## can be string with comma separated list of namespaces
347 ## (by default the client ignores own entries: errormator_client.client)
351 ## (by default the client ignores own entries: errormator_client.client)
348 errormator.log_namespace_blacklist =
352 errormator.log_namespace_blacklist =
349
353
350
354
351 ################
355 ################
352 ### [sentry] ###
356 ### [sentry] ###
353 ################
357 ################
354
358
355 ## sentry is a alternative open source error aggregator
359 ## sentry is a alternative open source error aggregator
356 ## you must install python packages `sentry` and `raven` to enable
360 ## you must install python packages `sentry` and `raven` to enable
357
361
358 sentry.dsn = YOUR_DNS
362 sentry.dsn = YOUR_DNS
359 sentry.servers =
363 sentry.servers =
360 sentry.name =
364 sentry.name =
361 sentry.key =
365 sentry.key =
362 sentry.public_key =
366 sentry.public_key =
363 sentry.secret_key =
367 sentry.secret_key =
364 sentry.project =
368 sentry.project =
365 sentry.site =
369 sentry.site =
366 sentry.include_paths =
370 sentry.include_paths =
367 sentry.exclude_paths =
371 sentry.exclude_paths =
368
372
369
373
370 ################################################################################
374 ################################################################################
371 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
375 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
372 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
376 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
373 ## execute malicious code after an exception is raised. ##
377 ## execute malicious code after an exception is raised. ##
374 ################################################################################
378 ################################################################################
375 set debug = false
379 set debug = false
376
380
377 ##################################
381 ##################################
378 ### LOGVIEW CONFIG ###
382 ### LOGVIEW CONFIG ###
379 ##################################
383 ##################################
380 logview.sqlalchemy = #faa
384 logview.sqlalchemy = #faa
381 logview.pylons.templating = #bfb
385 logview.pylons.templating = #bfb
382 logview.pylons.util = #eee
386 logview.pylons.util = #eee
383
387
384 #########################################################
388 #########################################################
385 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
389 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
386 #########################################################
390 #########################################################
387 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite
391 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite
388 #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test
392 #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test
389 #sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test
393 #sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test
390 sqlalchemy.db1.echo = false
394 sqlalchemy.db1.echo = false
391 sqlalchemy.db1.pool_recycle = 3600
395 sqlalchemy.db1.pool_recycle = 3600
392 sqlalchemy.db1.convert_unicode = true
396 sqlalchemy.db1.convert_unicode = true
393
397
394 ################################
398 ################################
395 ### LOGGING CONFIGURATION ####
399 ### LOGGING CONFIGURATION ####
396 ################################
400 ################################
397 [loggers]
401 [loggers]
398 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
402 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
399
403
400 [handlers]
404 [handlers]
401 keys = console, console_sql
405 keys = console, console_sql
402
406
403 [formatters]
407 [formatters]
404 keys = generic, color_formatter, color_formatter_sql
408 keys = generic, color_formatter, color_formatter_sql
405
409
406 #############
410 #############
407 ## LOGGERS ##
411 ## LOGGERS ##
408 #############
412 #############
409 [logger_root]
413 [logger_root]
410 level = DEBUG
414 level = DEBUG
411 handlers = console
415 handlers = console
412
416
413 [logger_routes]
417 [logger_routes]
414 level = DEBUG
418 level = DEBUG
415 handlers =
419 handlers =
416 qualname = routes.middleware
420 qualname = routes.middleware
417 ## "level = DEBUG" logs the route matched and routing variables.
421 ## "level = DEBUG" logs the route matched and routing variables.
418 propagate = 1
422 propagate = 1
419
423
420 [logger_beaker]
424 [logger_beaker]
421 level = DEBUG
425 level = DEBUG
422 handlers =
426 handlers =
423 qualname = beaker.container
427 qualname = beaker.container
424 propagate = 1
428 propagate = 1
425
429
426 [logger_templates]
430 [logger_templates]
427 level = INFO
431 level = INFO
428 handlers =
432 handlers =
429 qualname = pylons.templating
433 qualname = pylons.templating
430 propagate = 1
434 propagate = 1
431
435
432 [logger_rhodecode]
436 [logger_rhodecode]
433 level = DEBUG
437 level = DEBUG
434 handlers =
438 handlers =
435 qualname = rhodecode
439 qualname = rhodecode
436 propagate = 1
440 propagate = 1
437
441
438 [logger_sqlalchemy]
442 [logger_sqlalchemy]
439 level = ERROR
443 level = ERROR
440 handlers = console
444 handlers = console
441 qualname = sqlalchemy.engine
445 qualname = sqlalchemy.engine
442 propagate = 0
446 propagate = 0
443
447
444 [logger_whoosh_indexer]
448 [logger_whoosh_indexer]
445 level = DEBUG
449 level = DEBUG
446 handlers =
450 handlers =
447 qualname = whoosh_indexer
451 qualname = whoosh_indexer
448 propagate = 1
452 propagate = 1
449
453
450 ##############
454 ##############
451 ## HANDLERS ##
455 ## HANDLERS ##
452 ##############
456 ##############
453
457
454 [handler_console]
458 [handler_console]
455 class = StreamHandler
459 class = StreamHandler
456 args = (sys.stderr,)
460 args = (sys.stderr,)
457 level = NOTSET
461 level = NOTSET
458 formatter = generic
462 formatter = generic
459
463
460 [handler_console_sql]
464 [handler_console_sql]
461 class = StreamHandler
465 class = StreamHandler
462 args = (sys.stderr,)
466 args = (sys.stderr,)
463 level = WARN
467 level = WARN
464 formatter = generic
468 formatter = generic
465
469
466 ################
470 ################
467 ## FORMATTERS ##
471 ## FORMATTERS ##
468 ################
472 ################
469
473
470 [formatter_generic]
474 [formatter_generic]
471 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
475 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
472 datefmt = %Y-%m-%d %H:%M:%S
476 datefmt = %Y-%m-%d %H:%M:%S
473
477
474 [formatter_color_formatter]
478 [formatter_color_formatter]
475 class=rhodecode.lib.colored_formatter.ColorFormatter
479 class=rhodecode.lib.colored_formatter.ColorFormatter
476 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
480 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
477 datefmt = %Y-%m-%d %H:%M:%S
481 datefmt = %Y-%m-%d %H:%M:%S
478
482
479 [formatter_color_formatter_sql]
483 [formatter_color_formatter_sql]
480 class=rhodecode.lib.colored_formatter.ColorFormatterSql
484 class=rhodecode.lib.colored_formatter.ColorFormatterSql
481 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
485 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
482 datefmt = %Y-%m-%d %H:%M:%S
486 datefmt = %Y-%m-%d %H:%M:%S
General Comments 0
You need to be logged in to leave comments. Login now