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