Show More
@@ -1,10 +1,10 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################### | |
2 | ################################################################################ |
|
2 | ################################################################################### | |
3 |
# Kallithea |
|
3 | ## Kallithea config file generated with kallithea-config ## | |
4 | # # |
|
4 | ## ## | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | ## The %(here)s variable will be replaced with the parent directory of this file ## | |
6 | ################################################################################ |
|
6 | ################################################################################### | |
7 | ################################################################################ |
|
7 | ################################################################################### | |
8 |
|
8 | |||
9 | [DEFAULT] |
|
9 | [DEFAULT] | |
10 |
|
10 | |||
@@ -126,7 +126,7 b' commit_parse_limit = 25' | |||||
126 | ## used, which is correct in many cases but for example not when using uwsgi. |
|
126 | ## used, which is correct in many cases but for example not when using uwsgi. | |
127 | ## If you change this setting, you should reinstall the Git hooks via |
|
127 | ## If you change this setting, you should reinstall the Git hooks via | |
128 | ## Admin > Settings > Remap and Rescan. |
|
128 | ## Admin > Settings > Remap and Rescan. | |
129 |
# |
|
129 | #git_hook_interpreter = /srv/kallithea/venv/bin/python3 | |
130 |
|
130 | |||
131 | ## path to git executable |
|
131 | ## path to git executable | |
132 | git_path = git |
|
132 | git_path = git | |
@@ -198,7 +198,7 b' issue_sub =' | |||||
198 | ## issue_pat, issue_server_link and issue_sub can have suffixes to specify |
|
198 | ## issue_pat, issue_server_link and issue_sub can have suffixes to specify | |
199 | ## multiple patterns, to other issues server, wiki or others |
|
199 | ## multiple patterns, to other issues server, wiki or others | |
200 | ## below an example how to create a wiki pattern |
|
200 | ## below an example how to create a wiki pattern | |
201 | # wiki-some-id -> https://wiki.example.com/some-id |
|
201 | ## wiki-some-id -> https://wiki.example.com/some-id | |
202 |
|
202 | |||
203 | #issue_pat_wiki = wiki-(\S+) |
|
203 | #issue_pat_wiki = wiki-(\S+) | |
204 | #issue_server_link_wiki = https://wiki.example.com/\1 |
|
204 | #issue_server_link_wiki = https://wiki.example.com/\1 | |
@@ -216,12 +216,12 b' allow_repo_location_change = True' | |||||
216 | allow_custom_hooks_settings = True |
|
216 | allow_custom_hooks_settings = True | |
217 |
|
217 | |||
218 | ## extra extensions for indexing, space separated and without the leading '.'. |
|
218 | ## extra extensions for indexing, space separated and without the leading '.'. | |
219 |
# |
|
219 | #index.extensions = | |
220 | # gemfile |
|
220 | # gemfile | |
221 | # lock |
|
221 | # lock | |
222 |
|
222 | |||
223 | ## extra filenames for indexing, space separated |
|
223 | ## extra filenames for indexing, space separated | |
224 |
# |
|
224 | #index.filenames = | |
225 | # .dockerignore |
|
225 | # .dockerignore | |
226 | # .editorconfig |
|
226 | # .editorconfig | |
227 | # INSTALL |
|
227 | # INSTALL | |
@@ -322,8 +322,8 b' session.secret = development-not-secret' | |||||
322 | ## ERROR HANDLING SYSTEMS ## |
|
322 | ## ERROR HANDLING SYSTEMS ## | |
323 | ############################ |
|
323 | ############################ | |
324 |
|
324 | |||
325 | # Propagate email settings to ErrorReporter of TurboGears2 |
|
325 | ## Propagate email settings to ErrorReporter of TurboGears2 | |
326 | # You do not normally need to change these lines |
|
326 | ## You do not normally need to change these lines | |
327 | get trace_errors.smtp_server = smtp_server |
|
327 | get trace_errors.smtp_server = smtp_server | |
328 | get trace_errors.smtp_port = smtp_port |
|
328 | get trace_errors.smtp_port = smtp_port | |
329 | get trace_errors.from_address = error_email_from |
|
329 | get trace_errors.from_address = error_email_from | |
@@ -352,10 +352,10 b' logview.pylons.util = #eee' | |||||
352 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
352 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
353 | ######################################################### |
|
353 | ######################################################### | |
354 |
|
354 | |||
355 | # SQLITE [default] |
|
355 | ## SQLITE [default] | |
356 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
356 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 | |
357 |
|
357 | |||
358 | # see sqlalchemy docs for others |
|
358 | ## see sqlalchemy docs for other backends | |
359 |
|
359 | |||
360 | sqlalchemy.pool_recycle = 3600 |
|
360 | sqlalchemy.pool_recycle = 3600 | |
361 |
|
361 | |||
@@ -387,8 +387,8 b' keys = generic, color_formatter, color_f' | |||||
387 | level = NOTSET |
|
387 | level = NOTSET | |
388 | #handlers = console |
|
388 | #handlers = console | |
389 | handlers = console_color |
|
389 | handlers = console_color | |
390 | # For coloring based on log level: |
|
390 | ## For coloring based on log level: | |
391 |
# |
|
391 | #handlers = console_color | |
392 |
|
392 | |||
393 | [logger_routes] |
|
393 | [logger_routes] | |
394 | #level = WARN |
|
394 | #level = WARN | |
@@ -431,10 +431,10 b' qualname = gearbox' | |||||
431 | level = WARN |
|
431 | level = WARN | |
432 | handlers = |
|
432 | handlers = | |
433 | qualname = sqlalchemy.engine |
|
433 | qualname = sqlalchemy.engine | |
434 | # For coloring based on log level and pretty printing of SQL: |
|
434 | ## For coloring based on log level and pretty printing of SQL: | |
435 |
# |
|
435 | #level = INFO | |
436 |
# |
|
436 | #handlers = console_color_sql | |
437 |
# |
|
437 | #propagate = 0 | |
438 |
|
438 | |||
439 | [logger_whoosh_indexer] |
|
439 | [logger_whoosh_indexer] | |
440 | #level = WARN |
|
440 | #level = WARN | |
@@ -462,13 +462,13 b' args = (sys.stderr,)' | |||||
462 | formatter = generic |
|
462 | formatter = generic | |
463 |
|
463 | |||
464 | [handler_console_color] |
|
464 | [handler_console_color] | |
465 | # ANSI color coding based on log level |
|
465 | ## ANSI color coding based on log level | |
466 | class = StreamHandler |
|
466 | class = StreamHandler | |
467 | args = (sys.stderr,) |
|
467 | args = (sys.stderr,) | |
468 | formatter = color_formatter |
|
468 | formatter = color_formatter | |
469 |
|
469 | |||
470 | [handler_console_color_sql] |
|
470 | [handler_console_color_sql] | |
471 | # ANSI color coding and pretty printing of SQL statements |
|
471 | ## ANSI color coding and pretty printing of SQL statements | |
472 | class = StreamHandler |
|
472 | class = StreamHandler | |
473 | args = (sys.stderr,) |
|
473 | args = (sys.stderr,) | |
474 | formatter = color_formatter_sql |
|
474 | formatter = color_formatter_sql | |
@@ -499,16 +499,16 b' datefmt = %Y-%m-%d %H:%M:%S' | |||||
499 | ## SSH LOGGING ## |
|
499 | ## SSH LOGGING ## | |
500 | ################# |
|
500 | ################# | |
501 |
|
501 | |||
502 | # The default loggers use 'handler_console' that uses StreamHandler with |
|
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 |
|
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. |
|
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 |
|
505 | ## By default, when running ssh-serve, just use NullHandler and disable logging | |
506 | # completely. For other logging options, see: |
|
506 | ## completely. For other logging options, see: | |
507 | # https://docs.python.org/2/library/logging.handlers.html |
|
507 | ## https://docs.python.org/2/library/logging.handlers.html | |
508 |
|
508 | |||
509 | [ssh_serve:logger_root] |
|
509 | [ssh_serve:logger_root] | |
510 | level = CRITICAL |
|
510 | level = CRITICAL | |
511 | handlers = null |
|
511 | handlers = null | |
512 |
|
512 | |||
513 | # Note: If logging is configured with other handlers, they might need similar |
|
513 | ## Note: If logging is configured with other handlers, they might need similar | |
514 | # muting for ssh-serve too. |
|
514 | ## muting for ssh-serve too. |
@@ -1,11 +1,11 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%text>################################################################################</%text> |
|
2 | <%text>###################################################################################</%text> | |
3 | <%text>################################################################################</%text> |
|
3 | <%text>###################################################################################</%text> | |
4 |
# Kallithea |
|
4 | <%text>## Kallithea config file generated with kallithea-config ##</%text> | |
5 | # # |
|
5 | <%text>## ##</%text> | |
6 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
6 | <%text>## The %(here)s variable will be replaced with the parent directory of this file ##</%text> | |
7 | <%text>################################################################################</%text> |
|
7 | <%text>###################################################################################</%text> | |
8 | <%text>################################################################################</%text> |
|
8 | <%text>###################################################################################</%text> | |
9 |
|
9 | |||
10 | [DEFAULT] |
|
10 | [DEFAULT] | |
11 |
|
11 | |||
@@ -115,11 +115,11 b' timeout = 3600' | |||||
115 | <%text>## Note: this section is parsed by the uWSGI .ini parser when run as:</%text> |
|
115 | <%text>## Note: this section is parsed by the uWSGI .ini parser when run as:</%text> | |
116 | <%text>## uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini</%text> |
|
116 | <%text>## uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini</%text> | |
117 |
|
117 | |||
118 | # HTTP Basics: |
|
118 | <%text>## HTTP Basics:</%text> | |
119 | http-socket = ${host}:${port} |
|
119 | http-socket = ${host}:${port} | |
120 | buffer-size = 65535 ; Mercurial will use huge GET headers for discovery |
|
120 | buffer-size = 65535 ; Mercurial will use huge GET headers for discovery | |
121 |
|
121 | |||
122 | # Scaling: |
|
122 | <%text>## Scaling:</%text> | |
123 | master = true ; Use separate master and worker processes |
|
123 | master = true ; Use separate master and worker processes | |
124 | auto-procname = true ; Name worker processes accordingly |
|
124 | auto-procname = true ; Name worker processes accordingly | |
125 | lazy = true ; App *must* be loaded in workers - db connections can't be shared |
|
125 | lazy = true ; App *must* be loaded in workers - db connections can't be shared | |
@@ -127,7 +127,7 b' workers = 4 ;' | |||||
127 | cheaper = 1 ; Initial and on demand scaling down to this many worker processes |
|
127 | cheaper = 1 ; Initial and on demand scaling down to this many worker processes | |
128 | max-requests = 1000 ; Graceful reload of worker processes to avoid leaks |
|
128 | max-requests = 1000 ; Graceful reload of worker processes to avoid leaks | |
129 |
|
129 | |||
130 | # Tweak defaults: |
|
130 | <%text>## Tweak defaults:</%text> | |
131 | strict = true ; Fail on unknown config directives |
|
131 | strict = true ; Fail on unknown config directives | |
132 | enable-threads = true ; Enable Python threads (not threaded workers) |
|
132 | enable-threads = true ; Enable Python threads (not threaded workers) | |
133 | vacuum = true ; Delete sockets during shutdown |
|
133 | vacuum = true ; Delete sockets during shutdown | |
@@ -185,7 +185,7 b' commit_parse_limit = 25' | |||||
185 | <%text>## used, which is correct in many cases but for example not when using uwsgi.</%text> |
|
185 | <%text>## used, which is correct in many cases but for example not when using uwsgi.</%text> | |
186 | <%text>## If you change this setting, you should reinstall the Git hooks via</%text> |
|
186 | <%text>## If you change this setting, you should reinstall the Git hooks via</%text> | |
187 | <%text>## Admin > Settings > Remap and Rescan.</%text> |
|
187 | <%text>## Admin > Settings > Remap and Rescan.</%text> | |
188 |
# |
|
188 | #git_hook_interpreter = /srv/kallithea/venv/bin/python3 | |
189 | %if git_hook_interpreter: |
|
189 | %if git_hook_interpreter: | |
190 | git_hook_interpreter = ${git_hook_interpreter} |
|
190 | git_hook_interpreter = ${git_hook_interpreter} | |
191 | %endif |
|
191 | %endif | |
@@ -260,7 +260,7 b' issue_sub =' | |||||
260 | <%text>## issue_pat, issue_server_link and issue_sub can have suffixes to specify</%text> |
|
260 | <%text>## issue_pat, issue_server_link and issue_sub can have suffixes to specify</%text> | |
261 | <%text>## multiple patterns, to other issues server, wiki or others</%text> |
|
261 | <%text>## multiple patterns, to other issues server, wiki or others</%text> | |
262 | <%text>## below an example how to create a wiki pattern</%text> |
|
262 | <%text>## below an example how to create a wiki pattern</%text> | |
263 | # wiki-some-id -> https://wiki.example.com/some-id |
|
263 | <%text>## wiki-some-id -> https://wiki.example.com/some-id</%text> | |
264 |
|
264 | |||
265 | #issue_pat_wiki = wiki-(\S+) |
|
265 | #issue_pat_wiki = wiki-(\S+) | |
266 | #issue_server_link_wiki = https://wiki.example.com/\1 |
|
266 | #issue_server_link_wiki = https://wiki.example.com/\1 | |
@@ -278,12 +278,12 b' allow_repo_location_change = True' | |||||
278 | allow_custom_hooks_settings = True |
|
278 | allow_custom_hooks_settings = True | |
279 |
|
279 | |||
280 | <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text> |
|
280 | <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text> | |
281 |
# |
|
281 | #index.extensions = | |
282 | # gemfile |
|
282 | # gemfile | |
283 | # lock |
|
283 | # lock | |
284 |
|
284 | |||
285 | <%text>## extra filenames for indexing, space separated</%text> |
|
285 | <%text>## extra filenames for indexing, space separated</%text> | |
286 |
# |
|
286 | #index.filenames = | |
287 | # .dockerignore |
|
287 | # .dockerignore | |
288 | # .editorconfig |
|
288 | # .editorconfig | |
289 | # INSTALL |
|
289 | # INSTALL | |
@@ -392,8 +392,8 b' session.secret = ${uuid()}' | |||||
392 | <%text>## ERROR HANDLING SYSTEMS ##</%text> |
|
392 | <%text>## ERROR HANDLING SYSTEMS ##</%text> | |
393 | <%text>############################</%text> |
|
393 | <%text>############################</%text> | |
394 |
|
394 | |||
395 | # Propagate email settings to ErrorReporter of TurboGears2 |
|
395 | <%text>## Propagate email settings to ErrorReporter of TurboGears2</%text> | |
396 | # You do not normally need to change these lines |
|
396 | <%text>## You do not normally need to change these lines</%text> | |
397 | get trace_errors.smtp_server = smtp_server |
|
397 | get trace_errors.smtp_server = smtp_server | |
398 | get trace_errors.smtp_port = smtp_port |
|
398 | get trace_errors.smtp_port = smtp_port | |
399 | get trace_errors.from_address = error_email_from |
|
399 | get trace_errors.from_address = error_email_from | |
@@ -498,19 +498,19 b' logview.pylons.util = #eee' | |||||
498 | <%text>#########################################################</%text> |
|
498 | <%text>#########################################################</%text> | |
499 |
|
499 | |||
500 | %if database_engine == 'sqlite': |
|
500 | %if database_engine == 'sqlite': | |
501 | # SQLITE [default] |
|
501 | <%text>## SQLITE [default]</%text> | |
502 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
502 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 | |
503 |
|
503 | |||
504 | %elif database_engine == 'postgres': |
|
504 | %elif database_engine == 'postgres': | |
505 | # POSTGRESQL |
|
505 | <%text>## POSTGRESQL</%text> | |
506 | sqlalchemy.url = postgresql://user:pass@localhost/kallithea |
|
506 | sqlalchemy.url = postgresql://user:pass@localhost/kallithea | |
507 |
|
507 | |||
508 | %elif database_engine == 'mysql': |
|
508 | %elif database_engine == 'mysql': | |
509 | # MySQL |
|
509 | <%text>## MySQL</%text> | |
510 | sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 |
|
510 | sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 | |
511 |
|
511 | |||
512 | %endif |
|
512 | %endif | |
513 | # see sqlalchemy docs for others |
|
513 | <%text>## see sqlalchemy docs for other backends</%text> | |
514 |
|
514 | |||
515 | sqlalchemy.pool_recycle = 3600 |
|
515 | sqlalchemy.pool_recycle = 3600 | |
516 |
|
516 | |||
@@ -541,8 +541,8 b' keys = generic, color_formatter, color_f' | |||||
541 | [logger_root] |
|
541 | [logger_root] | |
542 | level = NOTSET |
|
542 | level = NOTSET | |
543 | handlers = console |
|
543 | handlers = console | |
544 | # For coloring based on log level: |
|
544 | <%text>## For coloring based on log level:</%text> | |
545 |
# |
|
545 | #handlers = console_color | |
546 |
|
546 | |||
547 | [logger_routes] |
|
547 | [logger_routes] | |
548 | level = WARN |
|
548 | level = WARN | |
@@ -579,10 +579,10 b' qualname = gearbox' | |||||
579 | level = WARN |
|
579 | level = WARN | |
580 | handlers = |
|
580 | handlers = | |
581 | qualname = sqlalchemy.engine |
|
581 | qualname = sqlalchemy.engine | |
582 | # For coloring based on log level and pretty printing of SQL: |
|
582 | <%text>## For coloring based on log level and pretty printing of SQL:</%text> | |
583 |
# |
|
583 | #level = INFO | |
584 |
# |
|
584 | #handlers = console_color_sql | |
585 |
# |
|
585 | #propagate = 0 | |
586 |
|
586 | |||
587 | [logger_whoosh_indexer] |
|
587 | [logger_whoosh_indexer] | |
588 | level = WARN |
|
588 | level = WARN | |
@@ -609,13 +609,13 b' args = (sys.stderr,)' | |||||
609 | formatter = generic |
|
609 | formatter = generic | |
610 |
|
610 | |||
611 | [handler_console_color] |
|
611 | [handler_console_color] | |
612 | # ANSI color coding based on log level |
|
612 | <%text>## ANSI color coding based on log level</%text> | |
613 | class = StreamHandler |
|
613 | class = StreamHandler | |
614 | args = (sys.stderr,) |
|
614 | args = (sys.stderr,) | |
615 | formatter = color_formatter |
|
615 | formatter = color_formatter | |
616 |
|
616 | |||
617 | [handler_console_color_sql] |
|
617 | [handler_console_color_sql] | |
618 | # ANSI color coding and pretty printing of SQL statements |
|
618 | <%text>## ANSI color coding and pretty printing of SQL statements</%text> | |
619 | class = StreamHandler |
|
619 | class = StreamHandler | |
620 | args = (sys.stderr,) |
|
620 | args = (sys.stderr,) | |
621 | formatter = color_formatter_sql |
|
621 | formatter = color_formatter_sql | |
@@ -646,16 +646,16 b' datefmt = %Y-%m-%d %H:%M:%S' | |||||
646 | <%text>## SSH LOGGING ##</%text> |
|
646 | <%text>## SSH LOGGING ##</%text> | |
647 | <%text>#################</%text> |
|
647 | <%text>#################</%text> | |
648 |
|
648 | |||
649 | # The default loggers use 'handler_console' that uses StreamHandler with |
|
649 | <%text>## The default loggers use 'handler_console' that uses StreamHandler with</%text> | |
650 | # destination 'sys.stderr'. In the context of the SSH server process, these log |
|
650 | <%text>## destination 'sys.stderr'. In the context of the SSH server process, these log</%text> | |
651 | # messages would be sent to the client, which is normally not what you want. |
|
651 | <%text>## messages would be sent to the client, which is normally not what you want.</%text> | |
652 | # By default, when running ssh-serve, just use NullHandler and disable logging |
|
652 | <%text>## By default, when running ssh-serve, just use NullHandler and disable logging</%text> | |
653 | # completely. For other logging options, see: |
|
653 | <%text>## completely. For other logging options, see:</%text> | |
654 | # https://docs.python.org/2/library/logging.handlers.html |
|
654 | <%text>## https://docs.python.org/2/library/logging.handlers.html</%text> | |
655 |
|
655 | |||
656 | [ssh_serve:logger_root] |
|
656 | [ssh_serve:logger_root] | |
657 | level = CRITICAL |
|
657 | level = CRITICAL | |
658 | handlers = null |
|
658 | handlers = null | |
659 |
|
659 | |||
660 | # Note: If logging is configured with other handlers, they might need similar |
|
660 | <%text>## Note: If logging is configured with other handlers, they might need similar</%text> | |
661 | # muting for ssh-serve too. |
|
661 | <%text>## muting for ssh-serve too.</%text> |
@@ -60,6 +60,13 b' def main():' | |||||
60 | print('writing:', makofile) |
|
60 | print('writing:', makofile) | |
61 | open(makofile, 'w').write(mako_marked_up) |
|
61 | open(makofile, 'w').write(mako_marked_up) | |
62 |
|
62 | |||
|
63 | lines = re.findall(r'\n(# [^ ].*)', mako_marked_up) | |||
|
64 | if lines: | |||
|
65 | print('ERROR: the template .ini file convention is to use "## Foo Bar" for text comments and "#foo = bar" for disabled settings') | |||
|
66 | for line in lines: | |||
|
67 | print(line) | |||
|
68 | raise SystemExit(1) | |||
|
69 | ||||
63 | # create ini files |
|
70 | # create ini files | |
64 | for fn, settings in ini_files: |
|
71 | for fn, settings in ini_files: | |
65 | print('updating:', fn) |
|
72 | print('updating:', fn) |
General Comments 0
You need to be logged in to leave comments.
Login now