comparison config.ini.reference @ 1:5d1e90bb0057 default tip

my starting config, minus some secrets
author drewp@bigasterisk.com
date Sun, 26 Mar 2023 20:05:52 -0700
parents
children
comparison
equal deleted inserted replaced
0:8d7ded808f7c 1:5d1e90bb0057
1 ###################################################################################
2 ###################################################################################
3 ## Kallithea config file generated with kallithea-cli 0.7.0 ##
4 ## ##
5 ## The %(here)s variable will generally be replaced with the parent directory of ##
6 ## this file. Other use of % must be escaped as %% . ##
7 ###################################################################################
8 ###################################################################################
9
10 [DEFAULT]
11
12 ################################################################################
13 ## Email settings ##
14 ## ##
15 ## Refer to the documentation ("Email settings") for more details. ##
16 ## ##
17 ## It is recommended to use a valid sender address that passes access ##
18 ## validation and spam filtering in mail servers. ##
19 ################################################################################
20
21 ## 'From' header for application emails. You can optionally add a name.
22 ## Default:
23 #app_email_from = Kallithea
24 ## Examples:
25 #app_email_from = Kallithea <kallithea-noreply@example.com>
26 #app_email_from = kallithea-noreply@example.com
27
28 ## Subject prefix for application emails.
29 ## A space between this prefix and the real subject is automatically added.
30 ## Default:
31 #email_prefix =
32 ## Example:
33 #email_prefix = [Kallithea]
34
35 ## Recipients for error emails and fallback recipients of application mails.
36 ## Multiple addresses can be specified, comma-separated.
37 ## Only addresses are allowed, do not add any name part.
38 ## Default:
39 #email_to =
40 ## Examples:
41 #email_to = admin@example.com
42 #email_to = admin@example.com,another_admin@example.com
43 email_to =
44
45 ## 'From' header for error emails. You can optionally add a name.
46 ## Default: (none)
47 ## Examples:
48 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
49 #error_email_from = kallithea_errors@example.com
50 error_email_from =
51
52 ## SMTP server settings
53 ## If specifying credentials, make sure to use secure connections.
54 ## Default: Send unencrypted unauthenticated mails to the specified smtp_server.
55 ## For "SSL", use smtp_use_ssl = true and smtp_port = 465.
56 ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
57 smtp_server =
58 smtp_username =
59 smtp_password =
60 smtp_port =
61 smtp_use_ssl = false
62 smtp_use_tls = false
63
64 ## Entry point for 'gearbox serve'
65 [server:main]
66 host = 0.0.0.0
67 port = 5000
68
69 ## Gearbox serve uses the Waitress web server ##
70 use = egg:waitress#main
71 ## avoid multi threading
72 threads = 1
73 ## allow push of repos bigger than the default of 1 GB
74 max_request_body_size = 107374182400
75 ## use poll instead of select, fixes fd limits, may not work on old
76 ## windows systems.
77 #asyncore_use_poll = True
78
79 ## middleware for hosting the WSGI application under a URL prefix
80 [filter:proxy-prefix]
81 use = egg:PasteDeploy#prefix
82 prefix = /code
83 translate_forwarded_server = False
84
85 [app:main]
86 use = egg:kallithea
87 ## enable proxy prefix middleware
88 filter-with = proxy-prefix
89
90 full_stack = true
91 static_files = true
92
93 ## Internationalization (see setup documentation for details)
94 ## By default, the languages requested by the browser are used if available, with English as default.
95 ## Set i18n.enabled=false to disable automatic language choice.
96 #i18n.enabled = true
97 ## To Force a language, set i18n.enabled=false and specify the language in i18n.lang.
98 ## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo
99 #i18n.lang = en
100
101 cache_dir = %(here)s/data
102 index_dir = %(here)s/data/index
103
104 ## uncomment and set this path to use archive download cache
105 archive_cache_dir = %(here)s/data/tarballcache
106
107 ## change this to unique ID for security
108 app_instance_uuid =
109
110 ## cut off limit for large diffs (size in bytes)
111 cut_off_limit = 256000
112
113 ## WSGI environment variable to get the IP address of the client (default REMOTE_ADDR)
114 #remote_addr_variable = HTTP_X_FORWARDED_FOR
115
116 ## WSGI environment variable to get the protocol (http or https) of the client connection (default wsgi.url_scheme)
117 #url_scheme_variable = HTTP_X_FORWARDED_PROTO
118
119 ## always pretend the client connected using HTTPS (default false)
120 #force_https = true
121
122 ## use Strict-Transport-Security headers (default false)
123 #use_htsts = true
124
125 ## number of commits stats will parse on each iteration
126 commit_parse_limit = 25
127
128 ## Path to Python executable to be used for git hooks.
129 ## This value will be written inside the git hook scripts as the text
130 ## after '#!' (shebang). When empty or not defined, the value of
131 ## 'sys.executable' at the time of installation of the git hooks is
132 ## used, which is correct in many cases but for example not when using uwsgi.
133 ## If you change this setting, you should reinstall the Git hooks via
134 ## Admin > Settings > Remap and Rescan.
135 #git_hook_interpreter = /srv/kallithea/venv/bin/python3
136 git_hook_interpreter = /usr/bin/python3
137
138 ## path to git executable
139 git_path = git
140
141 ## git rev filter option, --all is the default filter, if you need to
142 ## hide all refs in changelog switch this to --branches --tags
143 #git_rev_filter = --branches --tags
144
145 ## RSS feed options
146 rss_cut_off_limit = 256000
147 rss_items_per_page = 10
148 rss_include_diff = false
149
150 ## options for showing and identifying changesets
151 show_sha_length = 12
152 show_revision_number = false
153
154 ## Canonical URL to use when creating full URLs in UI and texts.
155 ## Useful when the site is available under different names or protocols.
156 ## Defaults to what is provided in the WSGI environment.
157 canonical_url = https://bigasterisk.com/code
158
159 ## gist URL alias, used to create nicer urls for gist. This should be an
160 ## url that does rewrites to _admin/gists/<gistid>.
161 ## example: http://gist.example.com/{gistid}. Empty means use the internal
162 ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid>
163 gist_alias_url =
164
165 ## default encoding used to convert from and to unicode
166 ## can be also a comma separated list of encoding in case of mixed encodings
167 default_encoding = utf-8
168
169 ## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea
170 hgencoding = utf-8
171
172 ## issue tracker for Kallithea (leave blank to disable, absent for default)
173 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
174
175 ## issue tracking mapping for commit messages, comments, PR descriptions, ...
176 ## Refer to the documentation ("Integration with issue trackers") for more details.
177
178 ## regular expression to match issue references
179 ## This pattern may/should contain parenthesized groups, that can
180 ## be referred to in issue_server_link or issue_sub using Python backreferences
181 ## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'.
182 ## To require mandatory whitespace before the issue pattern, use:
183 ## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace
184 ## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern.
185
186 issue_pat = #(\d+)
187
188 ## server url to the issue
189 ## This pattern may/should contain backreferences to parenthesized groups in issue_pat.
190 ## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group
191 ## called 'groupname' in issue_pat.
192 ## The special token {repo} is replaced with the full repository name
193 ## including repository groups, while {repo_name} is replaced with just
194 ## the name of the repository.
195
196 issue_server_link = https://issues.example.com/{repo}/issue/\1
197
198 ## substitution pattern to use as the link text
199 ## If issue_sub is empty, the text matched by issue_pat is retained verbatim
200 ## for the link text. Otherwise, the link text is that of issue_sub, with any
201 ## backreferences to groups in issue_pat replaced.
202
203 issue_sub =
204
205 ## issue_pat, issue_server_link and issue_sub can have suffixes to specify
206 ## multiple patterns, to other issues server, wiki or others
207 ## below an example how to create a wiki pattern
208 ## wiki-some-id -> https://wiki.example.com/some-id
209
210 #issue_pat_wiki = wiki-(\S+)
211 #issue_server_link_wiki = https://wiki.example.com/\1
212 #issue_sub_wiki = WIKI-\1
213
214 ## alternative return HTTP header for failed authentication. Default HTTP
215 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
216 ## handling that. Set this variable to 403 to return HTTPForbidden
217 auth_ret_code =
218
219 ## allows to change the repository location in settings page
220 allow_repo_location_change = True
221
222 ## allows to setup custom hooks in settings page
223 allow_custom_hooks_settings = True
224
225 ## extra extensions for indexing, space separated and without the leading '.'.
226 #index.extensions =
227 # gemfile
228 # lock
229
230 ## extra filenames for indexing, space separated
231 #index.filenames =
232 # .dockerignore
233 # .editorconfig
234 # INSTALL
235 # CHANGELOG
236
237 ####################################
238 ## SSH CONFIG ##
239 ####################################
240
241 ## SSH is disabled by default, until an Administrator decides to enable it.
242 ssh_enabled = false
243
244 ## File where users' SSH keys will be stored *if* ssh_enabled is true.
245 #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
246 ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
247
248 ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.
249 #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
250 kallithea_cli_path = /home/kallithea/.local/bin/kallithea-cli
251
252 ## Locale to be used in the ssh-serve command.
253 ## This is needed because an SSH client may try to use its own locale
254 ## settings, which may not be available on the server.
255 ## See `locale -a` for valid values on this system.
256 #ssh_locale = C.UTF-8
257 ssh_locale = C.UTF-8
258
259 ####################################
260 ## CELERY CONFIG ##
261 ####################################
262
263 ## Note: Celery doesn't support Windows.
264 use_celery = false
265
266 ## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'.
267
268 ## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':
269 celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
270
271 celery.worker_concurrency = 2
272 celery.worker_max_tasks_per_child = 100
273
274 ####################################
275 ## BEAKER CACHE ##
276 ####################################
277
278 beaker.cache.data_dir = %(here)s/data/cache/data
279 beaker.cache.lock_dir = %(here)s/data/cache/lock
280
281 beaker.cache.regions = long_term,long_term_file
282
283 beaker.cache.long_term.type = memory
284 beaker.cache.long_term.expire = 36000
285 beaker.cache.long_term.key_length = 256
286
287 beaker.cache.long_term_file.type = file
288 beaker.cache.long_term_file.expire = 604800
289 beaker.cache.long_term_file.key_length = 256
290
291 ####################################
292 ## BEAKER SESSION ##
293 ####################################
294
295 ## Name of session cookie. Should be unique for a given host and path, even when running
296 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
297 session.key = kallithea
298 ## Sessions should always only be accessible by the browser, not directly by JavaScript.
299 session.httponly = true
300 ## Session lifetime. 2592000 seconds is 30 days.
301 session.timeout = 2592000
302
303 ## Server secret used with HMAC to ensure integrity of cookies.
304 session.secret =
305 ## Further, encrypt the data with AES.
306 #session.encrypt_key = <key_for_encryption>
307 #session.validate_key = <validation_key>
308
309 ## Type of storage used for the session, current types are
310 ## dbm, file, memcached, database, and memory.
311
312 ## File system storage of session data. (default)
313 #session.type = file
314
315 ## Cookie only, store all session data inside the cookie. Requires secure secrets.
316 #session.type = cookie
317
318 ## Database storage of session data.
319 #session.type = ext:database
320 #session.sa.url = postgresql://postgres:qwe@localhost/kallithea
321 #session.table_name = db_session
322
323 ####################################
324 ## ERROR HANDLING ##
325 ####################################
326
327 ## Show a nice error page for application HTTP errors and exceptions (default true)
328 #errorpage.enabled = true
329
330 ## Enable Backlash client-side interactive debugger (default false)
331 ## WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!*
332 ## This debug mode will allow all visitors to execute malicious code.
333 #debug = false
334
335 ## Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true)
336 #trace_errors.enable = true
337 ## Errors will be reported by mail if trace_errors.error_email is set.
338
339 ## Propagate email settings to ErrorReporter of TurboGears2
340 ## You do not normally need to change these lines
341 get trace_errors.smtp_server = smtp_server
342 get trace_errors.smtp_port = smtp_port
343 get trace_errors.from_address = error_email_from
344 get trace_errors.error_email = email_to
345 get trace_errors.smtp_username = smtp_username
346 get trace_errors.smtp_password = smtp_password
347 get trace_errors.smtp_use_tls = smtp_use_tls
348
349 ##################################
350 ## LOGVIEW CONFIG ##
351 ##################################
352
353 logview.sqlalchemy = #faa
354 logview.pylons.templating = #bfb
355 logview.pylons.util = #eee
356
357 #########################
358 ## DB CONFIG ##
359 #########################
360
361 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
362 #sqlalchemy.url = postgresql://kallithea:password@localhost/kallithea
363 #sqlalchemy.url = mysql://kallithea:password@localhost/kallithea?charset=utf8mb4
364 ## Note: the mysql:// prefix should also be used for MariaDB
365
366 sqlalchemy.pool_recycle = 3600
367
368 session.cookie_expires = 2592000
369
370 ################################
371 ## ALEMBIC CONFIGURATION ##
372 ################################
373
374 [alembic]
375 script_location = kallithea:alembic
376
377 ################################
378 ## LOGGING CONFIGURATION ##
379 ################################
380
381 [loggers]
382 keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash
383
384 [handlers]
385 keys = console, console_color, console_color_sql, null
386
387 [formatters]
388 keys = generic, color_formatter, color_formatter_sql
389
390 #############
391 ## LOGGERS ##
392 #############
393
394 [logger_root]
395 level = NOTSET
396 handlers = console
397 ## For coloring based on log level:
398 #handlers = console_color
399
400 [logger_routes]
401 level = WARN
402 handlers =
403 qualname = routes.middleware
404 ## "level = DEBUG" logs the route matched and routing variables.
405
406 [logger_beaker]
407 level = WARN
408 handlers =
409 qualname = beaker.container
410
411 [logger_templates]
412 level = WARN
413 handlers =
414 qualname = pylons.templating
415
416 [logger_kallithea]
417 level = WARN
418 handlers =
419 qualname = kallithea
420
421 [logger_tg]
422 level = WARN
423 handlers =
424 qualname = tg
425
426 [logger_gearbox]
427 level = WARN
428 handlers =
429 qualname = gearbox
430
431 [logger_sqlalchemy]
432 level = WARN
433 handlers =
434 qualname = sqlalchemy.engine
435 ## For coloring based on log level and pretty printing of SQL:
436 #level = INFO
437 #handlers = console_color_sql
438 #propagate = 0
439
440 [logger_whoosh_indexer]
441 level = WARN
442 handlers =
443 qualname = whoosh_indexer
444
445 [logger_werkzeug]
446 level = WARN
447 handlers =
448 qualname = werkzeug
449
450 [logger_backlash]
451 level = WARN
452 handlers =
453 qualname = backlash
454
455 ##############
456 ## HANDLERS ##
457 ##############
458
459 [handler_console]
460 class = StreamHandler
461 args = (sys.stderr,)
462 formatter = generic
463
464 [handler_console_color]
465 ## ANSI color coding based on log level
466 class = StreamHandler
467 args = (sys.stderr,)
468 formatter = color_formatter
469
470 [handler_console_color_sql]
471 ## ANSI color coding and pretty printing of SQL statements
472 class = StreamHandler
473 args = (sys.stderr,)
474 formatter = color_formatter_sql
475
476 [handler_null]
477 class = NullHandler
478 args = ()
479
480 ################
481 ## FORMATTERS ##
482 ################
483
484 [formatter_generic]
485 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
486 datefmt = %Y-%m-%d %H:%M:%S
487
488 [formatter_color_formatter]
489 class = kallithea.lib.colored_formatter.ColorFormatter
490 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
491 datefmt = %Y-%m-%d %H:%M:%S
492
493 [formatter_color_formatter_sql]
494 class = kallithea.lib.colored_formatter.ColorFormatterSql
495 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
496 datefmt = %Y-%m-%d %H:%M:%S
497
498 #################
499 ## SSH LOGGING ##
500 #################
501
502 ## The default loggers use 'handler_console' that uses StreamHandler with
503 ## destination 'sys.stderr'. In the context of the SSH server process, these log
504 ## messages would be sent to the client, which is normally not what you want.
505 ## By default, when running ssh-serve, just use NullHandler and disable logging
506 ## completely. For other logging options, see:
507 ## https://docs.python.org/2/library/logging.handlers.html
508
509 [ssh_serve:logger_root]
510 level = CRITICAL
511 handlers = null
512
513 ## Note: If logging is configured with other handlers, they might need similar
514 ## muting for ssh-serve too.