Show More
@@ -1,625 +1,626 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 | # # |
|
6 | 6 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
7 | 7 | <%text>################################################################################</%text> |
|
8 | 8 | <%text>################################################################################</%text> |
|
9 | 9 | |
|
10 | 10 | [DEFAULT] |
|
11 | 11 | |
|
12 | 12 | <%text>################################################################################</%text> |
|
13 | 13 | <%text>## Email settings ##</%text> |
|
14 | 14 | <%text>## ##</%text> |
|
15 | 15 | <%text>## Refer to the documentation ("Email 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 emails. 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 emails.</%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 emails 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 | email_to = |
|
44 | 44 | |
|
45 | 45 | <%text>## 'From' header for error emails. You can optionally add a name.</%text> |
|
46 | 46 | <%text>## Default: (none)</%text> |
|
47 | 47 | <%text>## Examples:</%text> |
|
48 | 48 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
49 | 49 | #error_email_from = kallithea_errors@example.com |
|
50 | 50 | error_email_from = |
|
51 | 51 | |
|
52 | 52 | <%text>## SMTP server settings</%text> |
|
53 | 53 | <%text>## If specifying credentials, make sure to use secure connections.</%text> |
|
54 | 54 | <%text>## Default: Send unencrypted unauthenticated mails to the specified smtp_server.</%text> |
|
55 | 55 | <%text>## For "SSL", use smtp_use_ssl = true and smtp_port = 465.</%text> |
|
56 | 56 | <%text>## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.</%text> |
|
57 | 57 | smtp_server = |
|
58 | 58 | #smtp_username = |
|
59 | 59 | #smtp_password = |
|
60 | 60 | smtp_port = |
|
61 | 61 | #smtp_use_ssl = false |
|
62 | 62 | #smtp_use_tls = false |
|
63 | 63 | |
|
64 | 64 | [server:main] |
|
65 | 65 | %if http_server == 'gearbox': |
|
66 | 66 | <%text>## Gearbox default web server ##</%text> |
|
67 | 67 | use = egg:gearbox#wsgiref |
|
68 | 68 | <%text>## nr of worker threads to spawn</%text> |
|
69 | 69 | threadpool_workers = 1 |
|
70 | 70 | <%text>## max request before thread respawn</%text> |
|
71 | 71 | threadpool_max_requests = 100 |
|
72 | 72 | <%text>## option to use threads of process</%text> |
|
73 | 73 | use_threadpool = true |
|
74 | 74 | |
|
75 | 75 | %elif http_server == 'gevent': |
|
76 | 76 | <%text>## Gearbox gevent web server ##</%text> |
|
77 | 77 | use = egg:gearbox#gevent |
|
78 | 78 | |
|
79 | 79 | %elif http_server == 'waitress': |
|
80 | 80 | <%text>## WAITRESS ##</%text> |
|
81 | 81 | use = egg:waitress#main |
|
82 | 82 | <%text>## number of worker threads</%text> |
|
83 | 83 | threads = 1 |
|
84 | 84 | <%text>## MAX BODY SIZE 100GB</%text> |
|
85 | 85 | max_request_body_size = 107374182400 |
|
86 | 86 | <%text>## use poll instead of select, fixes fd limits, may not work on old</%text> |
|
87 | 87 | <%text>## windows systems.</%text> |
|
88 | 88 | #asyncore_use_poll = True |
|
89 | 89 | |
|
90 | 90 | %elif http_server == 'gunicorn': |
|
91 | 91 | <%text>## GUNICORN ##</%text> |
|
92 | 92 | use = egg:gunicorn#main |
|
93 | 93 | <%text>## number of process workers. You must set `instance_id = *` when this option</%text> |
|
94 | 94 | <%text>## is set to more than one worker</%text> |
|
95 | 95 | workers = 4 |
|
96 | 96 | <%text>## process name</%text> |
|
97 | 97 | proc_name = kallithea |
|
98 | 98 | <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text> |
|
99 | 99 | <%text>## recommended for bigger setup is using of of other than sync one</%text> |
|
100 | 100 | worker_class = sync |
|
101 | 101 | max_requests = 1000 |
|
102 | 102 | <%text>## amount of time a worker can handle request before it gets killed and</%text> |
|
103 | 103 | <%text>## restarted</%text> |
|
104 | 104 | timeout = 3600 |
|
105 | 105 | |
|
106 | 106 | %elif http_server == 'uwsgi': |
|
107 | 107 | <%text>## UWSGI ##</%text> |
|
108 | 108 | <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text> |
|
109 | 109 | [uwsgi] |
|
110 | 110 | socket = /tmp/uwsgi.sock |
|
111 | 111 | master = true |
|
112 | http = 127.0.0.1:5000 | |
|
112 | http = ${host}:${port} | |
|
113 | 113 | |
|
114 |
<%text>## set as d |
|
|
114 | <%text>## set as daemon and redirect all output to file</%text> | |
|
115 | 115 | #daemonize = ./uwsgi_kallithea.log |
|
116 | 116 | |
|
117 | 117 | <%text>## master process PID</%text> |
|
118 | 118 | pidfile = ./uwsgi_kallithea.pid |
|
119 | 119 | |
|
120 | 120 | <%text>## stats server with workers statistics, use uwsgitop</%text> |
|
121 | 121 | <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text> |
|
122 | 122 | stats = 127.0.0.1:1717 |
|
123 | 123 | memory-report = true |
|
124 | 124 | |
|
125 | 125 | <%text>## log 5XX errors</%text> |
|
126 | 126 | log-5xx = true |
|
127 | 127 | |
|
128 | 128 | <%text>## Set the socket listen queue size.</%text> |
|
129 | 129 | listen = 128 |
|
130 | 130 | |
|
131 | 131 | <%text>## Gracefully Reload workers after the specified amount of managed requests</%text> |
|
132 | 132 | <%text>## (avoid memory leaks).</%text> |
|
133 | 133 | max-requests = 1000 |
|
134 | 134 | |
|
135 | 135 | <%text>## enable large buffers</%text> |
|
136 | 136 | buffer-size = 65535 |
|
137 | 137 | |
|
138 | 138 | <%text>## socket and http timeouts ##</%text> |
|
139 | 139 | http-timeout = 3600 |
|
140 | 140 | socket-timeout = 3600 |
|
141 | 141 | |
|
142 | 142 | <%text>## Log requests slower than the specified number of milliseconds.</%text> |
|
143 | 143 | log-slow = 10 |
|
144 | 144 | |
|
145 | 145 | <%text>## Exit if no app can be loaded.</%text> |
|
146 | 146 | need-app = true |
|
147 | 147 | |
|
148 | 148 | <%text>## Set lazy mode (load apps in workers instead of master).</%text> |
|
149 | 149 | lazy = true |
|
150 | 150 | |
|
151 | 151 | <%text>## scaling ##</%text> |
|
152 | 152 | <%text>## set cheaper algorithm to use, if not set default will be used</%text> |
|
153 | 153 | cheaper-algo = spare |
|
154 | 154 | |
|
155 | 155 | <%text>## minimum number of workers to keep at all times</%text> |
|
156 | 156 | cheaper = 1 |
|
157 | 157 | |
|
158 | 158 | <%text>## number of workers to spawn at startup</%text> |
|
159 | 159 | cheaper-initial = 1 |
|
160 | 160 | |
|
161 | 161 | <%text>## maximum number of workers that can be spawned</%text> |
|
162 | 162 | workers = 4 |
|
163 | 163 | |
|
164 | 164 | <%text>## how many workers should be spawned at a time</%text> |
|
165 | 165 | cheaper-step = 1 |
|
166 | 166 | |
|
167 | 167 | %endif |
|
168 | <%text>## COMMON ##</%text> | |
|
168 | %if http_server != 'uwsgi': | |
|
169 | 169 |
|
|
170 | 170 | port = ${port} |
|
171 | 171 | |
|
172 | %endif | |
|
172 | 173 | <%text>## middleware for hosting the WSGI application under a URL prefix</%text> |
|
173 | 174 | #[filter:proxy-prefix] |
|
174 | 175 | #use = egg:PasteDeploy#prefix |
|
175 | 176 | #prefix = /<your-prefix> |
|
176 | 177 | |
|
177 | 178 | [app:main] |
|
178 | 179 | use = egg:kallithea |
|
179 | 180 | <%text>## enable proxy prefix middleware</%text> |
|
180 | 181 | #filter-with = proxy-prefix |
|
181 | 182 | |
|
182 | 183 | full_stack = true |
|
183 | 184 | static_files = true |
|
184 | 185 | |
|
185 | 186 | <%text>## Internationalization (see setup documentation for details)</%text> |
|
186 | 187 | <%text>## By default, the language requested by the browser is used if available.</%text> |
|
187 | 188 | #i18n.enable = false |
|
188 | 189 | <%text>## Fallback language, empty for English (valid values are the names of subdirectories in kallithea/i18n):</%text> |
|
189 | 190 | i18n.lang = |
|
190 | 191 | |
|
191 | 192 | cache_dir = %(here)s/data |
|
192 | 193 | index_dir = %(here)s/data/index |
|
193 | 194 | |
|
194 | 195 | <%text>## perform a full repository scan on each server start, this should be</%text> |
|
195 | 196 | <%text>## set to false after first startup, to allow faster server restarts.</%text> |
|
196 | 197 | initial_repo_scan = false |
|
197 | 198 | |
|
198 | 199 | <%text>## uncomment and set this path to use archive download cache</%text> |
|
199 | 200 | archive_cache_dir = %(here)s/tarballcache |
|
200 | 201 | |
|
201 | 202 | <%text>## change this to unique ID for security</%text> |
|
202 | 203 | app_instance_uuid = ${uuid()} |
|
203 | 204 | |
|
204 | 205 | <%text>## cut off limit for large diffs (size in bytes)</%text> |
|
205 | 206 | cut_off_limit = 256000 |
|
206 | 207 | |
|
207 | 208 | <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text> |
|
208 | 209 | force_https = false |
|
209 | 210 | |
|
210 | 211 | <%text>## use Strict-Transport-Security headers</%text> |
|
211 | 212 | use_htsts = false |
|
212 | 213 | |
|
213 | 214 | <%text>## number of commits stats will parse on each iteration</%text> |
|
214 | 215 | commit_parse_limit = 25 |
|
215 | 216 | |
|
216 | 217 | <%text>## path to git executable</%text> |
|
217 | 218 | git_path = git |
|
218 | 219 | |
|
219 | 220 | <%text>## git rev filter option, --all is the default filter, if you need to</%text> |
|
220 | 221 | <%text>## hide all refs in changelog switch this to --branches --tags</%text> |
|
221 | 222 | #git_rev_filter = --branches --tags |
|
222 | 223 | |
|
223 | 224 | <%text>## RSS feed options</%text> |
|
224 | 225 | rss_cut_off_limit = 256000 |
|
225 | 226 | rss_items_per_page = 10 |
|
226 | 227 | rss_include_diff = false |
|
227 | 228 | |
|
228 | 229 | <%text>## options for showing and identifying changesets</%text> |
|
229 | 230 | show_sha_length = 12 |
|
230 | 231 | show_revision_number = false |
|
231 | 232 | |
|
232 | 233 | <%text>## Canonical URL to use when creating full URLs in UI and texts.</%text> |
|
233 | 234 | <%text>## Useful when the site is available under different names or protocols.</%text> |
|
234 | 235 | <%text>## Defaults to what is provided in the WSGI environment.</%text> |
|
235 | 236 | #canonical_url = https://kallithea.example.com/repos |
|
236 | 237 | |
|
237 | 238 | <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text> |
|
238 | 239 | <%text>## url that does rewrites to _admin/gists/<gistid>.</%text> |
|
239 | 240 | <%text>## example: http://gist.example.com/{gistid}. Empty means use the internal</%text> |
|
240 | 241 | <%text>## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid></%text> |
|
241 | 242 | gist_alias_url = |
|
242 | 243 | |
|
243 | 244 | <%text>## white list of API enabled controllers. This allows to add list of</%text> |
|
244 | 245 | <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text> |
|
245 | 246 | <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text> |
|
246 | 247 | <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text> |
|
247 | 248 | <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text> |
|
248 | 249 | <%text>## Recommended settings below are commented out:</%text> |
|
249 | 250 | api_access_controllers_whitelist = |
|
250 | 251 | # ChangesetController:changeset_patch, |
|
251 | 252 | # ChangesetController:changeset_raw, |
|
252 | 253 | # FilesController:raw, |
|
253 | 254 | # FilesController:archivefile |
|
254 | 255 | |
|
255 | 256 | <%text>## default encoding used to convert from and to unicode</%text> |
|
256 | 257 | <%text>## can be also a comma separated list of encoding in case of mixed encodings</%text> |
|
257 | 258 | default_encoding = utf8 |
|
258 | 259 | |
|
259 | 260 | <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text> |
|
260 | 261 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
261 | 262 | |
|
262 | 263 | <%text>## issue tracking mapping for commits messages</%text> |
|
263 | 264 | <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text> |
|
264 | 265 | |
|
265 | 266 | <%text>## pattern to get the issues from commit messages</%text> |
|
266 | 267 | <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text> |
|
267 | 268 | <%text>## {id} will be all groups matched from this pattern</%text> |
|
268 | 269 | |
|
269 | 270 | issue_pat = (?:\s*#)(\d+) |
|
270 | 271 | |
|
271 | 272 | <%text>## server url to the issue, each {id} will be replaced with match</%text> |
|
272 | 273 | <%text>## fetched from the regex and {repo} is replaced with full repository name</%text> |
|
273 | 274 | <%text>## including groups {repo_name} is replaced with just name of repo</%text> |
|
274 | 275 | |
|
275 | 276 | issue_server_link = https://issues.example.com/{repo}/issue/{id} |
|
276 | 277 | |
|
277 | 278 | <%text>## prefix to add to link to indicate it's an url</%text> |
|
278 | 279 | <%text>## #314 will be replaced by <issue_prefix><id></%text> |
|
279 | 280 | |
|
280 | 281 | issue_prefix = # |
|
281 | 282 | |
|
282 | 283 | <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text> |
|
283 | 284 | <%text>## multiple patterns, to other issues server, wiki or others</%text> |
|
284 | 285 | <%text>## below an example how to create a wiki pattern</%text> |
|
285 | 286 | # wiki-some-id -> https://wiki.example.com/some-id |
|
286 | 287 | |
|
287 | 288 | #issue_pat_wiki = (?:wiki-)(.+) |
|
288 | 289 | #issue_server_link_wiki = https://wiki.example.com/{id} |
|
289 | 290 | #issue_prefix_wiki = WIKI- |
|
290 | 291 | |
|
291 | 292 | <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text> |
|
292 | 293 | <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text> |
|
293 | 294 | <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text> |
|
294 | 295 | auth_ret_code = |
|
295 | 296 | |
|
296 | 297 | <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text> |
|
297 | 298 | <%text>## codes don't break the transactions while 4XX codes do</%text> |
|
298 | 299 | lock_ret_code = 423 |
|
299 | 300 | |
|
300 | 301 | <%text>## allows to change the repository location in settings page</%text> |
|
301 | 302 | allow_repo_location_change = True |
|
302 | 303 | |
|
303 | 304 | <%text>## allows to setup custom hooks in settings page</%text> |
|
304 | 305 | allow_custom_hooks_settings = True |
|
305 | 306 | |
|
306 | 307 | <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text> |
|
307 | 308 | # index.extensions = |
|
308 | 309 | # gemfile |
|
309 | 310 | # lock |
|
310 | 311 | |
|
311 | 312 | <%text>## extra filenames for indexing, space separated</%text> |
|
312 | 313 | # index.filenames = |
|
313 | 314 | # .dockerignore |
|
314 | 315 | # .editorconfig |
|
315 | 316 | # INSTALL |
|
316 | 317 | # CHANGELOG |
|
317 | 318 | |
|
318 | 319 | <%text>####################################</%text> |
|
319 | 320 | <%text>### CELERY CONFIG ####</%text> |
|
320 | 321 | <%text>####################################</%text> |
|
321 | 322 | |
|
322 | 323 | use_celery = false |
|
323 | 324 | |
|
324 | 325 | <%text>## Example: connect to the virtual host 'rabbitmqhost' on localhost as rabbitmq:</%text> |
|
325 | 326 | broker.url = amqp://rabbitmq:qewqew@localhost:5672/rabbitmqhost |
|
326 | 327 | |
|
327 | 328 | celery.imports = kallithea.lib.celerylib.tasks |
|
328 | 329 | celery.accept.content = pickle |
|
329 | 330 | celery.result.backend = amqp |
|
330 | 331 | celery.result.dburi = amqp:// |
|
331 | 332 | celery.result.serialier = json |
|
332 | 333 | |
|
333 | 334 | #celery.send.task.error.emails = true |
|
334 | 335 | #celery.amqp.task.result.expires = 18000 |
|
335 | 336 | |
|
336 | 337 | celeryd.concurrency = 2 |
|
337 | 338 | celeryd.max.tasks.per.child = 1 |
|
338 | 339 | |
|
339 | 340 | <%text>## If true, tasks will never be sent to the queue, but executed locally instead.</%text> |
|
340 | 341 | celery.always.eager = false |
|
341 | 342 | |
|
342 | 343 | <%text>####################################</%text> |
|
343 | 344 | <%text>### BEAKER CACHE ####</%text> |
|
344 | 345 | <%text>####################################</%text> |
|
345 | 346 | |
|
346 | 347 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
347 | 348 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
348 | 349 | |
|
349 | 350 | beaker.cache.regions = short_term,long_term,sql_cache_short |
|
350 | 351 | |
|
351 | 352 | beaker.cache.short_term.type = memory |
|
352 | 353 | beaker.cache.short_term.expire = 60 |
|
353 | 354 | beaker.cache.short_term.key_length = 256 |
|
354 | 355 | |
|
355 | 356 | beaker.cache.long_term.type = memory |
|
356 | 357 | beaker.cache.long_term.expire = 36000 |
|
357 | 358 | beaker.cache.long_term.key_length = 256 |
|
358 | 359 | |
|
359 | 360 | beaker.cache.sql_cache_short.type = memory |
|
360 | 361 | beaker.cache.sql_cache_short.expire = 10 |
|
361 | 362 | beaker.cache.sql_cache_short.key_length = 256 |
|
362 | 363 | |
|
363 | 364 | <%text>####################################</%text> |
|
364 | 365 | <%text>### BEAKER SESSION ####</%text> |
|
365 | 366 | <%text>####################################</%text> |
|
366 | 367 | |
|
367 | 368 | <%text>## Name of session cookie. Should be unique for a given host and path, even when running</%text> |
|
368 | 369 | <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text> |
|
369 | 370 | beaker.session.key = kallithea |
|
370 | 371 | <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript.</%text> |
|
371 | 372 | beaker.session.httponly = true |
|
372 | 373 | <%text>## Session lifetime. 2592000 seconds is 30 days.</%text> |
|
373 | 374 | beaker.session.timeout = 2592000 |
|
374 | 375 | |
|
375 | 376 | <%text>## Server secret used with HMAC to ensure integrity of cookies.</%text> |
|
376 | 377 | beaker.session.secret = ${uuid()} |
|
377 | 378 | <%text>## Further, encrypt the data with AES.</%text> |
|
378 | 379 | #beaker.session.encrypt_key = <key_for_encryption> |
|
379 | 380 | #beaker.session.validate_key = <validation_key> |
|
380 | 381 | |
|
381 | 382 | <%text>## Type of storage used for the session, current types are</%text> |
|
382 | 383 | <%text>## dbm, file, memcached, database, and memory.</%text> |
|
383 | 384 | |
|
384 | 385 | <%text>## File system storage of session data. (default)</%text> |
|
385 | 386 | #beaker.session.type = file |
|
386 | 387 | |
|
387 | 388 | <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets.</%text> |
|
388 | 389 | #beaker.session.type = cookie |
|
389 | 390 | |
|
390 | 391 | <%text>## Database storage of session data.</%text> |
|
391 | 392 | #beaker.session.type = ext:database |
|
392 | 393 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
393 | 394 | #beaker.session.table_name = db_session |
|
394 | 395 | |
|
395 | 396 | %if error_aggregation_service == 'appenlight': |
|
396 | 397 | <%text>############################</%text> |
|
397 | 398 | <%text>## ERROR HANDLING SYSTEMS ##</%text> |
|
398 | 399 | <%text>############################</%text> |
|
399 | 400 | |
|
400 | 401 | # Propagate email settings to ErrorReporter of TurboGears2 |
|
401 | 402 | # You do not normally need to change these lines |
|
402 | 403 | get trace_errors.error_email = email_to |
|
403 | 404 | get trace_errors.smtp_server = smtp_server |
|
404 | 405 | get trace_errors.smtp_port = smtp_port |
|
405 | 406 | get trace_errors.from_address = error_email_from |
|
406 | 407 | |
|
407 | 408 | <%text>####################</%text> |
|
408 | 409 | <%text>### [appenlight] ###</%text> |
|
409 | 410 | <%text>####################</%text> |
|
410 | 411 | |
|
411 | 412 | <%text>## AppEnlight is tailored to work with Kallithea, see</%text> |
|
412 | 413 | <%text>## http://appenlight.com for details how to obtain an account</%text> |
|
413 | 414 | <%text>## you must install python package `appenlight_client` to make it work</%text> |
|
414 | 415 | |
|
415 | 416 | <%text>## appenlight enabled</%text> |
|
416 | 417 | appenlight = false |
|
417 | 418 | |
|
418 | 419 | appenlight.server_url = https://api.appenlight.com |
|
419 | 420 | appenlight.api_key = YOUR_API_KEY |
|
420 | 421 | |
|
421 | 422 | <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text> |
|
422 | 423 | |
|
423 | 424 | <%text>## enables 404 error logging (default False)</%text> |
|
424 | 425 | appenlight.report_404 = false |
|
425 | 426 | |
|
426 | 427 | <%text>## time in seconds after request is considered being slow (default 1)</%text> |
|
427 | 428 | appenlight.slow_request_time = 1 |
|
428 | 429 | |
|
429 | 430 | <%text>## record slow requests in application</%text> |
|
430 | 431 | <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text> |
|
431 | 432 | appenlight.slow_requests = true |
|
432 | 433 | |
|
433 | 434 | <%text>## enable hooking to application loggers</%text> |
|
434 | 435 | #appenlight.logging = true |
|
435 | 436 | |
|
436 | 437 | <%text>## minimum log level for log capture</%text> |
|
437 | 438 | #appenlight.logging.level = WARNING |
|
438 | 439 | |
|
439 | 440 | <%text>## send logs only from erroneous/slow requests</%text> |
|
440 | 441 | <%text>## (saves API quota for intensive logging)</%text> |
|
441 | 442 | appenlight.logging_on_error = false |
|
442 | 443 | |
|
443 | 444 | <%text>## list of additional keywords that should be grabbed from environ object</%text> |
|
444 | 445 | <%text>## can be string with comma separated list of words in lowercase</%text> |
|
445 | 446 | <%text>## (by default client will always send following info:</%text> |
|
446 | 447 | <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text> |
|
447 | 448 | <%text>## start with HTTP* this list be extended with additional keywords here</%text> |
|
448 | 449 | appenlight.environ_keys_whitelist = |
|
449 | 450 | |
|
450 | 451 | <%text>## list of keywords that should be blanked from request object</%text> |
|
451 | 452 | <%text>## can be string with comma separated list of words in lowercase</%text> |
|
452 | 453 | <%text>## (by default client will always blank keys that contain following words</%text> |
|
453 | 454 | <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text> |
|
454 | 455 | <%text>## this list be extended with additional keywords set here</%text> |
|
455 | 456 | appenlight.request_keys_blacklist = |
|
456 | 457 | |
|
457 | 458 | <%text>## list of namespaces that should be ignores when gathering log entries</%text> |
|
458 | 459 | <%text>## can be string with comma separated list of namespaces</%text> |
|
459 | 460 | <%text>## (by default the client ignores own entries: appenlight_client.client)</%text> |
|
460 | 461 | appenlight.log_namespace_blacklist = |
|
461 | 462 | |
|
462 | 463 | %elif error_aggregation_service == 'sentry': |
|
463 | 464 | <%text>################</%text> |
|
464 | 465 | <%text>### [sentry] ###</%text> |
|
465 | 466 | <%text>################</%text> |
|
466 | 467 | |
|
467 | 468 | <%text>## sentry is a alternative open source error aggregator</%text> |
|
468 | 469 | <%text>## you must install python packages `sentry` and `raven` to enable</%text> |
|
469 | 470 | |
|
470 | 471 | sentry.dsn = YOUR_DNS |
|
471 | 472 | sentry.servers = |
|
472 | 473 | sentry.name = |
|
473 | 474 | sentry.key = |
|
474 | 475 | sentry.public_key = |
|
475 | 476 | sentry.secret_key = |
|
476 | 477 | sentry.project = |
|
477 | 478 | sentry.site = |
|
478 | 479 | sentry.include_paths = |
|
479 | 480 | sentry.exclude_paths = |
|
480 | 481 | |
|
481 | 482 | %endif |
|
482 | 483 | <%text>################################################################################</%text> |
|
483 | 484 | <%text>## WARNING: *DEBUG MODE MUST BE OFF IN A PRODUCTION ENVIRONMENT* ##</%text> |
|
484 | 485 | <%text>## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##</%text> |
|
485 | 486 | <%text>## execute malicious code after an exception is raised. ##</%text> |
|
486 | 487 | <%text>################################################################################</%text> |
|
487 | 488 | debug = false |
|
488 | 489 | |
|
489 | 490 | <%text>##################################</%text> |
|
490 | 491 | <%text>### LOGVIEW CONFIG ###</%text> |
|
491 | 492 | <%text>##################################</%text> |
|
492 | 493 | |
|
493 | 494 | logview.sqlalchemy = #faa |
|
494 | 495 | logview.pylons.templating = #bfb |
|
495 | 496 | logview.pylons.util = #eee |
|
496 | 497 | |
|
497 | 498 | <%text>#########################################################</%text> |
|
498 | 499 | <%text>### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###</%text> |
|
499 | 500 | <%text>#########################################################</%text> |
|
500 | 501 | |
|
501 | 502 | %if database_engine == 'sqlite': |
|
502 | 503 | # SQLITE [default] |
|
503 | 504 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
504 | 505 | |
|
505 | 506 | %elif database_engine == 'postgres': |
|
506 | 507 | # POSTGRESQL |
|
507 | 508 | sqlalchemy.url = postgresql://user:pass@localhost/kallithea |
|
508 | 509 | |
|
509 | 510 | %elif database_engine == 'mysql': |
|
510 | 511 | # MySQL |
|
511 | 512 | sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 |
|
512 | 513 | |
|
513 | 514 | %endif |
|
514 | 515 | # see sqlalchemy docs for others |
|
515 | 516 | |
|
516 | 517 | sqlalchemy.pool_recycle = 3600 |
|
517 | 518 | |
|
518 | 519 | <%text>################################</%text> |
|
519 | 520 | <%text>### ALEMBIC CONFIGURATION ####</%text> |
|
520 | 521 | <%text>################################</%text> |
|
521 | 522 | |
|
522 | 523 | [alembic] |
|
523 | 524 | script_location = kallithea:alembic |
|
524 | 525 | |
|
525 | 526 | <%text>################################</%text> |
|
526 | 527 | <%text>### LOGGING CONFIGURATION ####</%text> |
|
527 | 528 | <%text>################################</%text> |
|
528 | 529 | |
|
529 | 530 | [loggers] |
|
530 | 531 | keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer |
|
531 | 532 | |
|
532 | 533 | [handlers] |
|
533 | 534 | keys = console, console_sql |
|
534 | 535 | |
|
535 | 536 | [formatters] |
|
536 | 537 | keys = generic, color_formatter, color_formatter_sql |
|
537 | 538 | |
|
538 | 539 | <%text>#############</%text> |
|
539 | 540 | <%text>## LOGGERS ##</%text> |
|
540 | 541 | <%text>#############</%text> |
|
541 | 542 | |
|
542 | 543 | [logger_root] |
|
543 | 544 | level = NOTSET |
|
544 | 545 | handlers = console |
|
545 | 546 | |
|
546 | 547 | [logger_routes] |
|
547 | 548 | level = DEBUG |
|
548 | 549 | handlers = |
|
549 | 550 | qualname = routes.middleware |
|
550 | 551 | <%text>## "level = DEBUG" logs the route matched and routing variables.</%text> |
|
551 | 552 | propagate = 1 |
|
552 | 553 | |
|
553 | 554 | [logger_beaker] |
|
554 | 555 | level = DEBUG |
|
555 | 556 | handlers = |
|
556 | 557 | qualname = beaker.container |
|
557 | 558 | propagate = 1 |
|
558 | 559 | |
|
559 | 560 | [logger_templates] |
|
560 | 561 | level = INFO |
|
561 | 562 | handlers = |
|
562 | 563 | qualname = pylons.templating |
|
563 | 564 | propagate = 1 |
|
564 | 565 | |
|
565 | 566 | [logger_kallithea] |
|
566 | 567 | level = DEBUG |
|
567 | 568 | handlers = |
|
568 | 569 | qualname = kallithea |
|
569 | 570 | propagate = 1 |
|
570 | 571 | |
|
571 | 572 | [logger_tg] |
|
572 | 573 | level = DEBUG |
|
573 | 574 | handlers = |
|
574 | 575 | qualname = tg |
|
575 | 576 | propagate = 1 |
|
576 | 577 | |
|
577 | 578 | [logger_gearbox] |
|
578 | 579 | level = DEBUG |
|
579 | 580 | handlers = |
|
580 | 581 | qualname = gearbox |
|
581 | 582 | propagate = 1 |
|
582 | 583 | |
|
583 | 584 | [logger_sqlalchemy] |
|
584 | 585 | level = WARN |
|
585 | 586 | handlers = console_sql |
|
586 | 587 | qualname = sqlalchemy.engine |
|
587 | 588 | propagate = 0 |
|
588 | 589 | |
|
589 | 590 | [logger_whoosh_indexer] |
|
590 | 591 | level = DEBUG |
|
591 | 592 | handlers = |
|
592 | 593 | qualname = whoosh_indexer |
|
593 | 594 | propagate = 1 |
|
594 | 595 | |
|
595 | 596 | <%text>##############</%text> |
|
596 | 597 | <%text>## HANDLERS ##</%text> |
|
597 | 598 | <%text>##############</%text> |
|
598 | 599 | |
|
599 | 600 | [handler_console] |
|
600 | 601 | class = StreamHandler |
|
601 | 602 | args = (sys.stderr,) |
|
602 | 603 | formatter = generic |
|
603 | 604 | |
|
604 | 605 | [handler_console_sql] |
|
605 | 606 | class = StreamHandler |
|
606 | 607 | args = (sys.stderr,) |
|
607 | 608 | formatter = generic |
|
608 | 609 | |
|
609 | 610 | <%text>################</%text> |
|
610 | 611 | <%text>## FORMATTERS ##</%text> |
|
611 | 612 | <%text>################</%text> |
|
612 | 613 | |
|
613 | 614 | [formatter_generic] |
|
614 | 615 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
615 | 616 | datefmt = %Y-%m-%d %H:%M:%S |
|
616 | 617 | |
|
617 | 618 | [formatter_color_formatter] |
|
618 | 619 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
619 | 620 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
620 | 621 | datefmt = %Y-%m-%d %H:%M:%S |
|
621 | 622 | |
|
622 | 623 | [formatter_color_formatter_sql] |
|
623 | 624 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
624 | 625 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
625 | 626 | datefmt = %Y-%m-%d %H:%M:%S |
General Comments 0
You need to be logged in to leave comments.
Login now