Show More
@@ -1,614 +1,602 b'' | |||
|
1 | 1 | ################################################################################ |
|
2 | 2 | ################################################################################ |
|
3 | 3 | # Kallithea - Development config: # |
|
4 | 4 | # listening on *:5000 # |
|
5 | 5 | # sqlite and kallithea.db # |
|
6 | 6 | # initial_repo_scan = true # |
|
7 | 7 | # set debug = true # |
|
8 | 8 | # verbose and colorful logging # |
|
9 | 9 | # # |
|
10 | 10 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
11 | 11 | ################################################################################ |
|
12 | 12 | ################################################################################ |
|
13 | 13 | |
|
14 | 14 | [DEFAULT] |
|
15 | 15 | debug = true |
|
16 | 16 | pdebug = false |
|
17 | 17 | |
|
18 | 18 | ################################################################################ |
|
19 | 19 | ## E-mail settings ## |
|
20 | 20 | ## ## |
|
21 | 21 | ## Refer to the documentation ("E-mail settings") for more details. ## |
|
22 | 22 | ## ## |
|
23 | 23 | ## It is recommended to use a valid sender address that passes access ## |
|
24 | 24 | ## validation and spam filtering in mail servers. ## |
|
25 | 25 | ################################################################################ |
|
26 | 26 | |
|
27 | 27 | ## 'From' header for application e-mails. You can optionally add a name. |
|
28 | 28 | ## Default: |
|
29 | 29 | #app_email_from = Kallithea |
|
30 | 30 | ## Examples: |
|
31 | 31 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
32 | 32 | #app_email_from = kallithea-noreply@example.com |
|
33 | 33 | |
|
34 | 34 | ## Subject prefix for application e-mails. |
|
35 | 35 | ## A space between this prefix and the real subject is automatically added. |
|
36 | 36 | ## Default: |
|
37 | 37 | #email_prefix = |
|
38 | 38 | ## Example: |
|
39 | 39 | #email_prefix = [Kallithea] |
|
40 | 40 | |
|
41 | 41 | ## Recipients for error e-mails and fallback recipients of application mails. |
|
42 | 42 | ## Multiple addresses can be specified, space-separated. |
|
43 | 43 | ## Only addresses are allowed, do not add any name part. |
|
44 | 44 | ## Default: |
|
45 | 45 | #email_to = |
|
46 | 46 | ## Examples: |
|
47 | 47 | #email_to = admin@example.com |
|
48 | 48 | #email_to = admin@example.com another_admin@example.com |
|
49 | 49 | |
|
50 | 50 | ## 'From' header for error e-mails. You can optionally add a name. |
|
51 | 51 | ## Default: |
|
52 | 52 | #error_email_from = pylons@yourapp.com |
|
53 | 53 | ## Examples: |
|
54 | 54 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
55 | 55 | #error_email_from = paste_error@example.com |
|
56 | 56 | |
|
57 | 57 | ## SMTP server settings |
|
58 | 58 | ## Only smtp_server is mandatory. All other settings take the specified default |
|
59 | 59 | ## values. |
|
60 | 60 | #smtp_server = mail.server.com |
|
61 | 61 | #smtp_username = |
|
62 | 62 | #smtp_password = |
|
63 | 63 | #smtp_port = 25 |
|
64 | 64 | #smtp_use_tls = false |
|
65 | 65 | #smtp_use_ssl = false |
|
66 | 66 | ## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.). |
|
67 | 67 | ## If empty, use any of the authentication parameters supported by the server. |
|
68 | 68 | #smtp_auth = |
|
69 | 69 | |
|
70 | 70 | [server:main] |
|
71 | 71 | ## PASTE ## |
|
72 | 72 | #use = egg:Paste#http |
|
73 | 73 | ## nr of worker threads to spawn |
|
74 | 74 | #threadpool_workers = 5 |
|
75 | 75 | ## max request before thread respawn |
|
76 | 76 | #threadpool_max_requests = 10 |
|
77 | 77 | ## option to use threads of process |
|
78 | 78 | #use_threadpool = true |
|
79 | 79 | |
|
80 | 80 | ## WAITRESS ## |
|
81 | 81 | use = egg:waitress#main |
|
82 | 82 | ## number of worker threads |
|
83 | 83 | threads = 5 |
|
84 | 84 | ## MAX BODY SIZE 100GB |
|
85 | 85 | max_request_body_size = 107374182400 |
|
86 | 86 | ## use poll instead of select, fixes fd limits, may not work on old |
|
87 | 87 | ## windows systems. |
|
88 | 88 | #asyncore_use_poll = True |
|
89 | 89 | |
|
90 | 90 | ## GUNICORN ## |
|
91 | 91 | #use = egg:gunicorn#main |
|
92 | 92 | ## number of process workers. You must set `instance_id = *` when this option |
|
93 | 93 | ## is set to more than one worker |
|
94 | 94 | #workers = 1 |
|
95 | 95 | ## process name |
|
96 | 96 | #proc_name = kallithea |
|
97 | 97 | ## type of worker class, one of sync, eventlet, gevent, tornado |
|
98 | 98 | ## recommended for bigger setup is using of of other than sync one |
|
99 | 99 | #worker_class = sync |
|
100 | 100 | #max_requests = 1000 |
|
101 | 101 | ## ammount of time a worker can handle request before it gets killed and |
|
102 | 102 | ## restarted |
|
103 | 103 | #timeout = 3600 |
|
104 | 104 | |
|
105 | 105 | ## UWSGI ## |
|
106 | 106 | ## run with uwsgi --ini-paste-logged <inifile.ini> |
|
107 | 107 | #[uwsgi] |
|
108 | 108 | #socket = /tmp/uwsgi.sock |
|
109 | 109 | #master = true |
|
110 | 110 | #http = 127.0.0.1:5000 |
|
111 | 111 | |
|
112 | 112 | ## set as deamon and redirect all output to file |
|
113 | 113 | #daemonize = ./uwsgi_kallithea.log |
|
114 | 114 | |
|
115 | 115 | ## master process PID |
|
116 | 116 | #pidfile = ./uwsgi_kallithea.pid |
|
117 | 117 | |
|
118 | 118 | ## stats server with workers statistics, use uwsgitop |
|
119 | 119 | ## for monitoring, `uwsgitop 127.0.0.1:1717` |
|
120 | 120 | #stats = 127.0.0.1:1717 |
|
121 | 121 | #memory-report = true |
|
122 | 122 | |
|
123 | 123 | ## log 5XX errors |
|
124 | 124 | #log-5xx = true |
|
125 | 125 | |
|
126 | 126 | ## Set the socket listen queue size. |
|
127 | 127 | #listen = 256 |
|
128 | 128 | |
|
129 | 129 | ## Gracefully Reload workers after the specified amount of managed requests |
|
130 | 130 | ## (avoid memory leaks). |
|
131 | 131 | #max-requests = 1000 |
|
132 | 132 | |
|
133 | 133 | ## enable large buffers |
|
134 | 134 | #buffer-size = 65535 |
|
135 | 135 | |
|
136 | 136 | ## socket and http timeouts ## |
|
137 | 137 | #http-timeout = 3600 |
|
138 | 138 | #socket-timeout = 3600 |
|
139 | 139 | |
|
140 | 140 | ## Log requests slower than the specified number of milliseconds. |
|
141 | 141 | #log-slow = 10 |
|
142 | 142 | |
|
143 | 143 | ## Exit if no app can be loaded. |
|
144 | 144 | #need-app = true |
|
145 | 145 | |
|
146 | 146 | ## Set lazy mode (load apps in workers instead of master). |
|
147 | 147 | #lazy = true |
|
148 | 148 | |
|
149 | 149 | ## scaling ## |
|
150 | 150 | ## set cheaper algorithm to use, if not set default will be used |
|
151 | 151 | #cheaper-algo = spare |
|
152 | 152 | |
|
153 | 153 | ## minimum number of workers to keep at all times |
|
154 | 154 | #cheaper = 1 |
|
155 | 155 | |
|
156 | 156 | ## number of workers to spawn at startup |
|
157 | 157 | #cheaper-initial = 1 |
|
158 | 158 | |
|
159 | 159 | ## maximum number of workers that can be spawned |
|
160 | 160 | #workers = 4 |
|
161 | 161 | |
|
162 | 162 | ## how many workers should be spawned at a time |
|
163 | 163 | #cheaper-step = 1 |
|
164 | 164 | |
|
165 | 165 | ## COMMON ## |
|
166 | 166 | host = 0.0.0.0 |
|
167 | 167 | port = 5000 |
|
168 | 168 | |
|
169 | 169 | ## middleware for hosting the WSGI application under a URL prefix |
|
170 | 170 | #[filter:proxy-prefix] |
|
171 | 171 | #use = egg:PasteDeploy#prefix |
|
172 | 172 | #prefix = /<your-prefix> |
|
173 | 173 | |
|
174 | 174 | [app:main] |
|
175 | 175 | use = egg:kallithea |
|
176 | 176 | ## enable proxy prefix middleware |
|
177 | 177 | #filter-with = proxy-prefix |
|
178 | 178 | |
|
179 | 179 | full_stack = true |
|
180 | 180 | static_files = true |
|
181 | 181 | ## Available Languages: |
|
182 | 182 | ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW |
|
183 | 183 | lang = |
|
184 | 184 | cache_dir = %(here)s/data |
|
185 | 185 | index_dir = %(here)s/data/index |
|
186 | 186 | |
|
187 | 187 | ## perform a full repository scan on each server start, this should be |
|
188 | 188 | ## set to false after first startup, to allow faster server restarts. |
|
189 | 189 | #initial_repo_scan = false |
|
190 | 190 | initial_repo_scan = true |
|
191 | 191 | |
|
192 | 192 | ## uncomment and set this path to use archive download cache |
|
193 | 193 | archive_cache_dir = %(here)s/tarballcache |
|
194 | 194 | |
|
195 | 195 | ## change this to unique ID for security |
|
196 | 196 | app_instance_uuid = development-not-secret |
|
197 | 197 | |
|
198 | 198 | ## cut off limit for large diffs (size in bytes) |
|
199 | 199 | cut_off_limit = 256000 |
|
200 | 200 | |
|
201 | 201 | ## use cache version of scm repo everywhere |
|
202 | 202 | vcs_full_cache = true |
|
203 | 203 | |
|
204 | 204 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
205 | 205 | force_https = false |
|
206 | 206 | |
|
207 | 207 | ## use Strict-Transport-Security headers |
|
208 | 208 | use_htsts = false |
|
209 | 209 | |
|
210 | 210 | ## number of commits stats will parse on each iteration |
|
211 | 211 | commit_parse_limit = 25 |
|
212 | 212 | |
|
213 | 213 | ## path to git executable |
|
214 | 214 | git_path = git |
|
215 | 215 | |
|
216 | 216 | ## git rev filter option, --all is the default filter, if you need to |
|
217 | 217 | ## hide all refs in changelog switch this to --branches --tags |
|
218 | 218 | #git_rev_filter = --branches --tags |
|
219 | 219 | |
|
220 | 220 | ## RSS feed options |
|
221 | 221 | rss_cut_off_limit = 256000 |
|
222 | 222 | rss_items_per_page = 10 |
|
223 | 223 | rss_include_diff = false |
|
224 | 224 | |
|
225 | 225 | ## options for showing and identifying changesets |
|
226 | 226 | show_sha_length = 12 |
|
227 | 227 | show_revision_number = false |
|
228 | 228 | |
|
229 | 229 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
230 | 230 | ## url that does rewrites to _admin/gists/<gistid>. |
|
231 | 231 | ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal |
|
232 | 232 | ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid> |
|
233 | 233 | gist_alias_url = |
|
234 | 234 | |
|
235 | 235 | ## white list of API enabled controllers. This allows to add list of |
|
236 | 236 | ## controllers to which access will be enabled by api_key. eg: to enable |
|
237 | 237 | ## api access to raw_files put `FilesController:raw`, to enable access to patches |
|
238 | 238 | ## add `ChangesetController:changeset_patch`. This list should be "," separated |
|
239 | 239 | ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names |
|
240 | 240 | ## Recommended settings below are commented out: |
|
241 | 241 | api_access_controllers_whitelist = |
|
242 | 242 | # ChangesetController:changeset_patch, |
|
243 | 243 | # ChangesetController:changeset_raw, |
|
244 | 244 | # FilesController:raw, |
|
245 | 245 | # FilesController:archivefile |
|
246 | 246 | |
|
247 | 247 | ## default encoding used to convert from and to unicode |
|
248 | 248 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
249 | 249 | default_encoding = utf8 |
|
250 | 250 | |
|
251 | 251 | ## issue tracker for Kallithea (leave blank to disable, absent for default) |
|
252 | 252 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
253 | 253 | |
|
254 | 254 | ## issue tracking mapping for commits messages |
|
255 | 255 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
256 | 256 | |
|
257 | 257 | ## pattern to get the issues from commit messages |
|
258 | 258 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
259 | 259 | ## {id} will be all groups matched from this pattern |
|
260 | 260 | |
|
261 | 261 | issue_pat = (?:\s*#)(\d+) |
|
262 | 262 | |
|
263 | 263 | ## server url to the issue, each {id} will be replaced with match |
|
264 | 264 | ## fetched from the regex and {repo} is replaced with full repository name |
|
265 | 265 | ## including groups {repo_name} is replaced with just name of repo |
|
266 | 266 | |
|
267 | 267 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
268 | 268 | |
|
269 | 269 | ## prefix to add to link to indicate it's an url |
|
270 | 270 | ## #314 will be replaced by <issue_prefix><id> |
|
271 | 271 | |
|
272 | 272 | issue_prefix = # |
|
273 | 273 | |
|
274 | 274 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
275 | 275 | ## multiple patterns, to other issues server, wiki or others |
|
276 | 276 | ## below an example how to create a wiki pattern |
|
277 | 277 | # wiki-some-id -> https://mywiki.com/some-id |
|
278 | 278 | |
|
279 | 279 | #issue_pat_wiki = (?:wiki-)(.+) |
|
280 | 280 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
281 | 281 | #issue_prefix_wiki = WIKI- |
|
282 | 282 | |
|
283 | 283 | ## instance-id prefix |
|
284 | 284 | ## a prefix key for this instance used for cache invalidation when running |
|
285 | 285 | ## multiple instances of kallithea, make sure it's globally unique for |
|
286 | 286 | ## all running kallithea instances. Leave empty if you don't use it |
|
287 | 287 | instance_id = |
|
288 | 288 | |
|
289 | 289 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
290 | 290 | ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with |
|
291 | 291 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
292 | 292 | auth_ret_code = |
|
293 | 293 | |
|
294 | 294 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
295 | 295 | ## codes don't break the transactions while 4XX codes do |
|
296 | 296 | lock_ret_code = 423 |
|
297 | 297 | |
|
298 | 298 | ## allows to change the repository location in settings page |
|
299 | 299 | allow_repo_location_change = True |
|
300 | 300 | |
|
301 | 301 | ## allows to setup custom hooks in settings page |
|
302 | 302 | allow_custom_hooks_settings = True |
|
303 | 303 | |
|
304 | 304 | #################################### |
|
305 | 305 | ### CELERY CONFIG #### |
|
306 | 306 | #################################### |
|
307 | 307 | |
|
308 | 308 | use_celery = false |
|
309 | 309 | broker.host = localhost |
|
310 | 310 | broker.vhost = rabbitmqhost |
|
311 | 311 | broker.port = 5672 |
|
312 | 312 | broker.user = rabbitmq |
|
313 | 313 | broker.password = qweqwe |
|
314 | 314 | |
|
315 | 315 | celery.imports = kallithea.lib.celerylib.tasks |
|
316 | 316 | |
|
317 | 317 | celery.result.backend = amqp |
|
318 | 318 | celery.result.dburi = amqp:// |
|
319 | 319 | celery.result.serialier = json |
|
320 | 320 | |
|
321 | 321 | #celery.send.task.error.emails = true |
|
322 | 322 | #celery.amqp.task.result.expires = 18000 |
|
323 | 323 | |
|
324 | 324 | celeryd.concurrency = 2 |
|
325 | 325 | #celeryd.log.file = celeryd.log |
|
326 | 326 | celeryd.log.level = DEBUG |
|
327 | 327 | celeryd.max.tasks.per.child = 1 |
|
328 | 328 | |
|
329 | 329 | ## tasks will never be sent to the queue, but executed locally instead. |
|
330 | 330 | celery.always.eager = false |
|
331 | 331 | |
|
332 | 332 | #################################### |
|
333 | 333 | ### BEAKER CACHE #### |
|
334 | 334 | #################################### |
|
335 | 335 | |
|
336 | 336 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
337 | 337 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
338 | 338 | |
|
339 |
beaker.cache.regions = |
|
|
340 | ||
|
341 | beaker.cache.super_short_term.type = memory | |
|
342 | beaker.cache.super_short_term.expire = 10 | |
|
343 | beaker.cache.super_short_term.key_length = 256 | |
|
339 | beaker.cache.regions = short_term,long_term,sql_cache_short | |
|
344 | 340 | |
|
345 | 341 | beaker.cache.short_term.type = memory |
|
346 | 342 | beaker.cache.short_term.expire = 60 |
|
347 | 343 | beaker.cache.short_term.key_length = 256 |
|
348 | 344 | |
|
349 | 345 | beaker.cache.long_term.type = memory |
|
350 | 346 | beaker.cache.long_term.expire = 36000 |
|
351 | 347 | beaker.cache.long_term.key_length = 256 |
|
352 | 348 | |
|
353 | 349 | beaker.cache.sql_cache_short.type = memory |
|
354 | 350 | beaker.cache.sql_cache_short.expire = 10 |
|
355 | 351 | beaker.cache.sql_cache_short.key_length = 256 |
|
356 | 352 | |
|
357 | beaker.cache.sql_cache_med.type = memory | |
|
358 | beaker.cache.sql_cache_med.expire = 360 | |
|
359 | beaker.cache.sql_cache_med.key_length = 256 | |
|
360 | ||
|
361 | beaker.cache.sql_cache_long.type = file | |
|
362 | beaker.cache.sql_cache_long.expire = 3600 | |
|
363 | beaker.cache.sql_cache_long.key_length = 256 | |
|
364 | ||
|
365 | 353 | #################################### |
|
366 | 354 | ### BEAKER SESSION #### |
|
367 | 355 | #################################### |
|
368 | 356 | ## Type of storage used for the session, current types are |
|
369 | 357 | ## dbm, file, memcached, database, and memory. |
|
370 | 358 | ## The storage uses the Container API |
|
371 | 359 | ## that is also used by the cache system. |
|
372 | 360 | |
|
373 | 361 | ## db session ## |
|
374 | 362 | #beaker.session.type = ext:database |
|
375 | 363 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
376 | 364 | #beaker.session.table_name = db_session |
|
377 | 365 | |
|
378 | 366 | ## encrypted cookie client side session, good for many instances ## |
|
379 | 367 | #beaker.session.type = cookie |
|
380 | 368 | |
|
381 | 369 | ## file based cookies (default) ## |
|
382 | 370 | #beaker.session.type = file |
|
383 | 371 | |
|
384 | 372 | ## beaker.session.key should be unique for a given host, even when running |
|
385 | 373 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
386 | 374 | beaker.session.key = kallithea |
|
387 | 375 | beaker.session.secret = development-not-secret |
|
388 | 376 | |
|
389 | 377 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
390 | 378 | ## you must disable beaker.session.secret to use this |
|
391 | 379 | #beaker.session.encrypt_key = <key_for_encryption> |
|
392 | 380 | #beaker.session.validate_key = <validation_key> |
|
393 | 381 | |
|
394 | 382 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
395 | 383 | beaker.session.timeout = 2592000 |
|
396 | 384 | beaker.session.httponly = true |
|
397 | 385 | #beaker.session.cookie_path = /<your-prefix> |
|
398 | 386 | |
|
399 | 387 | ## uncomment for https secure cookie |
|
400 | 388 | beaker.session.secure = false |
|
401 | 389 | |
|
402 | 390 | ## auto save the session to not to use .save() |
|
403 | 391 | beaker.session.auto = False |
|
404 | 392 | |
|
405 | 393 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
406 | 394 | #beaker.session.cookie_expires = 3600 |
|
407 | 395 | |
|
408 | 396 | ############################ |
|
409 | 397 | ## ERROR HANDLING SYSTEMS ## |
|
410 | 398 | ############################ |
|
411 | 399 | |
|
412 | 400 | #################### |
|
413 | 401 | ### [errormator] ### |
|
414 | 402 | #################### |
|
415 | 403 | |
|
416 | 404 | ## Errormator is tailored to work with Kallithea, see |
|
417 | 405 | ## http://errormator.com for details how to obtain an account |
|
418 | 406 | ## you must install python package `errormator_client` to make it work |
|
419 | 407 | |
|
420 | 408 | ## errormator enabled |
|
421 | 409 | errormator = false |
|
422 | 410 | |
|
423 | 411 | errormator.server_url = https://api.errormator.com |
|
424 | 412 | errormator.api_key = YOUR_API_KEY |
|
425 | 413 | |
|
426 | 414 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
427 | 415 | |
|
428 | 416 | ## enables 404 error logging (default False) |
|
429 | 417 | errormator.report_404 = false |
|
430 | 418 | |
|
431 | 419 | ## time in seconds after request is considered being slow (default 1) |
|
432 | 420 | errormator.slow_request_time = 1 |
|
433 | 421 | |
|
434 | 422 | ## record slow requests in application |
|
435 | 423 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
436 | 424 | errormator.slow_requests = true |
|
437 | 425 | |
|
438 | 426 | ## enable hooking to application loggers |
|
439 | 427 | #errormator.logging = true |
|
440 | 428 | |
|
441 | 429 | ## minimum log level for log capture |
|
442 | 430 | #errormator.logging.level = WARNING |
|
443 | 431 | |
|
444 | 432 | ## send logs only from erroneous/slow requests |
|
445 | 433 | ## (saves API quota for intensive logging) |
|
446 | 434 | errormator.logging_on_error = false |
|
447 | 435 | |
|
448 | 436 | ## list of additonal keywords that should be grabbed from environ object |
|
449 | 437 | ## can be string with comma separated list of words in lowercase |
|
450 | 438 | ## (by default client will always send following info: |
|
451 | 439 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
452 | 440 | ## start with HTTP* this list be extended with additional keywords here |
|
453 | 441 | errormator.environ_keys_whitelist = |
|
454 | 442 | |
|
455 | 443 | ## list of keywords that should be blanked from request object |
|
456 | 444 | ## can be string with comma separated list of words in lowercase |
|
457 | 445 | ## (by default client will always blank keys that contain following words |
|
458 | 446 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
459 | 447 | ## this list be extended with additional keywords set here |
|
460 | 448 | errormator.request_keys_blacklist = |
|
461 | 449 | |
|
462 | 450 | ## list of namespaces that should be ignores when gathering log entries |
|
463 | 451 | ## can be string with comma separated list of namespaces |
|
464 | 452 | ## (by default the client ignores own entries: errormator_client.client) |
|
465 | 453 | errormator.log_namespace_blacklist = |
|
466 | 454 | |
|
467 | 455 | ################ |
|
468 | 456 | ### [sentry] ### |
|
469 | 457 | ################ |
|
470 | 458 | |
|
471 | 459 | ## sentry is a alternative open source error aggregator |
|
472 | 460 | ## you must install python packages `sentry` and `raven` to enable |
|
473 | 461 | |
|
474 | 462 | sentry.dsn = YOUR_DNS |
|
475 | 463 | sentry.servers = |
|
476 | 464 | sentry.name = |
|
477 | 465 | sentry.key = |
|
478 | 466 | sentry.public_key = |
|
479 | 467 | sentry.secret_key = |
|
480 | 468 | sentry.project = |
|
481 | 469 | sentry.site = |
|
482 | 470 | sentry.include_paths = |
|
483 | 471 | sentry.exclude_paths = |
|
484 | 472 | |
|
485 | 473 | ################################################################################ |
|
486 | 474 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
487 | 475 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
488 | 476 | ## execute malicious code after an exception is raised. ## |
|
489 | 477 | ################################################################################ |
|
490 | 478 | #set debug = false |
|
491 | 479 | set debug = true |
|
492 | 480 | |
|
493 | 481 | ################################## |
|
494 | 482 | ### LOGVIEW CONFIG ### |
|
495 | 483 | ################################## |
|
496 | 484 | |
|
497 | 485 | logview.sqlalchemy = #faa |
|
498 | 486 | logview.pylons.templating = #bfb |
|
499 | 487 | logview.pylons.util = #eee |
|
500 | 488 | |
|
501 | 489 | ######################################################### |
|
502 | 490 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
503 | 491 | ######################################################### |
|
504 | 492 | |
|
505 | 493 | # SQLITE [default] |
|
506 | 494 | sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
507 | 495 | |
|
508 | 496 | # POSTGRESQL |
|
509 | 497 | #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea |
|
510 | 498 | |
|
511 | 499 | # MySQL |
|
512 | 500 | #sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea |
|
513 | 501 | |
|
514 | 502 | # see sqlalchemy docs for others |
|
515 | 503 | |
|
516 | 504 | sqlalchemy.db1.echo = false |
|
517 | 505 | sqlalchemy.db1.pool_recycle = 3600 |
|
518 | 506 | sqlalchemy.db1.convert_unicode = true |
|
519 | 507 | |
|
520 | 508 | ################################ |
|
521 | 509 | ### LOGGING CONFIGURATION #### |
|
522 | 510 | ################################ |
|
523 | 511 | |
|
524 | 512 | [loggers] |
|
525 | 513 | keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer |
|
526 | 514 | |
|
527 | 515 | [handlers] |
|
528 | 516 | keys = console, console_sql |
|
529 | 517 | |
|
530 | 518 | [formatters] |
|
531 | 519 | keys = generic, color_formatter, color_formatter_sql |
|
532 | 520 | |
|
533 | 521 | ############# |
|
534 | 522 | ## LOGGERS ## |
|
535 | 523 | ############# |
|
536 | 524 | |
|
537 | 525 | [logger_root] |
|
538 | 526 | level = NOTSET |
|
539 | 527 | handlers = console |
|
540 | 528 | |
|
541 | 529 | [logger_routes] |
|
542 | 530 | level = DEBUG |
|
543 | 531 | handlers = |
|
544 | 532 | qualname = routes.middleware |
|
545 | 533 | ## "level = DEBUG" logs the route matched and routing variables. |
|
546 | 534 | propagate = 1 |
|
547 | 535 | |
|
548 | 536 | [logger_beaker] |
|
549 | 537 | level = DEBUG |
|
550 | 538 | handlers = |
|
551 | 539 | qualname = beaker.container |
|
552 | 540 | propagate = 1 |
|
553 | 541 | |
|
554 | 542 | [logger_templates] |
|
555 | 543 | level = INFO |
|
556 | 544 | handlers = |
|
557 | 545 | qualname = pylons.templating |
|
558 | 546 | propagate = 1 |
|
559 | 547 | |
|
560 | 548 | [logger_kallithea] |
|
561 | 549 | level = DEBUG |
|
562 | 550 | handlers = |
|
563 | 551 | qualname = kallithea |
|
564 | 552 | propagate = 1 |
|
565 | 553 | |
|
566 | 554 | [logger_sqlalchemy] |
|
567 | 555 | level = INFO |
|
568 | 556 | handlers = console_sql |
|
569 | 557 | qualname = sqlalchemy.engine |
|
570 | 558 | propagate = 0 |
|
571 | 559 | |
|
572 | 560 | [logger_whoosh_indexer] |
|
573 | 561 | level = DEBUG |
|
574 | 562 | handlers = |
|
575 | 563 | qualname = whoosh_indexer |
|
576 | 564 | propagate = 1 |
|
577 | 565 | |
|
578 | 566 | ############## |
|
579 | 567 | ## HANDLERS ## |
|
580 | 568 | ############## |
|
581 | 569 | |
|
582 | 570 | [handler_console] |
|
583 | 571 | class = StreamHandler |
|
584 | 572 | args = (sys.stderr,) |
|
585 | 573 | #level = INFO |
|
586 | 574 | #formatter = generic |
|
587 | 575 | level = DEBUG |
|
588 | 576 | formatter = color_formatter |
|
589 | 577 | |
|
590 | 578 | [handler_console_sql] |
|
591 | 579 | class = StreamHandler |
|
592 | 580 | args = (sys.stderr,) |
|
593 | 581 | #level = WARN |
|
594 | 582 | #formatter = generic |
|
595 | 583 | level = DEBUG |
|
596 | 584 | formatter = color_formatter_sql |
|
597 | 585 | |
|
598 | 586 | ################ |
|
599 | 587 | ## FORMATTERS ## |
|
600 | 588 | ################ |
|
601 | 589 | |
|
602 | 590 | [formatter_generic] |
|
603 | 591 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
604 | 592 | datefmt = %Y-%m-%d %H:%M:%S |
|
605 | 593 | |
|
606 | 594 | [formatter_color_formatter] |
|
607 | 595 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
608 | 596 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
609 | 597 | datefmt = %Y-%m-%d %H:%M:%S |
|
610 | 598 | |
|
611 | 599 | [formatter_color_formatter_sql] |
|
612 | 600 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
613 | 601 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
614 | 602 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,66 +1,57 b'' | |||
|
1 | 1 | .. _performance: |
|
2 | 2 | |
|
3 | 3 | ================================ |
|
4 | 4 | Optimizing Kallithea Performance |
|
5 | 5 | ================================ |
|
6 | 6 | |
|
7 | 7 | When serving a large amount of big repositories, Kallithea can start |
|
8 | 8 | performing slower than expected. Because of the demanding nature of handling large |
|
9 | 9 | amounts of data from version control systems, here are some tips on how to get |
|
10 | 10 | the best performance. |
|
11 | 11 | |
|
12 | 12 | * Kallithea will perform better on machines with faster disks (SSD/SAN). It's |
|
13 | 13 | more important to have a faster disk than a faster CPU. |
|
14 | 14 | |
|
15 | 15 | * Slowness on initial page can be easily fixed by grouping repositories, and/or |
|
16 | 16 | increasing cache size (see below). This includes using the lightweight dashboard |
|
17 | 17 | option and ``vcs_full_cache`` setting in .ini file |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | Follow these few steps to improve performance of Kallithea system. |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | 1. Increase cache |
|
24 | 24 | |
|
25 | In the .ini file:: | |
|
26 | ||
|
27 | beaker.cache.sql_cache_long.expire=3600 <-- set this to higher number | |
|
28 | ||
|
29 | This option affects the cache expiration time for the main | |
|
30 | page. Having several hundreds of repositories on main page can | |
|
31 | sometimes make the system behave slowly when the cache expires for | |
|
32 | all of them. Increasing the ``expire`` option to a day (86400) or a | |
|
33 | week (604800) will improve general response times for the main | |
|
34 | page. Kallithea has an intelligent cache expiration system and it | |
|
35 | will expire the cache for repositories that have been changed. | |
|
25 | Tweak beaker cache settings in the ini file. That actual effect of that | |
|
26 | is questionable. | |
|
36 | 27 | |
|
37 | 28 | 2. Switch from sqlite to postgres or mysql |
|
38 | 29 | |
|
39 | 30 | sqlite is a good option when having a small load on the system. But due to |
|
40 | 31 | locking issues with sqlite, it is not recommended to use it for larger |
|
41 | 32 | deployments. Switching to mysql or postgres will result in an immediate |
|
42 | 33 | performance increase. A tool like SQLAlchemyGrate_ can be used for |
|
43 | 34 | migrating to another database platform. |
|
44 | 35 | |
|
45 | 36 | 3. Scale Kallithea horizontally |
|
46 | 37 | |
|
47 | 38 | Scaling horizontally can give huge performance increases when dealing with |
|
48 | 39 | large traffic (large amount of users, CI servers etc). Kallithea can be |
|
49 | 40 | scaled horizontally on one (recommended) or multiple machines. In order |
|
50 | 41 | to scale horizontally you need to do the following: |
|
51 | 42 | |
|
52 | 43 | - Each instance needs its own .ini file and unique ``instance_id`` set. |
|
53 | 44 | - Each instance's ``data`` storage needs to be configured to be stored on a |
|
54 | 45 | shared disk storage, preferably together with repositories. This ``data`` |
|
55 | 46 | dir contains template caches, sessions, whoosh index and is used for |
|
56 | 47 | task locking (so it is safe across multiple instances). Set the |
|
57 | 48 | ``cache_dir``, ``index_dir``, ``beaker.cache.data_dir``, ``beaker.cache.lock_dir`` |
|
58 | 49 | variables in each .ini file to a shared location across Kallithea instances |
|
59 | 50 | - If celery is used each instance should run a separate Celery instance, but |
|
60 | 51 | the message broker should be common to all of them (e.g., one |
|
61 | 52 | shared RabbitMQ server) |
|
62 | 53 | - Load balance using round robin or IP hash, recommended is writing LB rules |
|
63 | 54 | that will separate regular user traffic from automated processes like CI |
|
64 | 55 | servers or build bots. |
|
65 | 56 | |
|
66 | 57 | .. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate |
@@ -1,614 +1,602 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%text>################################################################################</%text> |
|
3 | 3 | <%text>################################################################################</%text> |
|
4 | 4 | # Kallithea - config file generated with kallithea-config # |
|
5 | 5 | <%text>################################################################################</%text> |
|
6 | 6 | <%text>################################################################################</%text> |
|
7 | 7 | |
|
8 | 8 | [DEFAULT] |
|
9 | 9 | debug = true |
|
10 | 10 | pdebug = false |
|
11 | 11 | |
|
12 | 12 | <%text>################################################################################</%text> |
|
13 | 13 | <%text>## E-mail settings ##</%text> |
|
14 | 14 | <%text>## ##</%text> |
|
15 | 15 | <%text>## Refer to the documentation ("E-mail settings") for more details. ##</%text> |
|
16 | 16 | <%text>## ##</%text> |
|
17 | 17 | <%text>## It is recommended to use a valid sender address that passes access ##</%text> |
|
18 | 18 | <%text>## validation and spam filtering in mail servers. ##</%text> |
|
19 | 19 | <%text>################################################################################</%text> |
|
20 | 20 | |
|
21 | 21 | <%text>## 'From' header for application e-mails. You can optionally add a name.</%text> |
|
22 | 22 | <%text>## Default:</%text> |
|
23 | 23 | #app_email_from = Kallithea |
|
24 | 24 | <%text>## Examples:</%text> |
|
25 | 25 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
26 | 26 | #app_email_from = kallithea-noreply@example.com |
|
27 | 27 | |
|
28 | 28 | <%text>## Subject prefix for application e-mails.</%text> |
|
29 | 29 | <%text>## A space between this prefix and the real subject is automatically added.</%text> |
|
30 | 30 | <%text>## Default:</%text> |
|
31 | 31 | #email_prefix = |
|
32 | 32 | <%text>## Example:</%text> |
|
33 | 33 | #email_prefix = [Kallithea] |
|
34 | 34 | |
|
35 | 35 | <%text>## Recipients for error e-mails and fallback recipients of application mails.</%text> |
|
36 | 36 | <%text>## Multiple addresses can be specified, space-separated.</%text> |
|
37 | 37 | <%text>## Only addresses are allowed, do not add any name part.</%text> |
|
38 | 38 | <%text>## Default:</%text> |
|
39 | 39 | #email_to = |
|
40 | 40 | <%text>## Examples:</%text> |
|
41 | 41 | #email_to = admin@example.com |
|
42 | 42 | #email_to = admin@example.com another_admin@example.com |
|
43 | 43 | |
|
44 | 44 | <%text>## 'From' header for error e-mails. You can optionally add a name.</%text> |
|
45 | 45 | <%text>## Default:</%text> |
|
46 | 46 | #error_email_from = pylons@yourapp.com |
|
47 | 47 | <%text>## Examples:</%text> |
|
48 | 48 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
49 | 49 | #error_email_from = paste_error@example.com |
|
50 | 50 | |
|
51 | 51 | <%text>## SMTP server settings</%text> |
|
52 | 52 | <%text>## Only smtp_server is mandatory. All other settings take the specified default</%text> |
|
53 | 53 | <%text>## values.</%text> |
|
54 | 54 | #smtp_server = mail.server.com |
|
55 | 55 | #smtp_username = |
|
56 | 56 | #smtp_password = |
|
57 | 57 | #smtp_port = 25 |
|
58 | 58 | #smtp_use_tls = false |
|
59 | 59 | #smtp_use_ssl = false |
|
60 | 60 | <%text>## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).</%text> |
|
61 | 61 | <%text>## If empty, use any of the authentication parameters supported by the server.</%text> |
|
62 | 62 | #smtp_auth = |
|
63 | 63 | |
|
64 | 64 | [server:main] |
|
65 | 65 | %if http_server == 'paste': |
|
66 | 66 | <%text>## PASTE ##</%text> |
|
67 | 67 | use = egg:Paste#http |
|
68 | 68 | <%text>## nr of worker threads to spawn</%text> |
|
69 | 69 | threadpool_workers = 5 |
|
70 | 70 | <%text>## max request before thread respawn</%text> |
|
71 | 71 | threadpool_max_requests = 10 |
|
72 | 72 | <%text>## option to use threads of process</%text> |
|
73 | 73 | use_threadpool = true |
|
74 | 74 | |
|
75 | 75 | %elif http_server == 'waitress': |
|
76 | 76 | <%text>## WAITRESS ##</%text> |
|
77 | 77 | use = egg:waitress#main |
|
78 | 78 | <%text>## number of worker threads</%text> |
|
79 | 79 | threads = 5 |
|
80 | 80 | <%text>## MAX BODY SIZE 100GB</%text> |
|
81 | 81 | max_request_body_size = 107374182400 |
|
82 | 82 | <%text>## use poll instead of select, fixes fd limits, may not work on old</%text> |
|
83 | 83 | <%text>## windows systems.</%text> |
|
84 | 84 | #asyncore_use_poll = True |
|
85 | 85 | |
|
86 | 86 | %elif http_server == 'gunicorn': |
|
87 | 87 | <%text>## GUNICORN ##</%text> |
|
88 | 88 | use = egg:gunicorn#main |
|
89 | 89 | <%text>## number of process workers. You must set `instance_id = *` when this option</%text> |
|
90 | 90 | <%text>## is set to more than one worker</%text> |
|
91 | 91 | workers = 1 |
|
92 | 92 | <%text>## process name</%text> |
|
93 | 93 | proc_name = kallithea |
|
94 | 94 | <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text> |
|
95 | 95 | <%text>## recommended for bigger setup is using of of other than sync one</%text> |
|
96 | 96 | worker_class = sync |
|
97 | 97 | max_requests = 1000 |
|
98 | 98 | <%text>## ammount of time a worker can handle request before it gets killed and</%text> |
|
99 | 99 | <%text>## restarted</%text> |
|
100 | 100 | timeout = 3600 |
|
101 | 101 | |
|
102 | 102 | %elif http_server == 'uwsgi': |
|
103 | 103 | <%text>## UWSGI ##</%text> |
|
104 | 104 | <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text> |
|
105 | 105 | [uwsgi] |
|
106 | 106 | socket = /tmp/uwsgi.sock |
|
107 | 107 | master = true |
|
108 | 108 | http = 127.0.0.1:5000 |
|
109 | 109 | |
|
110 | 110 | <%text>## set as deamon and redirect all output to file</%text> |
|
111 | 111 | #daemonize = ./uwsgi_kallithea.log |
|
112 | 112 | |
|
113 | 113 | <%text>## master process PID</%text> |
|
114 | 114 | pidfile = ./uwsgi_kallithea.pid |
|
115 | 115 | |
|
116 | 116 | <%text>## stats server with workers statistics, use uwsgitop</%text> |
|
117 | 117 | <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text> |
|
118 | 118 | stats = 127.0.0.1:1717 |
|
119 | 119 | memory-report = true |
|
120 | 120 | |
|
121 | 121 | <%text>## log 5XX errors</%text> |
|
122 | 122 | log-5xx = true |
|
123 | 123 | |
|
124 | 124 | <%text>## Set the socket listen queue size.</%text> |
|
125 | 125 | listen = 256 |
|
126 | 126 | |
|
127 | 127 | <%text>## Gracefully Reload workers after the specified amount of managed requests</%text> |
|
128 | 128 | <%text>## (avoid memory leaks).</%text> |
|
129 | 129 | max-requests = 1000 |
|
130 | 130 | |
|
131 | 131 | <%text>## enable large buffers</%text> |
|
132 | 132 | buffer-size = 65535 |
|
133 | 133 | |
|
134 | 134 | <%text>## socket and http timeouts ##</%text> |
|
135 | 135 | http-timeout = 3600 |
|
136 | 136 | socket-timeout = 3600 |
|
137 | 137 | |
|
138 | 138 | <%text>## Log requests slower than the specified number of milliseconds.</%text> |
|
139 | 139 | log-slow = 10 |
|
140 | 140 | |
|
141 | 141 | <%text>## Exit if no app can be loaded.</%text> |
|
142 | 142 | need-app = true |
|
143 | 143 | |
|
144 | 144 | <%text>## Set lazy mode (load apps in workers instead of master).</%text> |
|
145 | 145 | lazy = true |
|
146 | 146 | |
|
147 | 147 | <%text>## scaling ##</%text> |
|
148 | 148 | <%text>## set cheaper algorithm to use, if not set default will be used</%text> |
|
149 | 149 | cheaper-algo = spare |
|
150 | 150 | |
|
151 | 151 | <%text>## minimum number of workers to keep at all times</%text> |
|
152 | 152 | cheaper = 1 |
|
153 | 153 | |
|
154 | 154 | <%text>## number of workers to spawn at startup</%text> |
|
155 | 155 | cheaper-initial = 1 |
|
156 | 156 | |
|
157 | 157 | <%text>## maximum number of workers that can be spawned</%text> |
|
158 | 158 | workers = 4 |
|
159 | 159 | |
|
160 | 160 | <%text>## how many workers should be spawned at a time</%text> |
|
161 | 161 | cheaper-step = 1 |
|
162 | 162 | |
|
163 | 163 | %endif |
|
164 | 164 | <%text>## COMMON ##</%text> |
|
165 | 165 | host = ${host} |
|
166 | 166 | port = ${port} |
|
167 | 167 | |
|
168 | 168 | <%text>## middleware for hosting the WSGI application under a URL prefix</%text> |
|
169 | 169 | #[filter:proxy-prefix] |
|
170 | 170 | #use = egg:PasteDeploy#prefix |
|
171 | 171 | #prefix = /<your-prefix> |
|
172 | 172 | |
|
173 | 173 | [app:main] |
|
174 | 174 | use = egg:kallithea |
|
175 | 175 | <%text>## enable proxy prefix middleware</%text> |
|
176 | 176 | #filter-with = proxy-prefix |
|
177 | 177 | |
|
178 | 178 | full_stack = true |
|
179 | 179 | static_files = true |
|
180 | 180 | <%text>## Available Languages:</%text> |
|
181 | 181 | <%text>## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW</%text> |
|
182 | 182 | lang = |
|
183 | 183 | cache_dir = ${here}/data |
|
184 | 184 | index_dir = ${here}/data/index |
|
185 | 185 | |
|
186 | 186 | <%text>## perform a full repository scan on each server start, this should be</%text> |
|
187 | 187 | <%text>## set to false after first startup, to allow faster server restarts.</%text> |
|
188 | 188 | initial_repo_scan = false |
|
189 | 189 | |
|
190 | 190 | <%text>## uncomment and set this path to use archive download cache</%text> |
|
191 | 191 | archive_cache_dir = ${here}/tarballcache |
|
192 | 192 | |
|
193 | 193 | <%text>## change this to unique ID for security</%text> |
|
194 | 194 | app_instance_uuid = ${uuid()} |
|
195 | 195 | |
|
196 | 196 | <%text>## cut off limit for large diffs (size in bytes)</%text> |
|
197 | 197 | cut_off_limit = 256000 |
|
198 | 198 | |
|
199 | 199 | <%text>## use cache version of scm repo everywhere</%text> |
|
200 | 200 | vcs_full_cache = true |
|
201 | 201 | |
|
202 | 202 | <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text> |
|
203 | 203 | force_https = false |
|
204 | 204 | |
|
205 | 205 | <%text>## use Strict-Transport-Security headers</%text> |
|
206 | 206 | use_htsts = false |
|
207 | 207 | |
|
208 | 208 | <%text>## number of commits stats will parse on each iteration</%text> |
|
209 | 209 | commit_parse_limit = 25 |
|
210 | 210 | |
|
211 | 211 | <%text>## path to git executable</%text> |
|
212 | 212 | git_path = git |
|
213 | 213 | |
|
214 | 214 | <%text>## git rev filter option, --all is the default filter, if you need to</%text> |
|
215 | 215 | <%text>## hide all refs in changelog switch this to --branches --tags</%text> |
|
216 | 216 | #git_rev_filter = --branches --tags |
|
217 | 217 | |
|
218 | 218 | <%text>## RSS feed options</%text> |
|
219 | 219 | rss_cut_off_limit = 256000 |
|
220 | 220 | rss_items_per_page = 10 |
|
221 | 221 | rss_include_diff = false |
|
222 | 222 | |
|
223 | 223 | <%text>## options for showing and identifying changesets</%text> |
|
224 | 224 | show_sha_length = 12 |
|
225 | 225 | show_revision_number = false |
|
226 | 226 | |
|
227 | 227 | <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text> |
|
228 | 228 | <%text>## url that does rewrites to _admin/gists/<gistid>.</%text> |
|
229 | 229 | <%text>## example: http://gist.kallithea.server/{gistid}. Empty means use the internal</%text> |
|
230 | 230 | <%text>## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid></%text> |
|
231 | 231 | gist_alias_url = |
|
232 | 232 | |
|
233 | 233 | <%text>## white list of API enabled controllers. This allows to add list of</%text> |
|
234 | 234 | <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text> |
|
235 | 235 | <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text> |
|
236 | 236 | <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text> |
|
237 | 237 | <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text> |
|
238 | 238 | <%text>## Recommended settings below are commented out:</%text> |
|
239 | 239 | api_access_controllers_whitelist = |
|
240 | 240 | # ChangesetController:changeset_patch, |
|
241 | 241 | # ChangesetController:changeset_raw, |
|
242 | 242 | # FilesController:raw, |
|
243 | 243 | # FilesController:archivefile |
|
244 | 244 | |
|
245 | 245 | <%text>## default encoding used to convert from and to unicode</%text> |
|
246 | 246 | <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text> |
|
247 | 247 | default_encoding = utf8 |
|
248 | 248 | |
|
249 | 249 | <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text> |
|
250 | 250 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
251 | 251 | |
|
252 | 252 | <%text>## issue tracking mapping for commits messages</%text> |
|
253 | 253 | <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text> |
|
254 | 254 | |
|
255 | 255 | <%text>## pattern to get the issues from commit messages</%text> |
|
256 | 256 | <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text> |
|
257 | 257 | <%text>## {id} will be all groups matched from this pattern</%text> |
|
258 | 258 | |
|
259 | 259 | issue_pat = (?:\s*#)(\d+) |
|
260 | 260 | |
|
261 | 261 | <%text>## server url to the issue, each {id} will be replaced with match</%text> |
|
262 | 262 | <%text>## fetched from the regex and {repo} is replaced with full repository name</%text> |
|
263 | 263 | <%text>## including groups {repo_name} is replaced with just name of repo</%text> |
|
264 | 264 | |
|
265 | 265 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
266 | 266 | |
|
267 | 267 | <%text>## prefix to add to link to indicate it's an url</%text> |
|
268 | 268 | <%text>## #314 will be replaced by <issue_prefix><id></%text> |
|
269 | 269 | |
|
270 | 270 | issue_prefix = # |
|
271 | 271 | |
|
272 | 272 | <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text> |
|
273 | 273 | <%text>## multiple patterns, to other issues server, wiki or others</%text> |
|
274 | 274 | <%text>## below an example how to create a wiki pattern</%text> |
|
275 | 275 | # wiki-some-id -> https://mywiki.com/some-id |
|
276 | 276 | |
|
277 | 277 | #issue_pat_wiki = (?:wiki-)(.+) |
|
278 | 278 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
279 | 279 | #issue_prefix_wiki = WIKI- |
|
280 | 280 | |
|
281 | 281 | <%text>## instance-id prefix</%text> |
|
282 | 282 | <%text>## a prefix key for this instance used for cache invalidation when running</%text> |
|
283 | 283 | <%text>## multiple instances of kallithea, make sure it's globally unique for</%text> |
|
284 | 284 | <%text>## all running kallithea instances. Leave empty if you don't use it</%text> |
|
285 | 285 | instance_id = |
|
286 | 286 | |
|
287 | 287 | <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text> |
|
288 | 288 | <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text> |
|
289 | 289 | <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text> |
|
290 | 290 | auth_ret_code = |
|
291 | 291 | |
|
292 | 292 | <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text> |
|
293 | 293 | <%text>## codes don't break the transactions while 4XX codes do</%text> |
|
294 | 294 | lock_ret_code = 423 |
|
295 | 295 | |
|
296 | 296 | <%text>## allows to change the repository location in settings page</%text> |
|
297 | 297 | allow_repo_location_change = True |
|
298 | 298 | |
|
299 | 299 | <%text>## allows to setup custom hooks in settings page</%text> |
|
300 | 300 | allow_custom_hooks_settings = True |
|
301 | 301 | |
|
302 | 302 | <%text>####################################</%text> |
|
303 | 303 | <%text>### CELERY CONFIG ####</%text> |
|
304 | 304 | <%text>####################################</%text> |
|
305 | 305 | |
|
306 | 306 | use_celery = false |
|
307 | 307 | broker.host = localhost |
|
308 | 308 | broker.vhost = rabbitmqhost |
|
309 | 309 | broker.port = 5672 |
|
310 | 310 | broker.user = rabbitmq |
|
311 | 311 | broker.password = qweqwe |
|
312 | 312 | |
|
313 | 313 | celery.imports = kallithea.lib.celerylib.tasks |
|
314 | 314 | |
|
315 | 315 | celery.result.backend = amqp |
|
316 | 316 | celery.result.dburi = amqp:// |
|
317 | 317 | celery.result.serialier = json |
|
318 | 318 | |
|
319 | 319 | #celery.send.task.error.emails = true |
|
320 | 320 | #celery.amqp.task.result.expires = 18000 |
|
321 | 321 | |
|
322 | 322 | celeryd.concurrency = 2 |
|
323 | 323 | #celeryd.log.file = celeryd.log |
|
324 | 324 | celeryd.log.level = DEBUG |
|
325 | 325 | celeryd.max.tasks.per.child = 1 |
|
326 | 326 | |
|
327 | 327 | <%text>## tasks will never be sent to the queue, but executed locally instead.</%text> |
|
328 | 328 | celery.always.eager = false |
|
329 | 329 | |
|
330 | 330 | <%text>####################################</%text> |
|
331 | 331 | <%text>### BEAKER CACHE ####</%text> |
|
332 | 332 | <%text>####################################</%text> |
|
333 | 333 | |
|
334 | 334 | beaker.cache.data_dir = ${here}/data/cache/data |
|
335 | 335 | beaker.cache.lock_dir = ${here}/data/cache/lock |
|
336 | 336 | |
|
337 |
beaker.cache.regions = s |
|
|
338 | ||
|
339 | beaker.cache.super_short_term.type = memory | |
|
340 | beaker.cache.super_short_term.expire = 10 | |
|
341 | beaker.cache.super_short_term.key_length = 256 | |
|
337 | beaker.cache.regions = short_term,long_term,sql_cache_short | |
|
342 | 338 | |
|
343 | 339 | beaker.cache.short_term.type = memory |
|
344 | 340 | beaker.cache.short_term.expire = 60 |
|
345 | 341 | beaker.cache.short_term.key_length = 256 |
|
346 | 342 | |
|
347 | 343 | beaker.cache.long_term.type = memory |
|
348 | 344 | beaker.cache.long_term.expire = 36000 |
|
349 | 345 | beaker.cache.long_term.key_length = 256 |
|
350 | 346 | |
|
351 | 347 | beaker.cache.sql_cache_short.type = memory |
|
352 | 348 | beaker.cache.sql_cache_short.expire = 10 |
|
353 | 349 | beaker.cache.sql_cache_short.key_length = 256 |
|
354 | 350 | |
|
355 | beaker.cache.sql_cache_med.type = memory | |
|
356 | beaker.cache.sql_cache_med.expire = 360 | |
|
357 | beaker.cache.sql_cache_med.key_length = 256 | |
|
358 | ||
|
359 | beaker.cache.sql_cache_long.type = file | |
|
360 | beaker.cache.sql_cache_long.expire = 3600 | |
|
361 | beaker.cache.sql_cache_long.key_length = 256 | |
|
362 | ||
|
363 | 351 | <%text>####################################</%text> |
|
364 | 352 | <%text>### BEAKER SESSION ####</%text> |
|
365 | 353 | <%text>####################################</%text> |
|
366 | 354 | <%text>## Type of storage used for the session, current types are</%text> |
|
367 | 355 | <%text>## dbm, file, memcached, database, and memory.</%text> |
|
368 | 356 | <%text>## The storage uses the Container API</%text> |
|
369 | 357 | <%text>## that is also used by the cache system.</%text> |
|
370 | 358 | |
|
371 | 359 | <%text>## db session ##</%text> |
|
372 | 360 | #beaker.session.type = ext:database |
|
373 | 361 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
374 | 362 | #beaker.session.table_name = db_session |
|
375 | 363 | |
|
376 | 364 | <%text>## encrypted cookie client side session, good for many instances ##</%text> |
|
377 | 365 | #beaker.session.type = cookie |
|
378 | 366 | |
|
379 | 367 | <%text>## file based cookies (default) ##</%text> |
|
380 | 368 | #beaker.session.type = file |
|
381 | 369 | |
|
382 | 370 | <%text>## beaker.session.key should be unique for a given host, even when running</%text> |
|
383 | 371 | <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text> |
|
384 | 372 | beaker.session.key = kallithea |
|
385 | 373 | beaker.session.secret = ${uuid()} |
|
386 | 374 | |
|
387 | 375 | <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text> |
|
388 | 376 | <%text>## you must disable beaker.session.secret to use this</%text> |
|
389 | 377 | #beaker.session.encrypt_key = <key_for_encryption> |
|
390 | 378 | #beaker.session.validate_key = <validation_key> |
|
391 | 379 | |
|
392 | 380 | <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text> |
|
393 | 381 | beaker.session.timeout = 2592000 |
|
394 | 382 | beaker.session.httponly = true |
|
395 | 383 | #beaker.session.cookie_path = /<your-prefix> |
|
396 | 384 | |
|
397 | 385 | <%text>## uncomment for https secure cookie</%text> |
|
398 | 386 | beaker.session.secure = false |
|
399 | 387 | |
|
400 | 388 | <%text>## auto save the session to not to use .save()</%text> |
|
401 | 389 | beaker.session.auto = False |
|
402 | 390 | |
|
403 | 391 | <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text> |
|
404 | 392 | #beaker.session.cookie_expires = 3600 |
|
405 | 393 | |
|
406 | 394 | %if error_aggregation_service == 'errormator': |
|
407 | 395 | <%text>############################</%text> |
|
408 | 396 | <%text>## ERROR HANDLING SYSTEMS ##</%text> |
|
409 | 397 | <%text>############################</%text> |
|
410 | 398 | |
|
411 | 399 | <%text>####################</%text> |
|
412 | 400 | <%text>### [errormator] ###</%text> |
|
413 | 401 | <%text>####################</%text> |
|
414 | 402 | |
|
415 | 403 | <%text>## Errormator is tailored to work with Kallithea, see</%text> |
|
416 | 404 | <%text>## http://errormator.com for details how to obtain an account</%text> |
|
417 | 405 | <%text>## you must install python package `errormator_client` to make it work</%text> |
|
418 | 406 | |
|
419 | 407 | <%text>## errormator enabled</%text> |
|
420 | 408 | errormator = false |
|
421 | 409 | |
|
422 | 410 | errormator.server_url = https://api.errormator.com |
|
423 | 411 | errormator.api_key = YOUR_API_KEY |
|
424 | 412 | |
|
425 | 413 | <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text> |
|
426 | 414 | |
|
427 | 415 | <%text>## enables 404 error logging (default False)</%text> |
|
428 | 416 | errormator.report_404 = false |
|
429 | 417 | |
|
430 | 418 | <%text>## time in seconds after request is considered being slow (default 1)</%text> |
|
431 | 419 | errormator.slow_request_time = 1 |
|
432 | 420 | |
|
433 | 421 | <%text>## record slow requests in application</%text> |
|
434 | 422 | <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text> |
|
435 | 423 | errormator.slow_requests = true |
|
436 | 424 | |
|
437 | 425 | <%text>## enable hooking to application loggers</%text> |
|
438 | 426 | #errormator.logging = true |
|
439 | 427 | |
|
440 | 428 | <%text>## minimum log level for log capture</%text> |
|
441 | 429 | #errormator.logging.level = WARNING |
|
442 | 430 | |
|
443 | 431 | <%text>## send logs only from erroneous/slow requests</%text> |
|
444 | 432 | <%text>## (saves API quota for intensive logging)</%text> |
|
445 | 433 | errormator.logging_on_error = false |
|
446 | 434 | |
|
447 | 435 | <%text>## list of additonal keywords that should be grabbed from environ object</%text> |
|
448 | 436 | <%text>## can be string with comma separated list of words in lowercase</%text> |
|
449 | 437 | <%text>## (by default client will always send following info:</%text> |
|
450 | 438 | <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text> |
|
451 | 439 | <%text>## start with HTTP* this list be extended with additional keywords here</%text> |
|
452 | 440 | errormator.environ_keys_whitelist = |
|
453 | 441 | |
|
454 | 442 | <%text>## list of keywords that should be blanked from request object</%text> |
|
455 | 443 | <%text>## can be string with comma separated list of words in lowercase</%text> |
|
456 | 444 | <%text>## (by default client will always blank keys that contain following words</%text> |
|
457 | 445 | <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text> |
|
458 | 446 | <%text>## this list be extended with additional keywords set here</%text> |
|
459 | 447 | errormator.request_keys_blacklist = |
|
460 | 448 | |
|
461 | 449 | <%text>## list of namespaces that should be ignores when gathering log entries</%text> |
|
462 | 450 | <%text>## can be string with comma separated list of namespaces</%text> |
|
463 | 451 | <%text>## (by default the client ignores own entries: errormator_client.client)</%text> |
|
464 | 452 | errormator.log_namespace_blacklist = |
|
465 | 453 | |
|
466 | 454 | %elif error_aggregation_service == 'sentry': |
|
467 | 455 | <%text>################</%text> |
|
468 | 456 | <%text>### [sentry] ###</%text> |
|
469 | 457 | <%text>################</%text> |
|
470 | 458 | |
|
471 | 459 | <%text>## sentry is a alternative open source error aggregator</%text> |
|
472 | 460 | <%text>## you must install python packages `sentry` and `raven` to enable</%text> |
|
473 | 461 | |
|
474 | 462 | sentry.dsn = YOUR_DNS |
|
475 | 463 | sentry.servers = |
|
476 | 464 | sentry.name = |
|
477 | 465 | sentry.key = |
|
478 | 466 | sentry.public_key = |
|
479 | 467 | sentry.secret_key = |
|
480 | 468 | sentry.project = |
|
481 | 469 | sentry.site = |
|
482 | 470 | sentry.include_paths = |
|
483 | 471 | sentry.exclude_paths = |
|
484 | 472 | |
|
485 | 473 | %endif |
|
486 | 474 | <%text>################################################################################</%text> |
|
487 | 475 | <%text>## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##</%text> |
|
488 | 476 | <%text>## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##</%text> |
|
489 | 477 | <%text>## execute malicious code after an exception is raised. ##</%text> |
|
490 | 478 | <%text>################################################################################</%text> |
|
491 | 479 | set debug = false |
|
492 | 480 | |
|
493 | 481 | <%text>##################################</%text> |
|
494 | 482 | <%text>### LOGVIEW CONFIG ###</%text> |
|
495 | 483 | <%text>##################################</%text> |
|
496 | 484 | |
|
497 | 485 | logview.sqlalchemy = #faa |
|
498 | 486 | logview.pylons.templating = #bfb |
|
499 | 487 | logview.pylons.util = #eee |
|
500 | 488 | |
|
501 | 489 | <%text>#########################################################</%text> |
|
502 | 490 | <%text>### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###</%text> |
|
503 | 491 | <%text>#########################################################</%text> |
|
504 | 492 | |
|
505 | 493 | %if database_engine == 'sqlite': |
|
506 | 494 | # SQLITE [default] |
|
507 | 495 | sqlalchemy.db1.url = sqlite:///${here}/kallithea.db?timeout=60 |
|
508 | 496 | |
|
509 | 497 | %elif database_engine == 'postgres': |
|
510 | 498 | # POSTGRESQL |
|
511 | 499 | sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea |
|
512 | 500 | |
|
513 | 501 | %elif database_engine == 'mysql': |
|
514 | 502 | # MySQL |
|
515 | 503 | sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea |
|
516 | 504 | |
|
517 | 505 | %endif |
|
518 | 506 | # see sqlalchemy docs for others |
|
519 | 507 | |
|
520 | 508 | sqlalchemy.db1.echo = false |
|
521 | 509 | sqlalchemy.db1.pool_recycle = 3600 |
|
522 | 510 | sqlalchemy.db1.convert_unicode = true |
|
523 | 511 | |
|
524 | 512 | <%text>################################</%text> |
|
525 | 513 | <%text>### LOGGING CONFIGURATION ####</%text> |
|
526 | 514 | <%text>################################</%text> |
|
527 | 515 | |
|
528 | 516 | [loggers] |
|
529 | 517 | keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer |
|
530 | 518 | |
|
531 | 519 | [handlers] |
|
532 | 520 | keys = console, console_sql |
|
533 | 521 | |
|
534 | 522 | [formatters] |
|
535 | 523 | keys = generic, color_formatter, color_formatter_sql |
|
536 | 524 | |
|
537 | 525 | <%text>#############</%text> |
|
538 | 526 | <%text>## LOGGERS ##</%text> |
|
539 | 527 | <%text>#############</%text> |
|
540 | 528 | |
|
541 | 529 | [logger_root] |
|
542 | 530 | level = NOTSET |
|
543 | 531 | handlers = console |
|
544 | 532 | |
|
545 | 533 | [logger_routes] |
|
546 | 534 | level = DEBUG |
|
547 | 535 | handlers = |
|
548 | 536 | qualname = routes.middleware |
|
549 | 537 | <%text>## "level = DEBUG" logs the route matched and routing variables.</%text> |
|
550 | 538 | propagate = 1 |
|
551 | 539 | |
|
552 | 540 | [logger_beaker] |
|
553 | 541 | level = DEBUG |
|
554 | 542 | handlers = |
|
555 | 543 | qualname = beaker.container |
|
556 | 544 | propagate = 1 |
|
557 | 545 | |
|
558 | 546 | [logger_templates] |
|
559 | 547 | level = INFO |
|
560 | 548 | handlers = |
|
561 | 549 | qualname = pylons.templating |
|
562 | 550 | propagate = 1 |
|
563 | 551 | |
|
564 | 552 | [logger_kallithea] |
|
565 | 553 | level = DEBUG |
|
566 | 554 | handlers = |
|
567 | 555 | qualname = kallithea |
|
568 | 556 | propagate = 1 |
|
569 | 557 | |
|
570 | 558 | [logger_sqlalchemy] |
|
571 | 559 | level = INFO |
|
572 | 560 | handlers = console_sql |
|
573 | 561 | qualname = sqlalchemy.engine |
|
574 | 562 | propagate = 0 |
|
575 | 563 | |
|
576 | 564 | [logger_whoosh_indexer] |
|
577 | 565 | level = DEBUG |
|
578 | 566 | handlers = |
|
579 | 567 | qualname = whoosh_indexer |
|
580 | 568 | propagate = 1 |
|
581 | 569 | |
|
582 | 570 | <%text>##############</%text> |
|
583 | 571 | <%text>## HANDLERS ##</%text> |
|
584 | 572 | <%text>##############</%text> |
|
585 | 573 | |
|
586 | 574 | [handler_console] |
|
587 | 575 | class = StreamHandler |
|
588 | 576 | args = (sys.stderr,) |
|
589 | 577 | level = INFO |
|
590 | 578 | formatter = generic |
|
591 | 579 | |
|
592 | 580 | [handler_console_sql] |
|
593 | 581 | class = StreamHandler |
|
594 | 582 | args = (sys.stderr,) |
|
595 | 583 | level = WARN |
|
596 | 584 | formatter = generic |
|
597 | 585 | |
|
598 | 586 | <%text>################</%text> |
|
599 | 587 | <%text>## FORMATTERS ##</%text> |
|
600 | 588 | <%text>################</%text> |
|
601 | 589 | |
|
602 | 590 | [formatter_generic] |
|
603 | 591 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
604 | 592 | datefmt = %Y-%m-%d %H:%M:%S |
|
605 | 593 | |
|
606 | 594 | [formatter_color_formatter] |
|
607 | 595 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
608 | 596 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
609 | 597 | datefmt = %Y-%m-%d %H:%M:%S |
|
610 | 598 | |
|
611 | 599 | [formatter_color_formatter_sql] |
|
612 | 600 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
613 | 601 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
614 | 602 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,603 +1,591 b'' | |||
|
1 | 1 | ################################################################################ |
|
2 | 2 | ################################################################################ |
|
3 | 3 | # Kallithea - Example config # |
|
4 | 4 | # # |
|
5 | 5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
6 | 6 | ################################################################################ |
|
7 | 7 | ################################################################################ |
|
8 | 8 | |
|
9 | 9 | [DEFAULT] |
|
10 | 10 | debug = true |
|
11 | 11 | pdebug = false |
|
12 | 12 | |
|
13 | 13 | ################################################################################ |
|
14 | 14 | ## E-mail settings ## |
|
15 | 15 | ## ## |
|
16 | 16 | ## Refer to the documentation ("E-mail settings") for more details. ## |
|
17 | 17 | ## ## |
|
18 | 18 | ## It is recommended to use a valid sender address that passes access ## |
|
19 | 19 | ## validation and spam filtering in mail servers. ## |
|
20 | 20 | ################################################################################ |
|
21 | 21 | |
|
22 | 22 | ## 'From' header for application e-mails. You can optionally add a name. |
|
23 | 23 | ## Default: |
|
24 | 24 | #app_email_from = Kallithea |
|
25 | 25 | ## Examples: |
|
26 | 26 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
27 | 27 | #app_email_from = kallithea-noreply@example.com |
|
28 | 28 | |
|
29 | 29 | ## Subject prefix for application e-mails. |
|
30 | 30 | ## A space between this prefix and the real subject is automatically added. |
|
31 | 31 | ## Default: |
|
32 | 32 | #email_prefix = |
|
33 | 33 | ## Example: |
|
34 | 34 | #email_prefix = [Kallithea] |
|
35 | 35 | |
|
36 | 36 | ## Recipients for error e-mails and fallback recipients of application mails. |
|
37 | 37 | ## Multiple addresses can be specified, space-separated. |
|
38 | 38 | ## Only addresses are allowed, do not add any name part. |
|
39 | 39 | ## Default: |
|
40 | 40 | #email_to = |
|
41 | 41 | ## Examples: |
|
42 | 42 | #email_to = admin@example.com |
|
43 | 43 | #email_to = admin@example.com another_admin@example.com |
|
44 | 44 | |
|
45 | 45 | ## 'From' header for error e-mails. You can optionally add a name. |
|
46 | 46 | ## Default: |
|
47 | 47 | #error_email_from = pylons@yourapp.com |
|
48 | 48 | ## Examples: |
|
49 | 49 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
50 | 50 | #error_email_from = paste_error@example.com |
|
51 | 51 | |
|
52 | 52 | ## SMTP server settings |
|
53 | 53 | ## Only smtp_server is mandatory. All other settings take the specified default |
|
54 | 54 | ## values. |
|
55 | 55 | #smtp_server = mail.server.com |
|
56 | 56 | #smtp_username = |
|
57 | 57 | #smtp_password = |
|
58 | 58 | #smtp_port = 25 |
|
59 | 59 | #smtp_use_tls = false |
|
60 | 60 | #smtp_use_ssl = false |
|
61 | 61 | ## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.). |
|
62 | 62 | ## If empty, use any of the authentication parameters supported by the server. |
|
63 | 63 | #smtp_auth = |
|
64 | 64 | |
|
65 | 65 | [server:main] |
|
66 | 66 | ## PASTE ## |
|
67 | 67 | #use = egg:Paste#http |
|
68 | 68 | ## nr of worker threads to spawn |
|
69 | 69 | #threadpool_workers = 5 |
|
70 | 70 | ## max request before thread respawn |
|
71 | 71 | #threadpool_max_requests = 10 |
|
72 | 72 | ## option to use threads of process |
|
73 | 73 | #use_threadpool = true |
|
74 | 74 | |
|
75 | 75 | ## WAITRESS ## |
|
76 | 76 | use = egg:waitress#main |
|
77 | 77 | ## number of worker threads |
|
78 | 78 | threads = 5 |
|
79 | 79 | ## MAX BODY SIZE 100GB |
|
80 | 80 | max_request_body_size = 107374182400 |
|
81 | 81 | ## use poll instead of select, fixes fd limits, may not work on old |
|
82 | 82 | ## windows systems. |
|
83 | 83 | #asyncore_use_poll = True |
|
84 | 84 | |
|
85 | 85 | ## GUNICORN ## |
|
86 | 86 | #use = egg:gunicorn#main |
|
87 | 87 | ## number of process workers. You must set `instance_id = *` when this option |
|
88 | 88 | ## is set to more than one worker |
|
89 | 89 | #workers = 1 |
|
90 | 90 | ## process name |
|
91 | 91 | #proc_name = kallithea |
|
92 | 92 | ## type of worker class, one of sync, eventlet, gevent, tornado |
|
93 | 93 | ## recommended for bigger setup is using of of other than sync one |
|
94 | 94 | #worker_class = sync |
|
95 | 95 | #max_requests = 1000 |
|
96 | 96 | ## ammount of time a worker can handle request before it gets killed and |
|
97 | 97 | ## restarted |
|
98 | 98 | #timeout = 3600 |
|
99 | 99 | |
|
100 | 100 | ## UWSGI ## |
|
101 | 101 | ## run with uwsgi --ini-paste-logged <inifile.ini> |
|
102 | 102 | #[uwsgi] |
|
103 | 103 | #socket = /tmp/uwsgi.sock |
|
104 | 104 | #master = true |
|
105 | 105 | #http = 127.0.0.1:5000 |
|
106 | 106 | |
|
107 | 107 | ## set as deamon and redirect all output to file |
|
108 | 108 | #daemonize = ./uwsgi_kallithea.log |
|
109 | 109 | |
|
110 | 110 | ## master process PID |
|
111 | 111 | #pidfile = ./uwsgi_kallithea.pid |
|
112 | 112 | |
|
113 | 113 | ## stats server with workers statistics, use uwsgitop |
|
114 | 114 | ## for monitoring, `uwsgitop 127.0.0.1:1717` |
|
115 | 115 | #stats = 127.0.0.1:1717 |
|
116 | 116 | #memory-report = true |
|
117 | 117 | |
|
118 | 118 | ## log 5XX errors |
|
119 | 119 | #log-5xx = true |
|
120 | 120 | |
|
121 | 121 | ## Set the socket listen queue size. |
|
122 | 122 | #listen = 256 |
|
123 | 123 | |
|
124 | 124 | ## Gracefully Reload workers after the specified amount of managed requests |
|
125 | 125 | ## (avoid memory leaks). |
|
126 | 126 | #max-requests = 1000 |
|
127 | 127 | |
|
128 | 128 | ## enable large buffers |
|
129 | 129 | #buffer-size = 65535 |
|
130 | 130 | |
|
131 | 131 | ## socket and http timeouts ## |
|
132 | 132 | #http-timeout = 3600 |
|
133 | 133 | #socket-timeout = 3600 |
|
134 | 134 | |
|
135 | 135 | ## Log requests slower than the specified number of milliseconds. |
|
136 | 136 | #log-slow = 10 |
|
137 | 137 | |
|
138 | 138 | ## Exit if no app can be loaded. |
|
139 | 139 | #need-app = true |
|
140 | 140 | |
|
141 | 141 | ## Set lazy mode (load apps in workers instead of master). |
|
142 | 142 | #lazy = true |
|
143 | 143 | |
|
144 | 144 | ## scaling ## |
|
145 | 145 | ## set cheaper algorithm to use, if not set default will be used |
|
146 | 146 | #cheaper-algo = spare |
|
147 | 147 | |
|
148 | 148 | ## minimum number of workers to keep at all times |
|
149 | 149 | #cheaper = 1 |
|
150 | 150 | |
|
151 | 151 | ## number of workers to spawn at startup |
|
152 | 152 | #cheaper-initial = 1 |
|
153 | 153 | |
|
154 | 154 | ## maximum number of workers that can be spawned |
|
155 | 155 | #workers = 4 |
|
156 | 156 | |
|
157 | 157 | ## how many workers should be spawned at a time |
|
158 | 158 | #cheaper-step = 1 |
|
159 | 159 | |
|
160 | 160 | ## COMMON ## |
|
161 | 161 | host = 127.0.0.1 |
|
162 | 162 | port = 5000 |
|
163 | 163 | |
|
164 | 164 | ## middleware for hosting the WSGI application under a URL prefix |
|
165 | 165 | #[filter:proxy-prefix] |
|
166 | 166 | #use = egg:PasteDeploy#prefix |
|
167 | 167 | #prefix = /<your-prefix> |
|
168 | 168 | |
|
169 | 169 | [app:main] |
|
170 | 170 | use = egg:kallithea |
|
171 | 171 | ## enable proxy prefix middleware |
|
172 | 172 | #filter-with = proxy-prefix |
|
173 | 173 | |
|
174 | 174 | full_stack = true |
|
175 | 175 | static_files = true |
|
176 | 176 | ## Available Languages: |
|
177 | 177 | ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW |
|
178 | 178 | lang = |
|
179 | 179 | cache_dir = %(here)s/data |
|
180 | 180 | index_dir = %(here)s/data/index |
|
181 | 181 | |
|
182 | 182 | ## perform a full repository scan on each server start, this should be |
|
183 | 183 | ## set to false after first startup, to allow faster server restarts. |
|
184 | 184 | initial_repo_scan = false |
|
185 | 185 | |
|
186 | 186 | ## uncomment and set this path to use archive download cache |
|
187 | 187 | archive_cache_dir = %(here)s/tarballcache |
|
188 | 188 | |
|
189 | 189 | ## change this to unique ID for security |
|
190 | 190 | app_instance_uuid = ${app_instance_uuid} |
|
191 | 191 | |
|
192 | 192 | ## cut off limit for large diffs (size in bytes) |
|
193 | 193 | cut_off_limit = 256000 |
|
194 | 194 | |
|
195 | 195 | ## use cache version of scm repo everywhere |
|
196 | 196 | vcs_full_cache = true |
|
197 | 197 | |
|
198 | 198 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
199 | 199 | force_https = false |
|
200 | 200 | |
|
201 | 201 | ## use Strict-Transport-Security headers |
|
202 | 202 | use_htsts = false |
|
203 | 203 | |
|
204 | 204 | ## number of commits stats will parse on each iteration |
|
205 | 205 | commit_parse_limit = 25 |
|
206 | 206 | |
|
207 | 207 | ## path to git executable |
|
208 | 208 | git_path = git |
|
209 | 209 | |
|
210 | 210 | ## git rev filter option, --all is the default filter, if you need to |
|
211 | 211 | ## hide all refs in changelog switch this to --branches --tags |
|
212 | 212 | #git_rev_filter = --branches --tags |
|
213 | 213 | |
|
214 | 214 | ## RSS feed options |
|
215 | 215 | rss_cut_off_limit = 256000 |
|
216 | 216 | rss_items_per_page = 10 |
|
217 | 217 | rss_include_diff = false |
|
218 | 218 | |
|
219 | 219 | ## options for showing and identifying changesets |
|
220 | 220 | show_sha_length = 12 |
|
221 | 221 | show_revision_number = false |
|
222 | 222 | |
|
223 | 223 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
224 | 224 | ## url that does rewrites to _admin/gists/<gistid>. |
|
225 | 225 | ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal |
|
226 | 226 | ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid> |
|
227 | 227 | gist_alias_url = |
|
228 | 228 | |
|
229 | 229 | ## white list of API enabled controllers. This allows to add list of |
|
230 | 230 | ## controllers to which access will be enabled by api_key. eg: to enable |
|
231 | 231 | ## api access to raw_files put `FilesController:raw`, to enable access to patches |
|
232 | 232 | ## add `ChangesetController:changeset_patch`. This list should be "," separated |
|
233 | 233 | ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names |
|
234 | 234 | ## Recommended settings below are commented out: |
|
235 | 235 | api_access_controllers_whitelist = |
|
236 | 236 | # ChangesetController:changeset_patch, |
|
237 | 237 | # ChangesetController:changeset_raw, |
|
238 | 238 | # FilesController:raw, |
|
239 | 239 | # FilesController:archivefile |
|
240 | 240 | |
|
241 | 241 | ## default encoding used to convert from and to unicode |
|
242 | 242 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
243 | 243 | default_encoding = utf8 |
|
244 | 244 | |
|
245 | 245 | ## issue tracker for Kallithea (leave blank to disable, absent for default) |
|
246 | 246 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
247 | 247 | |
|
248 | 248 | ## issue tracking mapping for commits messages |
|
249 | 249 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
250 | 250 | |
|
251 | 251 | ## pattern to get the issues from commit messages |
|
252 | 252 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
253 | 253 | ## {id} will be all groups matched from this pattern |
|
254 | 254 | |
|
255 | 255 | issue_pat = (?:\s*#)(\d+) |
|
256 | 256 | |
|
257 | 257 | ## server url to the issue, each {id} will be replaced with match |
|
258 | 258 | ## fetched from the regex and {repo} is replaced with full repository name |
|
259 | 259 | ## including groups {repo_name} is replaced with just name of repo |
|
260 | 260 | |
|
261 | 261 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
262 | 262 | |
|
263 | 263 | ## prefix to add to link to indicate it's an url |
|
264 | 264 | ## #314 will be replaced by <issue_prefix><id> |
|
265 | 265 | |
|
266 | 266 | issue_prefix = # |
|
267 | 267 | |
|
268 | 268 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
269 | 269 | ## multiple patterns, to other issues server, wiki or others |
|
270 | 270 | ## below an example how to create a wiki pattern |
|
271 | 271 | # wiki-some-id -> https://mywiki.com/some-id |
|
272 | 272 | |
|
273 | 273 | #issue_pat_wiki = (?:wiki-)(.+) |
|
274 | 274 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
275 | 275 | #issue_prefix_wiki = WIKI- |
|
276 | 276 | |
|
277 | 277 | ## instance-id prefix |
|
278 | 278 | ## a prefix key for this instance used for cache invalidation when running |
|
279 | 279 | ## multiple instances of kallithea, make sure it's globally unique for |
|
280 | 280 | ## all running kallithea instances. Leave empty if you don't use it |
|
281 | 281 | instance_id = |
|
282 | 282 | |
|
283 | 283 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
284 | 284 | ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with |
|
285 | 285 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
286 | 286 | auth_ret_code = |
|
287 | 287 | |
|
288 | 288 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
289 | 289 | ## codes don't break the transactions while 4XX codes do |
|
290 | 290 | lock_ret_code = 423 |
|
291 | 291 | |
|
292 | 292 | ## allows to change the repository location in settings page |
|
293 | 293 | allow_repo_location_change = True |
|
294 | 294 | |
|
295 | 295 | ## allows to setup custom hooks in settings page |
|
296 | 296 | allow_custom_hooks_settings = True |
|
297 | 297 | |
|
298 | 298 | #################################### |
|
299 | 299 | ### CELERY CONFIG #### |
|
300 | 300 | #################################### |
|
301 | 301 | |
|
302 | 302 | use_celery = false |
|
303 | 303 | broker.host = localhost |
|
304 | 304 | broker.vhost = rabbitmqhost |
|
305 | 305 | broker.port = 5672 |
|
306 | 306 | broker.user = rabbitmq |
|
307 | 307 | broker.password = qweqwe |
|
308 | 308 | |
|
309 | 309 | celery.imports = kallithea.lib.celerylib.tasks |
|
310 | 310 | |
|
311 | 311 | celery.result.backend = amqp |
|
312 | 312 | celery.result.dburi = amqp:// |
|
313 | 313 | celery.result.serialier = json |
|
314 | 314 | |
|
315 | 315 | #celery.send.task.error.emails = true |
|
316 | 316 | #celery.amqp.task.result.expires = 18000 |
|
317 | 317 | |
|
318 | 318 | celeryd.concurrency = 2 |
|
319 | 319 | #celeryd.log.file = celeryd.log |
|
320 | 320 | celeryd.log.level = DEBUG |
|
321 | 321 | celeryd.max.tasks.per.child = 1 |
|
322 | 322 | |
|
323 | 323 | ## tasks will never be sent to the queue, but executed locally instead. |
|
324 | 324 | celery.always.eager = false |
|
325 | 325 | |
|
326 | 326 | #################################### |
|
327 | 327 | ### BEAKER CACHE #### |
|
328 | 328 | #################################### |
|
329 | 329 | |
|
330 | 330 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
331 | 331 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
332 | 332 | |
|
333 |
beaker.cache.regions = s |
|
|
334 | ||
|
335 | beaker.cache.super_short_term.type = memory | |
|
336 | beaker.cache.super_short_term.expire = 10 | |
|
337 | beaker.cache.super_short_term.key_length = 256 | |
|
333 | beaker.cache.regions = short_term,long_term,sql_cache_short | |
|
338 | 334 | |
|
339 | 335 | beaker.cache.short_term.type = memory |
|
340 | 336 | beaker.cache.short_term.expire = 60 |
|
341 | 337 | beaker.cache.short_term.key_length = 256 |
|
342 | 338 | |
|
343 | 339 | beaker.cache.long_term.type = memory |
|
344 | 340 | beaker.cache.long_term.expire = 36000 |
|
345 | 341 | beaker.cache.long_term.key_length = 256 |
|
346 | 342 | |
|
347 | 343 | beaker.cache.sql_cache_short.type = memory |
|
348 | 344 | beaker.cache.sql_cache_short.expire = 10 |
|
349 | 345 | beaker.cache.sql_cache_short.key_length = 256 |
|
350 | 346 | |
|
351 | beaker.cache.sql_cache_med.type = memory | |
|
352 | beaker.cache.sql_cache_med.expire = 360 | |
|
353 | beaker.cache.sql_cache_med.key_length = 256 | |
|
354 | ||
|
355 | beaker.cache.sql_cache_long.type = file | |
|
356 | beaker.cache.sql_cache_long.expire = 3600 | |
|
357 | beaker.cache.sql_cache_long.key_length = 256 | |
|
358 | ||
|
359 | 347 | #################################### |
|
360 | 348 | ### BEAKER SESSION #### |
|
361 | 349 | #################################### |
|
362 | 350 | ## Type of storage used for the session, current types are |
|
363 | 351 | ## dbm, file, memcached, database, and memory. |
|
364 | 352 | ## The storage uses the Container API |
|
365 | 353 | ## that is also used by the cache system. |
|
366 | 354 | |
|
367 | 355 | ## db session ## |
|
368 | 356 | #beaker.session.type = ext:database |
|
369 | 357 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
370 | 358 | #beaker.session.table_name = db_session |
|
371 | 359 | |
|
372 | 360 | ## encrypted cookie client side session, good for many instances ## |
|
373 | 361 | #beaker.session.type = cookie |
|
374 | 362 | |
|
375 | 363 | ## file based cookies (default) ## |
|
376 | 364 | #beaker.session.type = file |
|
377 | 365 | |
|
378 | 366 | ## beaker.session.key should be unique for a given host, even when running |
|
379 | 367 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
380 | 368 | beaker.session.key = kallithea |
|
381 | 369 | beaker.session.secret = ${app_instance_uuid} |
|
382 | 370 | |
|
383 | 371 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
384 | 372 | ## you must disable beaker.session.secret to use this |
|
385 | 373 | #beaker.session.encrypt_key = <key_for_encryption> |
|
386 | 374 | #beaker.session.validate_key = <validation_key> |
|
387 | 375 | |
|
388 | 376 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
389 | 377 | beaker.session.timeout = 2592000 |
|
390 | 378 | beaker.session.httponly = true |
|
391 | 379 | #beaker.session.cookie_path = /<your-prefix> |
|
392 | 380 | |
|
393 | 381 | ## uncomment for https secure cookie |
|
394 | 382 | beaker.session.secure = false |
|
395 | 383 | |
|
396 | 384 | ## auto save the session to not to use .save() |
|
397 | 385 | beaker.session.auto = False |
|
398 | 386 | |
|
399 | 387 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
400 | 388 | #beaker.session.cookie_expires = 3600 |
|
401 | 389 | |
|
402 | 390 | ############################ |
|
403 | 391 | ## ERROR HANDLING SYSTEMS ## |
|
404 | 392 | ############################ |
|
405 | 393 | |
|
406 | 394 | #################### |
|
407 | 395 | ### [errormator] ### |
|
408 | 396 | #################### |
|
409 | 397 | |
|
410 | 398 | ## Errormator is tailored to work with Kallithea, see |
|
411 | 399 | ## http://errormator.com for details how to obtain an account |
|
412 | 400 | ## you must install python package `errormator_client` to make it work |
|
413 | 401 | |
|
414 | 402 | ## errormator enabled |
|
415 | 403 | errormator = false |
|
416 | 404 | |
|
417 | 405 | errormator.server_url = https://api.errormator.com |
|
418 | 406 | errormator.api_key = YOUR_API_KEY |
|
419 | 407 | |
|
420 | 408 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
421 | 409 | |
|
422 | 410 | ## enables 404 error logging (default False) |
|
423 | 411 | errormator.report_404 = false |
|
424 | 412 | |
|
425 | 413 | ## time in seconds after request is considered being slow (default 1) |
|
426 | 414 | errormator.slow_request_time = 1 |
|
427 | 415 | |
|
428 | 416 | ## record slow requests in application |
|
429 | 417 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
430 | 418 | errormator.slow_requests = true |
|
431 | 419 | |
|
432 | 420 | ## enable hooking to application loggers |
|
433 | 421 | #errormator.logging = true |
|
434 | 422 | |
|
435 | 423 | ## minimum log level for log capture |
|
436 | 424 | #errormator.logging.level = WARNING |
|
437 | 425 | |
|
438 | 426 | ## send logs only from erroneous/slow requests |
|
439 | 427 | ## (saves API quota for intensive logging) |
|
440 | 428 | errormator.logging_on_error = false |
|
441 | 429 | |
|
442 | 430 | ## list of additonal keywords that should be grabbed from environ object |
|
443 | 431 | ## can be string with comma separated list of words in lowercase |
|
444 | 432 | ## (by default client will always send following info: |
|
445 | 433 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
446 | 434 | ## start with HTTP* this list be extended with additional keywords here |
|
447 | 435 | errormator.environ_keys_whitelist = |
|
448 | 436 | |
|
449 | 437 | ## list of keywords that should be blanked from request object |
|
450 | 438 | ## can be string with comma separated list of words in lowercase |
|
451 | 439 | ## (by default client will always blank keys that contain following words |
|
452 | 440 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
453 | 441 | ## this list be extended with additional keywords set here |
|
454 | 442 | errormator.request_keys_blacklist = |
|
455 | 443 | |
|
456 | 444 | ## list of namespaces that should be ignores when gathering log entries |
|
457 | 445 | ## can be string with comma separated list of namespaces |
|
458 | 446 | ## (by default the client ignores own entries: errormator_client.client) |
|
459 | 447 | errormator.log_namespace_blacklist = |
|
460 | 448 | |
|
461 | 449 | ################ |
|
462 | 450 | ### [sentry] ### |
|
463 | 451 | ################ |
|
464 | 452 | |
|
465 | 453 | ## sentry is a alternative open source error aggregator |
|
466 | 454 | ## you must install python packages `sentry` and `raven` to enable |
|
467 | 455 | |
|
468 | 456 | sentry.dsn = YOUR_DNS |
|
469 | 457 | sentry.servers = |
|
470 | 458 | sentry.name = |
|
471 | 459 | sentry.key = |
|
472 | 460 | sentry.public_key = |
|
473 | 461 | sentry.secret_key = |
|
474 | 462 | sentry.project = |
|
475 | 463 | sentry.site = |
|
476 | 464 | sentry.include_paths = |
|
477 | 465 | sentry.exclude_paths = |
|
478 | 466 | |
|
479 | 467 | ################################################################################ |
|
480 | 468 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
481 | 469 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
482 | 470 | ## execute malicious code after an exception is raised. ## |
|
483 | 471 | ################################################################################ |
|
484 | 472 | set debug = false |
|
485 | 473 | |
|
486 | 474 | ################################## |
|
487 | 475 | ### LOGVIEW CONFIG ### |
|
488 | 476 | ################################## |
|
489 | 477 | |
|
490 | 478 | logview.sqlalchemy = #faa |
|
491 | 479 | logview.pylons.templating = #bfb |
|
492 | 480 | logview.pylons.util = #eee |
|
493 | 481 | |
|
494 | 482 | ######################################################### |
|
495 | 483 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
496 | 484 | ######################################################### |
|
497 | 485 | |
|
498 | 486 | # SQLITE [default] |
|
499 | 487 | sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
500 | 488 | |
|
501 | 489 | # POSTGRESQL |
|
502 | 490 | #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea |
|
503 | 491 | |
|
504 | 492 | # MySQL |
|
505 | 493 | #sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea |
|
506 | 494 | |
|
507 | 495 | # see sqlalchemy docs for others |
|
508 | 496 | |
|
509 | 497 | sqlalchemy.db1.echo = false |
|
510 | 498 | sqlalchemy.db1.pool_recycle = 3600 |
|
511 | 499 | sqlalchemy.db1.convert_unicode = true |
|
512 | 500 | |
|
513 | 501 | ################################ |
|
514 | 502 | ### LOGGING CONFIGURATION #### |
|
515 | 503 | ################################ |
|
516 | 504 | |
|
517 | 505 | [loggers] |
|
518 | 506 | keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer |
|
519 | 507 | |
|
520 | 508 | [handlers] |
|
521 | 509 | keys = console, console_sql |
|
522 | 510 | |
|
523 | 511 | [formatters] |
|
524 | 512 | keys = generic, color_formatter, color_formatter_sql |
|
525 | 513 | |
|
526 | 514 | ############# |
|
527 | 515 | ## LOGGERS ## |
|
528 | 516 | ############# |
|
529 | 517 | |
|
530 | 518 | [logger_root] |
|
531 | 519 | level = NOTSET |
|
532 | 520 | handlers = console |
|
533 | 521 | |
|
534 | 522 | [logger_routes] |
|
535 | 523 | level = DEBUG |
|
536 | 524 | handlers = |
|
537 | 525 | qualname = routes.middleware |
|
538 | 526 | ## "level = DEBUG" logs the route matched and routing variables. |
|
539 | 527 | propagate = 1 |
|
540 | 528 | |
|
541 | 529 | [logger_beaker] |
|
542 | 530 | level = DEBUG |
|
543 | 531 | handlers = |
|
544 | 532 | qualname = beaker.container |
|
545 | 533 | propagate = 1 |
|
546 | 534 | |
|
547 | 535 | [logger_templates] |
|
548 | 536 | level = INFO |
|
549 | 537 | handlers = |
|
550 | 538 | qualname = pylons.templating |
|
551 | 539 | propagate = 1 |
|
552 | 540 | |
|
553 | 541 | [logger_kallithea] |
|
554 | 542 | level = DEBUG |
|
555 | 543 | handlers = |
|
556 | 544 | qualname = kallithea |
|
557 | 545 | propagate = 1 |
|
558 | 546 | |
|
559 | 547 | [logger_sqlalchemy] |
|
560 | 548 | level = INFO |
|
561 | 549 | handlers = console_sql |
|
562 | 550 | qualname = sqlalchemy.engine |
|
563 | 551 | propagate = 0 |
|
564 | 552 | |
|
565 | 553 | [logger_whoosh_indexer] |
|
566 | 554 | level = DEBUG |
|
567 | 555 | handlers = |
|
568 | 556 | qualname = whoosh_indexer |
|
569 | 557 | propagate = 1 |
|
570 | 558 | |
|
571 | 559 | ############## |
|
572 | 560 | ## HANDLERS ## |
|
573 | 561 | ############## |
|
574 | 562 | |
|
575 | 563 | [handler_console] |
|
576 | 564 | class = StreamHandler |
|
577 | 565 | args = (sys.stderr,) |
|
578 | 566 | level = INFO |
|
579 | 567 | formatter = generic |
|
580 | 568 | |
|
581 | 569 | [handler_console_sql] |
|
582 | 570 | class = StreamHandler |
|
583 | 571 | args = (sys.stderr,) |
|
584 | 572 | level = WARN |
|
585 | 573 | formatter = generic |
|
586 | 574 | |
|
587 | 575 | ################ |
|
588 | 576 | ## FORMATTERS ## |
|
589 | 577 | ################ |
|
590 | 578 | |
|
591 | 579 | [formatter_generic] |
|
592 | 580 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
593 | 581 | datefmt = %Y-%m-%d %H:%M:%S |
|
594 | 582 | |
|
595 | 583 | [formatter_color_formatter] |
|
596 | 584 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
597 | 585 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
598 | 586 | datefmt = %Y-%m-%d %H:%M:%S |
|
599 | 587 | |
|
600 | 588 | [formatter_color_formatter_sql] |
|
601 | 589 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
602 | 590 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
603 | 591 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,614 +1,602 b'' | |||
|
1 | 1 | ################################################################################ |
|
2 | 2 | ################################################################################ |
|
3 | 3 | # Kallithea - config for tests: # |
|
4 | 4 | # initial_repo_scan = true # |
|
5 | 5 | # vcs_full_cache = false # |
|
6 | 6 | # sqlalchemy and kallithea_test.sqlite # |
|
7 | 7 | # custom logging # |
|
8 | 8 | # # |
|
9 | 9 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
10 | 10 | ################################################################################ |
|
11 | 11 | ################################################################################ |
|
12 | 12 | |
|
13 | 13 | [DEFAULT] |
|
14 | 14 | debug = true |
|
15 | 15 | pdebug = false |
|
16 | 16 | |
|
17 | 17 | ################################################################################ |
|
18 | 18 | ## E-mail settings ## |
|
19 | 19 | ## ## |
|
20 | 20 | ## Refer to the documentation ("E-mail settings") for more details. ## |
|
21 | 21 | ## ## |
|
22 | 22 | ## It is recommended to use a valid sender address that passes access ## |
|
23 | 23 | ## validation and spam filtering in mail servers. ## |
|
24 | 24 | ################################################################################ |
|
25 | 25 | |
|
26 | 26 | ## 'From' header for application e-mails. You can optionally add a name. |
|
27 | 27 | ## Default: |
|
28 | 28 | #app_email_from = Kallithea |
|
29 | 29 | ## Examples: |
|
30 | 30 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
31 | 31 | #app_email_from = kallithea-noreply@example.com |
|
32 | 32 | |
|
33 | 33 | ## Subject prefix for application e-mails. |
|
34 | 34 | ## A space between this prefix and the real subject is automatically added. |
|
35 | 35 | ## Default: |
|
36 | 36 | #email_prefix = |
|
37 | 37 | ## Example: |
|
38 | 38 | #email_prefix = [Kallithea] |
|
39 | 39 | |
|
40 | 40 | ## Recipients for error e-mails and fallback recipients of application mails. |
|
41 | 41 | ## Multiple addresses can be specified, space-separated. |
|
42 | 42 | ## Only addresses are allowed, do not add any name part. |
|
43 | 43 | ## Default: |
|
44 | 44 | #email_to = |
|
45 | 45 | ## Examples: |
|
46 | 46 | #email_to = admin@example.com |
|
47 | 47 | #email_to = admin@example.com another_admin@example.com |
|
48 | 48 | |
|
49 | 49 | ## 'From' header for error e-mails. You can optionally add a name. |
|
50 | 50 | ## Default: |
|
51 | 51 | #error_email_from = pylons@yourapp.com |
|
52 | 52 | ## Examples: |
|
53 | 53 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
54 | 54 | #error_email_from = paste_error@example.com |
|
55 | 55 | |
|
56 | 56 | ## SMTP server settings |
|
57 | 57 | ## Only smtp_server is mandatory. All other settings take the specified default |
|
58 | 58 | ## values. |
|
59 | 59 | #smtp_server = mail.server.com |
|
60 | 60 | #smtp_username = |
|
61 | 61 | #smtp_password = |
|
62 | 62 | #smtp_port = 25 |
|
63 | 63 | #smtp_use_tls = false |
|
64 | 64 | #smtp_use_ssl = false |
|
65 | 65 | ## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.). |
|
66 | 66 | ## If empty, use any of the authentication parameters supported by the server. |
|
67 | 67 | #smtp_auth = |
|
68 | 68 | |
|
69 | 69 | [server:main] |
|
70 | 70 | ## PASTE ## |
|
71 | 71 | #use = egg:Paste#http |
|
72 | 72 | ## nr of worker threads to spawn |
|
73 | 73 | #threadpool_workers = 5 |
|
74 | 74 | ## max request before thread respawn |
|
75 | 75 | #threadpool_max_requests = 10 |
|
76 | 76 | ## option to use threads of process |
|
77 | 77 | #use_threadpool = true |
|
78 | 78 | |
|
79 | 79 | ## WAITRESS ## |
|
80 | 80 | use = egg:waitress#main |
|
81 | 81 | ## number of worker threads |
|
82 | 82 | threads = 5 |
|
83 | 83 | ## MAX BODY SIZE 100GB |
|
84 | 84 | max_request_body_size = 107374182400 |
|
85 | 85 | ## use poll instead of select, fixes fd limits, may not work on old |
|
86 | 86 | ## windows systems. |
|
87 | 87 | #asyncore_use_poll = True |
|
88 | 88 | |
|
89 | 89 | ## GUNICORN ## |
|
90 | 90 | #use = egg:gunicorn#main |
|
91 | 91 | ## number of process workers. You must set `instance_id = *` when this option |
|
92 | 92 | ## is set to more than one worker |
|
93 | 93 | #workers = 1 |
|
94 | 94 | ## process name |
|
95 | 95 | #proc_name = kallithea |
|
96 | 96 | ## type of worker class, one of sync, eventlet, gevent, tornado |
|
97 | 97 | ## recommended for bigger setup is using of of other than sync one |
|
98 | 98 | #worker_class = sync |
|
99 | 99 | #max_requests = 1000 |
|
100 | 100 | ## ammount of time a worker can handle request before it gets killed and |
|
101 | 101 | ## restarted |
|
102 | 102 | #timeout = 3600 |
|
103 | 103 | |
|
104 | 104 | ## UWSGI ## |
|
105 | 105 | ## run with uwsgi --ini-paste-logged <inifile.ini> |
|
106 | 106 | #[uwsgi] |
|
107 | 107 | #socket = /tmp/uwsgi.sock |
|
108 | 108 | #master = true |
|
109 | 109 | #http = 127.0.0.1:5000 |
|
110 | 110 | |
|
111 | 111 | ## set as deamon and redirect all output to file |
|
112 | 112 | #daemonize = ./uwsgi_kallithea.log |
|
113 | 113 | |
|
114 | 114 | ## master process PID |
|
115 | 115 | #pidfile = ./uwsgi_kallithea.pid |
|
116 | 116 | |
|
117 | 117 | ## stats server with workers statistics, use uwsgitop |
|
118 | 118 | ## for monitoring, `uwsgitop 127.0.0.1:1717` |
|
119 | 119 | #stats = 127.0.0.1:1717 |
|
120 | 120 | #memory-report = true |
|
121 | 121 | |
|
122 | 122 | ## log 5XX errors |
|
123 | 123 | #log-5xx = true |
|
124 | 124 | |
|
125 | 125 | ## Set the socket listen queue size. |
|
126 | 126 | #listen = 256 |
|
127 | 127 | |
|
128 | 128 | ## Gracefully Reload workers after the specified amount of managed requests |
|
129 | 129 | ## (avoid memory leaks). |
|
130 | 130 | #max-requests = 1000 |
|
131 | 131 | |
|
132 | 132 | ## enable large buffers |
|
133 | 133 | #buffer-size = 65535 |
|
134 | 134 | |
|
135 | 135 | ## socket and http timeouts ## |
|
136 | 136 | #http-timeout = 3600 |
|
137 | 137 | #socket-timeout = 3600 |
|
138 | 138 | |
|
139 | 139 | ## Log requests slower than the specified number of milliseconds. |
|
140 | 140 | #log-slow = 10 |
|
141 | 141 | |
|
142 | 142 | ## Exit if no app can be loaded. |
|
143 | 143 | #need-app = true |
|
144 | 144 | |
|
145 | 145 | ## Set lazy mode (load apps in workers instead of master). |
|
146 | 146 | #lazy = true |
|
147 | 147 | |
|
148 | 148 | ## scaling ## |
|
149 | 149 | ## set cheaper algorithm to use, if not set default will be used |
|
150 | 150 | #cheaper-algo = spare |
|
151 | 151 | |
|
152 | 152 | ## minimum number of workers to keep at all times |
|
153 | 153 | #cheaper = 1 |
|
154 | 154 | |
|
155 | 155 | ## number of workers to spawn at startup |
|
156 | 156 | #cheaper-initial = 1 |
|
157 | 157 | |
|
158 | 158 | ## maximum number of workers that can be spawned |
|
159 | 159 | #workers = 4 |
|
160 | 160 | |
|
161 | 161 | ## how many workers should be spawned at a time |
|
162 | 162 | #cheaper-step = 1 |
|
163 | 163 | |
|
164 | 164 | ## COMMON ## |
|
165 | 165 | host = 127.0.0.1 |
|
166 | 166 | port = 4999 |
|
167 | 167 | |
|
168 | 168 | ## middleware for hosting the WSGI application under a URL prefix |
|
169 | 169 | #[filter:proxy-prefix] |
|
170 | 170 | #use = egg:PasteDeploy#prefix |
|
171 | 171 | #prefix = /<your-prefix> |
|
172 | 172 | |
|
173 | 173 | [app:main] |
|
174 | 174 | use = egg:kallithea |
|
175 | 175 | ## enable proxy prefix middleware |
|
176 | 176 | #filter-with = proxy-prefix |
|
177 | 177 | |
|
178 | 178 | full_stack = true |
|
179 | 179 | static_files = true |
|
180 | 180 | ## Available Languages: |
|
181 | 181 | ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW |
|
182 | 182 | lang = |
|
183 | 183 | cache_dir = %(here)s/data |
|
184 | 184 | index_dir = %(here)s/data/index |
|
185 | 185 | |
|
186 | 186 | ## perform a full repository scan on each server start, this should be |
|
187 | 187 | ## set to false after first startup, to allow faster server restarts. |
|
188 | 188 | #initial_repo_scan = false |
|
189 | 189 | initial_repo_scan = true |
|
190 | 190 | |
|
191 | 191 | ## uncomment and set this path to use archive download cache |
|
192 | 192 | archive_cache_dir = %(here)s/tarballcache |
|
193 | 193 | |
|
194 | 194 | ## change this to unique ID for security |
|
195 | 195 | app_instance_uuid = test |
|
196 | 196 | |
|
197 | 197 | ## cut off limit for large diffs (size in bytes) |
|
198 | 198 | cut_off_limit = 256000 |
|
199 | 199 | |
|
200 | 200 | ## use cache version of scm repo everywhere |
|
201 | 201 | #vcs_full_cache = true |
|
202 | 202 | vcs_full_cache = false |
|
203 | 203 | |
|
204 | 204 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
205 | 205 | force_https = false |
|
206 | 206 | |
|
207 | 207 | ## use Strict-Transport-Security headers |
|
208 | 208 | use_htsts = false |
|
209 | 209 | |
|
210 | 210 | ## number of commits stats will parse on each iteration |
|
211 | 211 | commit_parse_limit = 25 |
|
212 | 212 | |
|
213 | 213 | ## path to git executable |
|
214 | 214 | git_path = git |
|
215 | 215 | |
|
216 | 216 | ## git rev filter option, --all is the default filter, if you need to |
|
217 | 217 | ## hide all refs in changelog switch this to --branches --tags |
|
218 | 218 | #git_rev_filter = --branches --tags |
|
219 | 219 | |
|
220 | 220 | ## RSS feed options |
|
221 | 221 | rss_cut_off_limit = 256000 |
|
222 | 222 | rss_items_per_page = 10 |
|
223 | 223 | rss_include_diff = false |
|
224 | 224 | |
|
225 | 225 | ## options for showing and identifying changesets |
|
226 | 226 | show_sha_length = 12 |
|
227 | 227 | show_revision_number = true |
|
228 | 228 | |
|
229 | 229 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
230 | 230 | ## url that does rewrites to _admin/gists/<gistid>. |
|
231 | 231 | ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal |
|
232 | 232 | ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid> |
|
233 | 233 | gist_alias_url = |
|
234 | 234 | |
|
235 | 235 | ## white list of API enabled controllers. This allows to add list of |
|
236 | 236 | ## controllers to which access will be enabled by api_key. eg: to enable |
|
237 | 237 | ## api access to raw_files put `FilesController:raw`, to enable access to patches |
|
238 | 238 | ## add `ChangesetController:changeset_patch`. This list should be "," separated |
|
239 | 239 | ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names |
|
240 | 240 | ## Recommended settings below are commented out: |
|
241 | 241 | api_access_controllers_whitelist = |
|
242 | 242 | # ChangesetController:changeset_patch, |
|
243 | 243 | # ChangesetController:changeset_raw, |
|
244 | 244 | # FilesController:raw, |
|
245 | 245 | # FilesController:archivefile |
|
246 | 246 | |
|
247 | 247 | ## default encoding used to convert from and to unicode |
|
248 | 248 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
249 | 249 | default_encoding = utf8 |
|
250 | 250 | |
|
251 | 251 | ## issue tracker for Kallithea (leave blank to disable, absent for default) |
|
252 | 252 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
253 | 253 | |
|
254 | 254 | ## issue tracking mapping for commits messages |
|
255 | 255 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
256 | 256 | |
|
257 | 257 | ## pattern to get the issues from commit messages |
|
258 | 258 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
259 | 259 | ## {id} will be all groups matched from this pattern |
|
260 | 260 | |
|
261 | 261 | issue_pat = (?:\s*#)(\d+) |
|
262 | 262 | |
|
263 | 263 | ## server url to the issue, each {id} will be replaced with match |
|
264 | 264 | ## fetched from the regex and {repo} is replaced with full repository name |
|
265 | 265 | ## including groups {repo_name} is replaced with just name of repo |
|
266 | 266 | |
|
267 | 267 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
268 | 268 | |
|
269 | 269 | ## prefix to add to link to indicate it's an url |
|
270 | 270 | ## #314 will be replaced by <issue_prefix><id> |
|
271 | 271 | |
|
272 | 272 | issue_prefix = # |
|
273 | 273 | |
|
274 | 274 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
275 | 275 | ## multiple patterns, to other issues server, wiki or others |
|
276 | 276 | ## below an example how to create a wiki pattern |
|
277 | 277 | # wiki-some-id -> https://mywiki.com/some-id |
|
278 | 278 | |
|
279 | 279 | #issue_pat_wiki = (?:wiki-)(.+) |
|
280 | 280 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
281 | 281 | #issue_prefix_wiki = WIKI- |
|
282 | 282 | |
|
283 | 283 | ## instance-id prefix |
|
284 | 284 | ## a prefix key for this instance used for cache invalidation when running |
|
285 | 285 | ## multiple instances of kallithea, make sure it's globally unique for |
|
286 | 286 | ## all running kallithea instances. Leave empty if you don't use it |
|
287 | 287 | instance_id = |
|
288 | 288 | |
|
289 | 289 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
290 | 290 | ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with |
|
291 | 291 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
292 | 292 | auth_ret_code = |
|
293 | 293 | |
|
294 | 294 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
295 | 295 | ## codes don't break the transactions while 4XX codes do |
|
296 | 296 | lock_ret_code = 423 |
|
297 | 297 | |
|
298 | 298 | ## allows to change the repository location in settings page |
|
299 | 299 | allow_repo_location_change = True |
|
300 | 300 | |
|
301 | 301 | ## allows to setup custom hooks in settings page |
|
302 | 302 | allow_custom_hooks_settings = True |
|
303 | 303 | |
|
304 | 304 | #################################### |
|
305 | 305 | ### CELERY CONFIG #### |
|
306 | 306 | #################################### |
|
307 | 307 | |
|
308 | 308 | use_celery = false |
|
309 | 309 | broker.host = localhost |
|
310 | 310 | broker.vhost = rabbitmqhost |
|
311 | 311 | broker.port = 5672 |
|
312 | 312 | broker.user = rabbitmq |
|
313 | 313 | broker.password = qweqwe |
|
314 | 314 | |
|
315 | 315 | celery.imports = kallithea.lib.celerylib.tasks |
|
316 | 316 | |
|
317 | 317 | celery.result.backend = amqp |
|
318 | 318 | celery.result.dburi = amqp:// |
|
319 | 319 | celery.result.serialier = json |
|
320 | 320 | |
|
321 | 321 | #celery.send.task.error.emails = true |
|
322 | 322 | #celery.amqp.task.result.expires = 18000 |
|
323 | 323 | |
|
324 | 324 | celeryd.concurrency = 2 |
|
325 | 325 | #celeryd.log.file = celeryd.log |
|
326 | 326 | celeryd.log.level = DEBUG |
|
327 | 327 | celeryd.max.tasks.per.child = 1 |
|
328 | 328 | |
|
329 | 329 | ## tasks will never be sent to the queue, but executed locally instead. |
|
330 | 330 | celery.always.eager = false |
|
331 | 331 | |
|
332 | 332 | #################################### |
|
333 | 333 | ### BEAKER CACHE #### |
|
334 | 334 | #################################### |
|
335 | 335 | |
|
336 | 336 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
337 | 337 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
338 | 338 | |
|
339 |
beaker.cache.regions = |
|
|
340 | ||
|
341 | beaker.cache.super_short_term.type = memory | |
|
342 | beaker.cache.super_short_term.expire = 10 | |
|
343 | beaker.cache.super_short_term.key_length = 256 | |
|
339 | beaker.cache.regions = short_term,long_term,sql_cache_short | |
|
344 | 340 | |
|
345 | 341 | beaker.cache.short_term.type = memory |
|
346 | 342 | beaker.cache.short_term.expire = 60 |
|
347 | 343 | beaker.cache.short_term.key_length = 256 |
|
348 | 344 | |
|
349 | 345 | beaker.cache.long_term.type = memory |
|
350 | 346 | beaker.cache.long_term.expire = 36000 |
|
351 | 347 | beaker.cache.long_term.key_length = 256 |
|
352 | 348 | |
|
353 | 349 | beaker.cache.sql_cache_short.type = memory |
|
354 | 350 | beaker.cache.sql_cache_short.expire = 1 |
|
355 | 351 | beaker.cache.sql_cache_short.key_length = 256 |
|
356 | 352 | |
|
357 | beaker.cache.sql_cache_med.type = memory | |
|
358 | beaker.cache.sql_cache_med.expire = 360 | |
|
359 | beaker.cache.sql_cache_med.key_length = 256 | |
|
360 | ||
|
361 | beaker.cache.sql_cache_long.type = file | |
|
362 | beaker.cache.sql_cache_long.expire = 3600 | |
|
363 | beaker.cache.sql_cache_long.key_length = 256 | |
|
364 | ||
|
365 | 353 | #################################### |
|
366 | 354 | ### BEAKER SESSION #### |
|
367 | 355 | #################################### |
|
368 | 356 | ## Type of storage used for the session, current types are |
|
369 | 357 | ## dbm, file, memcached, database, and memory. |
|
370 | 358 | ## The storage uses the Container API |
|
371 | 359 | ## that is also used by the cache system. |
|
372 | 360 | |
|
373 | 361 | ## db session ## |
|
374 | 362 | #beaker.session.type = ext:database |
|
375 | 363 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
376 | 364 | #beaker.session.table_name = db_session |
|
377 | 365 | |
|
378 | 366 | ## encrypted cookie client side session, good for many instances ## |
|
379 | 367 | #beaker.session.type = cookie |
|
380 | 368 | |
|
381 | 369 | ## file based cookies (default) ## |
|
382 | 370 | #beaker.session.type = file |
|
383 | 371 | |
|
384 | 372 | ## beaker.session.key should be unique for a given host, even when running |
|
385 | 373 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
386 | 374 | beaker.session.key = kallithea |
|
387 | 375 | beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f} |
|
388 | 376 | |
|
389 | 377 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
390 | 378 | ## you must disable beaker.session.secret to use this |
|
391 | 379 | #beaker.session.encrypt_key = <key_for_encryption> |
|
392 | 380 | #beaker.session.validate_key = <validation_key> |
|
393 | 381 | |
|
394 | 382 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
395 | 383 | beaker.session.timeout = 2592000 |
|
396 | 384 | beaker.session.httponly = true |
|
397 | 385 | #beaker.session.cookie_path = /<your-prefix> |
|
398 | 386 | |
|
399 | 387 | ## uncomment for https secure cookie |
|
400 | 388 | beaker.session.secure = false |
|
401 | 389 | |
|
402 | 390 | ## auto save the session to not to use .save() |
|
403 | 391 | beaker.session.auto = False |
|
404 | 392 | |
|
405 | 393 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
406 | 394 | #beaker.session.cookie_expires = 3600 |
|
407 | 395 | |
|
408 | 396 | ############################ |
|
409 | 397 | ## ERROR HANDLING SYSTEMS ## |
|
410 | 398 | ############################ |
|
411 | 399 | |
|
412 | 400 | #################### |
|
413 | 401 | ### [errormator] ### |
|
414 | 402 | #################### |
|
415 | 403 | |
|
416 | 404 | ## Errormator is tailored to work with Kallithea, see |
|
417 | 405 | ## http://errormator.com for details how to obtain an account |
|
418 | 406 | ## you must install python package `errormator_client` to make it work |
|
419 | 407 | |
|
420 | 408 | ## errormator enabled |
|
421 | 409 | errormator = false |
|
422 | 410 | |
|
423 | 411 | errormator.server_url = https://api.errormator.com |
|
424 | 412 | errormator.api_key = YOUR_API_KEY |
|
425 | 413 | |
|
426 | 414 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
427 | 415 | |
|
428 | 416 | ## enables 404 error logging (default False) |
|
429 | 417 | errormator.report_404 = false |
|
430 | 418 | |
|
431 | 419 | ## time in seconds after request is considered being slow (default 1) |
|
432 | 420 | errormator.slow_request_time = 1 |
|
433 | 421 | |
|
434 | 422 | ## record slow requests in application |
|
435 | 423 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
436 | 424 | errormator.slow_requests = true |
|
437 | 425 | |
|
438 | 426 | ## enable hooking to application loggers |
|
439 | 427 | #errormator.logging = true |
|
440 | 428 | |
|
441 | 429 | ## minimum log level for log capture |
|
442 | 430 | #errormator.logging.level = WARNING |
|
443 | 431 | |
|
444 | 432 | ## send logs only from erroneous/slow requests |
|
445 | 433 | ## (saves API quota for intensive logging) |
|
446 | 434 | errormator.logging_on_error = false |
|
447 | 435 | |
|
448 | 436 | ## list of additonal keywords that should be grabbed from environ object |
|
449 | 437 | ## can be string with comma separated list of words in lowercase |
|
450 | 438 | ## (by default client will always send following info: |
|
451 | 439 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
452 | 440 | ## start with HTTP* this list be extended with additional keywords here |
|
453 | 441 | errormator.environ_keys_whitelist = |
|
454 | 442 | |
|
455 | 443 | ## list of keywords that should be blanked from request object |
|
456 | 444 | ## can be string with comma separated list of words in lowercase |
|
457 | 445 | ## (by default client will always blank keys that contain following words |
|
458 | 446 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
459 | 447 | ## this list be extended with additional keywords set here |
|
460 | 448 | errormator.request_keys_blacklist = |
|
461 | 449 | |
|
462 | 450 | ## list of namespaces that should be ignores when gathering log entries |
|
463 | 451 | ## can be string with comma separated list of namespaces |
|
464 | 452 | ## (by default the client ignores own entries: errormator_client.client) |
|
465 | 453 | errormator.log_namespace_blacklist = |
|
466 | 454 | |
|
467 | 455 | ################ |
|
468 | 456 | ### [sentry] ### |
|
469 | 457 | ################ |
|
470 | 458 | |
|
471 | 459 | ## sentry is a alternative open source error aggregator |
|
472 | 460 | ## you must install python packages `sentry` and `raven` to enable |
|
473 | 461 | |
|
474 | 462 | sentry.dsn = YOUR_DNS |
|
475 | 463 | sentry.servers = |
|
476 | 464 | sentry.name = |
|
477 | 465 | sentry.key = |
|
478 | 466 | sentry.public_key = |
|
479 | 467 | sentry.secret_key = |
|
480 | 468 | sentry.project = |
|
481 | 469 | sentry.site = |
|
482 | 470 | sentry.include_paths = |
|
483 | 471 | sentry.exclude_paths = |
|
484 | 472 | |
|
485 | 473 | ################################################################################ |
|
486 | 474 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
487 | 475 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
488 | 476 | ## execute malicious code after an exception is raised. ## |
|
489 | 477 | ################################################################################ |
|
490 | 478 | set debug = false |
|
491 | 479 | |
|
492 | 480 | ################################## |
|
493 | 481 | ### LOGVIEW CONFIG ### |
|
494 | 482 | ################################## |
|
495 | 483 | |
|
496 | 484 | logview.sqlalchemy = #faa |
|
497 | 485 | logview.pylons.templating = #bfb |
|
498 | 486 | logview.pylons.util = #eee |
|
499 | 487 | |
|
500 | 488 | ######################################################### |
|
501 | 489 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
502 | 490 | ######################################################### |
|
503 | 491 | |
|
504 | 492 | # SQLITE [default] |
|
505 | 493 | #sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
506 | 494 | sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite |
|
507 | 495 | |
|
508 | 496 | # POSTGRESQL |
|
509 | 497 | #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea |
|
510 | 498 | |
|
511 | 499 | # MySQL |
|
512 | 500 | #sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea |
|
513 | 501 | |
|
514 | 502 | # see sqlalchemy docs for others |
|
515 | 503 | |
|
516 | 504 | sqlalchemy.db1.echo = false |
|
517 | 505 | sqlalchemy.db1.pool_recycle = 3600 |
|
518 | 506 | sqlalchemy.db1.convert_unicode = true |
|
519 | 507 | |
|
520 | 508 | ################################ |
|
521 | 509 | ### LOGGING CONFIGURATION #### |
|
522 | 510 | ################################ |
|
523 | 511 | |
|
524 | 512 | [loggers] |
|
525 | 513 | keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer |
|
526 | 514 | |
|
527 | 515 | [handlers] |
|
528 | 516 | keys = console, console_sql |
|
529 | 517 | |
|
530 | 518 | [formatters] |
|
531 | 519 | keys = generic, color_formatter, color_formatter_sql |
|
532 | 520 | |
|
533 | 521 | ############# |
|
534 | 522 | ## LOGGERS ## |
|
535 | 523 | ############# |
|
536 | 524 | |
|
537 | 525 | [logger_root] |
|
538 | 526 | #level = NOTSET |
|
539 | 527 | level = DEBUG |
|
540 | 528 | handlers = console |
|
541 | 529 | |
|
542 | 530 | [logger_routes] |
|
543 | 531 | level = DEBUG |
|
544 | 532 | handlers = |
|
545 | 533 | qualname = routes.middleware |
|
546 | 534 | ## "level = DEBUG" logs the route matched and routing variables. |
|
547 | 535 | propagate = 1 |
|
548 | 536 | |
|
549 | 537 | [logger_beaker] |
|
550 | 538 | level = DEBUG |
|
551 | 539 | handlers = |
|
552 | 540 | qualname = beaker.container |
|
553 | 541 | propagate = 1 |
|
554 | 542 | |
|
555 | 543 | [logger_templates] |
|
556 | 544 | level = INFO |
|
557 | 545 | handlers = |
|
558 | 546 | qualname = pylons.templating |
|
559 | 547 | propagate = 1 |
|
560 | 548 | |
|
561 | 549 | [logger_kallithea] |
|
562 | 550 | level = DEBUG |
|
563 | 551 | handlers = |
|
564 | 552 | qualname = kallithea |
|
565 | 553 | propagate = 1 |
|
566 | 554 | |
|
567 | 555 | [logger_sqlalchemy] |
|
568 | 556 | #level = INFO |
|
569 | 557 | #handlers = console_sql |
|
570 | 558 | level = ERROR |
|
571 | 559 | handlers = console |
|
572 | 560 | qualname = sqlalchemy.engine |
|
573 | 561 | propagate = 0 |
|
574 | 562 | |
|
575 | 563 | [logger_whoosh_indexer] |
|
576 | 564 | level = DEBUG |
|
577 | 565 | handlers = |
|
578 | 566 | qualname = whoosh_indexer |
|
579 | 567 | propagate = 1 |
|
580 | 568 | |
|
581 | 569 | ############## |
|
582 | 570 | ## HANDLERS ## |
|
583 | 571 | ############## |
|
584 | 572 | |
|
585 | 573 | [handler_console] |
|
586 | 574 | class = StreamHandler |
|
587 | 575 | args = (sys.stderr,) |
|
588 | 576 | #level = INFO |
|
589 | 577 | level = NOTSET |
|
590 | 578 | formatter = generic |
|
591 | 579 | |
|
592 | 580 | [handler_console_sql] |
|
593 | 581 | class = StreamHandler |
|
594 | 582 | args = (sys.stderr,) |
|
595 | 583 | level = WARN |
|
596 | 584 | formatter = generic |
|
597 | 585 | |
|
598 | 586 | ################ |
|
599 | 587 | ## FORMATTERS ## |
|
600 | 588 | ################ |
|
601 | 589 | |
|
602 | 590 | [formatter_generic] |
|
603 | 591 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
604 | 592 | datefmt = %Y-%m-%d %H:%M:%S |
|
605 | 593 | |
|
606 | 594 | [formatter_color_formatter] |
|
607 | 595 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
608 | 596 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
609 | 597 | datefmt = %Y-%m-%d %H:%M:%S |
|
610 | 598 | |
|
611 | 599 | [formatter_color_formatter_sql] |
|
612 | 600 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
613 | 601 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
614 | 602 | datefmt = %Y-%m-%d %H:%M:%S |
General Comments 0
You need to be logged in to leave comments.
Login now