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