Show More
@@ -1,519 +1,519 b'' | |||||
1 | ################################################################################### |
|
1 | ################################################################################### | |
2 | ################################################################################### |
|
2 | ################################################################################### | |
3 | ## Kallithea config file generated with kallithea-config ## |
|
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 | |||
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Email settings ## |
|
12 | ## Email settings ## | |
13 | ## ## |
|
13 | ## ## | |
14 | ## Refer to the documentation ("Email settings") for more details. ## |
|
14 | ## Refer to the documentation ("Email settings") for more details. ## | |
15 | ## ## |
|
15 | ## ## | |
16 | ## It is recommended to use a valid sender address that passes access ## |
|
16 | ## It is recommended to use a valid sender address that passes access ## | |
17 | ## validation and spam filtering in mail servers. ## |
|
17 | ## validation and spam filtering in mail servers. ## | |
18 | ################################################################################ |
|
18 | ################################################################################ | |
19 |
|
19 | |||
20 | ## 'From' header for application emails. You can optionally add a name. |
|
20 | ## 'From' header for application emails. You can optionally add a name. | |
21 | ## Default: |
|
21 | ## Default: | |
22 | #app_email_from = Kallithea |
|
22 | #app_email_from = Kallithea | |
23 | ## Examples: |
|
23 | ## Examples: | |
24 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
24 | #app_email_from = Kallithea <kallithea-noreply@example.com> | |
25 | #app_email_from = kallithea-noreply@example.com |
|
25 | #app_email_from = kallithea-noreply@example.com | |
26 |
|
26 | |||
27 | ## Subject prefix for application emails. |
|
27 | ## Subject prefix for application emails. | |
28 | ## A space between this prefix and the real subject is automatically added. |
|
28 | ## A space between this prefix and the real subject is automatically added. | |
29 | ## Default: |
|
29 | ## Default: | |
30 | #email_prefix = |
|
30 | #email_prefix = | |
31 | ## Example: |
|
31 | ## Example: | |
32 | #email_prefix = [Kallithea] |
|
32 | #email_prefix = [Kallithea] | |
33 |
|
33 | |||
34 | ## Recipients for error emails and fallback recipients of application mails. |
|
34 | ## Recipients for error emails and fallback recipients of application mails. | |
35 | ## Multiple addresses can be specified, comma-separated. |
|
35 | ## Multiple addresses can be specified, comma-separated. | |
36 | ## Only addresses are allowed, do not add any name part. |
|
36 | ## Only addresses are allowed, do not add any name part. | |
37 | ## Default: |
|
37 | ## Default: | |
38 | #email_to = |
|
38 | #email_to = | |
39 | ## Examples: |
|
39 | ## Examples: | |
40 | #email_to = admin@example.com |
|
40 | #email_to = admin@example.com | |
41 | #email_to = admin@example.com,another_admin@example.com |
|
41 | #email_to = admin@example.com,another_admin@example.com | |
42 | email_to = |
|
42 | email_to = | |
43 |
|
43 | |||
44 | ## 'From' header for error emails. You can optionally add a name. |
|
44 | ## 'From' header for error emails. You can optionally add a name. | |
45 | ## Default: (none) |
|
45 | ## Default: (none) | |
46 | ## Examples: |
|
46 | ## Examples: | |
47 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
47 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> | |
48 | #error_email_from = kallithea_errors@example.com |
|
48 | #error_email_from = kallithea_errors@example.com | |
49 | error_email_from = |
|
49 | error_email_from = | |
50 |
|
50 | |||
51 | ## SMTP server settings |
|
51 | ## SMTP server settings | |
52 | ## If specifying credentials, make sure to use secure connections. |
|
52 | ## If specifying credentials, make sure to use secure connections. | |
53 | ## Default: Send unencrypted unauthenticated mails to the specified smtp_server. |
|
53 | ## Default: Send unencrypted unauthenticated mails to the specified smtp_server. | |
54 | ## For "SSL", use smtp_use_ssl = true and smtp_port = 465. |
|
54 | ## For "SSL", use smtp_use_ssl = true and smtp_port = 465. | |
55 | ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587. |
|
55 | ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587. | |
56 | smtp_server = |
|
56 | smtp_server = | |
57 | smtp_username = |
|
57 | smtp_username = | |
58 | smtp_password = |
|
58 | smtp_password = | |
59 | smtp_port = |
|
59 | smtp_port = | |
60 | smtp_use_ssl = false |
|
60 | smtp_use_ssl = false | |
61 | smtp_use_tls = false |
|
61 | smtp_use_tls = false | |
62 |
|
62 | |||
63 | ## Entry point for 'gearbox serve' |
|
63 | ## Entry point for 'gearbox serve' | |
64 | [server:main] |
|
64 | [server:main] | |
65 | #host = 127.0.0.1 |
|
65 | #host = 127.0.0.1 | |
66 | host = 0.0.0.0 |
|
66 | host = 0.0.0.0 | |
67 | port = 5000 |
|
67 | port = 5000 | |
68 |
|
68 | |||
69 | ## WAITRESS ## |
|
69 | ## WAITRESS ## | |
70 | use = egg:waitress#main |
|
70 | use = egg:waitress#main | |
71 | ## number of worker threads |
|
71 | ## number of worker threads | |
72 | threads = 1 |
|
72 | threads = 1 | |
73 | ## MAX BODY SIZE 100GB |
|
73 | ## MAX BODY SIZE 100GB | |
74 | max_request_body_size = 107374182400 |
|
74 | max_request_body_size = 107374182400 | |
75 | ## use poll instead of select, fixes fd limits, may not work on old |
|
75 | ## use poll instead of select, fixes fd limits, may not work on old | |
76 | ## windows systems. |
|
76 | ## windows systems. | |
77 | #asyncore_use_poll = True |
|
77 | #asyncore_use_poll = True | |
78 |
|
78 | |||
79 | ## middleware for hosting the WSGI application under a URL prefix |
|
79 | ## middleware for hosting the WSGI application under a URL prefix | |
80 | #[filter:proxy-prefix] |
|
80 | #[filter:proxy-prefix] | |
81 | #use = egg:PasteDeploy#prefix |
|
81 | #use = egg:PasteDeploy#prefix | |
82 | #prefix = /<your-prefix> |
|
82 | #prefix = /<your-prefix> | |
83 |
|
83 | |||
84 | [app:main] |
|
84 | [app:main] | |
85 | use = egg:kallithea |
|
85 | use = egg:kallithea | |
86 | ## enable proxy prefix middleware |
|
86 | ## enable proxy prefix middleware | |
87 | #filter-with = proxy-prefix |
|
87 | #filter-with = proxy-prefix | |
88 |
|
88 | |||
89 | full_stack = true |
|
89 | full_stack = true | |
90 | static_files = true |
|
90 | static_files = true | |
91 |
|
91 | |||
92 | ## Internationalization (see setup documentation for details) |
|
92 | ## Internationalization (see setup documentation for details) | |
93 | ## By default, the languages requested by the browser are used if available, with English as default. |
|
93 | ## By default, the languages requested by the browser are used if available, with English as default. | |
94 | ## Set i18n.enabled=false to disable automatic language choice. |
|
94 | ## Set i18n.enabled=false to disable automatic language choice. | |
95 | #i18n.enabled = true |
|
95 | #i18n.enabled = true | |
96 | ## To Force a language, set i18n.enabled=false and specify the language in i18n.lang. |
|
96 | ## To Force a language, set i18n.enabled=false and specify the language in i18n.lang. | |
97 | ## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo |
|
97 | ## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo | |
98 | #i18n.lang = en |
|
98 | #i18n.lang = en | |
99 |
|
99 | |||
100 | cache_dir = %(here)s/data |
|
100 | cache_dir = %(here)s/data | |
101 | index_dir = %(here)s/data/index |
|
101 | index_dir = %(here)s/data/index | |
102 |
|
102 | |||
103 | ## uncomment and set this path to use archive download cache |
|
103 | ## uncomment and set this path to use archive download cache | |
104 | archive_cache_dir = %(here)s/tarballcache |
|
104 | archive_cache_dir = %(here)s/tarballcache | |
105 |
|
105 | |||
106 | ## change this to unique ID for security |
|
106 | ## change this to unique ID for security | |
107 | #app_instance_uuid = VERY-SECRET |
|
107 | #app_instance_uuid = VERY-SECRET | |
108 | app_instance_uuid = development-not-secret |
|
108 | app_instance_uuid = development-not-secret | |
109 |
|
109 | |||
110 | ## cut off limit for large diffs (size in bytes) |
|
110 | ## cut off limit for large diffs (size in bytes) | |
111 | cut_off_limit = 256000 |
|
111 | cut_off_limit = 256000 | |
112 |
|
112 | |||
113 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
113 | ## force https in Kallithea, fixes https redirects, assumes it's always https | |
114 | force_https = false |
|
114 | force_https = false | |
115 |
|
115 | |||
116 | ## use Strict-Transport-Security headers |
|
116 | ## use Strict-Transport-Security headers | |
117 | use_htsts = false |
|
117 | use_htsts = false | |
118 |
|
118 | |||
119 | ## number of commits stats will parse on each iteration |
|
119 | ## number of commits stats will parse on each iteration | |
120 | commit_parse_limit = 25 |
|
120 | commit_parse_limit = 25 | |
121 |
|
121 | |||
122 | ## Path to Python executable to be used for git hooks. |
|
122 | ## Path to Python executable to be used for git hooks. | |
123 | ## This value will be written inside the git hook scripts as the text |
|
123 | ## This value will be written inside the git hook scripts as the text | |
124 | ## after '#!' (shebang). When empty or not defined, the value of |
|
124 | ## after '#!' (shebang). When empty or not defined, the value of | |
125 | ## 'sys.executable' at the time of installation of the git hooks is |
|
125 | ## 'sys.executable' at the time of installation of the git hooks is | |
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 | #git_hook_interpreter = /srv/kallithea/venv/bin/python3 |
|
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 | |
133 |
|
133 | |||
134 | ## git rev filter option, --all is the default filter, if you need to |
|
134 | ## git rev filter option, --all is the default filter, if you need to | |
135 | ## hide all refs in changelog switch this to --branches --tags |
|
135 | ## hide all refs in changelog switch this to --branches --tags | |
136 | #git_rev_filter = --branches --tags |
|
136 | #git_rev_filter = --branches --tags | |
137 |
|
137 | |||
138 | ## RSS feed options |
|
138 | ## RSS feed options | |
139 | rss_cut_off_limit = 256000 |
|
139 | rss_cut_off_limit = 256000 | |
140 | rss_items_per_page = 10 |
|
140 | rss_items_per_page = 10 | |
141 | rss_include_diff = false |
|
141 | rss_include_diff = false | |
142 |
|
142 | |||
143 | ## options for showing and identifying changesets |
|
143 | ## options for showing and identifying changesets | |
144 | show_sha_length = 12 |
|
144 | show_sha_length = 12 | |
145 | show_revision_number = false |
|
145 | show_revision_number = false | |
146 |
|
146 | |||
147 | ## Canonical URL to use when creating full URLs in UI and texts. |
|
147 | ## Canonical URL to use when creating full URLs in UI and texts. | |
148 | ## Useful when the site is available under different names or protocols. |
|
148 | ## Useful when the site is available under different names or protocols. | |
149 | ## Defaults to what is provided in the WSGI environment. |
|
149 | ## Defaults to what is provided in the WSGI environment. | |
150 | #canonical_url = https://kallithea.example.com/repos |
|
150 | #canonical_url = https://kallithea.example.com/repos | |
151 |
|
151 | |||
152 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
152 | ## gist URL alias, used to create nicer urls for gist. This should be an | |
153 | ## url that does rewrites to _admin/gists/<gistid>. |
|
153 | ## url that does rewrites to _admin/gists/<gistid>. | |
154 | ## example: http://gist.example.com/{gistid}. Empty means use the internal |
|
154 | ## example: http://gist.example.com/{gistid}. Empty means use the internal | |
155 | ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid> |
|
155 | ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid> | |
156 | gist_alias_url = |
|
156 | gist_alias_url = | |
157 |
|
157 | |||
158 | ## default encoding used to convert from and to unicode |
|
158 | ## default encoding used to convert from and to unicode | |
159 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
159 | ## can be also a comma separated list of encoding in case of mixed encodings | |
160 | default_encoding = utf-8 |
|
160 | default_encoding = utf-8 | |
161 |
|
161 | |||
162 | ## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea |
|
162 | ## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea | |
163 | hgencoding = utf-8 |
|
163 | hgencoding = utf-8 | |
164 |
|
164 | |||
165 | ## issue tracker for Kallithea (leave blank to disable, absent for default) |
|
165 | ## issue tracker for Kallithea (leave blank to disable, absent for default) | |
166 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
166 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues | |
167 |
|
167 | |||
168 | ## issue tracking mapping for commit messages, comments, PR descriptions, ... |
|
168 | ## issue tracking mapping for commit messages, comments, PR descriptions, ... | |
169 | ## Refer to the documentation ("Integration with issue trackers") for more details. |
|
169 | ## Refer to the documentation ("Integration with issue trackers") for more details. | |
170 |
|
170 | |||
171 | ## regular expression to match issue references |
|
171 | ## regular expression to match issue references | |
172 | ## This pattern may/should contain parenthesized groups, that can |
|
172 | ## This pattern may/should contain parenthesized groups, that can | |
173 | ## be referred to in issue_server_link or issue_sub using Python backreferences |
|
173 | ## be referred to in issue_server_link or issue_sub using Python backreferences | |
174 | ## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'. |
|
174 | ## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'. | |
175 | ## To require mandatory whitespace before the issue pattern, use: |
|
175 | ## To require mandatory whitespace before the issue pattern, use: | |
176 | ## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace |
|
176 | ## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace | |
177 | ## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern. |
|
177 | ## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern. | |
178 |
|
178 | |||
179 | issue_pat = #(\d+) |
|
179 | issue_pat = #(\d+) | |
180 |
|
180 | |||
181 | ## server url to the issue |
|
181 | ## server url to the issue | |
182 | ## This pattern may/should contain backreferences to parenthesized groups in issue_pat. |
|
182 | ## This pattern may/should contain backreferences to parenthesized groups in issue_pat. | |
183 | ## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group |
|
183 | ## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group | |
184 | ## called 'groupname' in issue_pat. |
|
184 | ## called 'groupname' in issue_pat. | |
185 | ## The special token {repo} is replaced with the full repository name |
|
185 | ## The special token {repo} is replaced with the full repository name | |
186 | ## including repository groups, while {repo_name} is replaced with just |
|
186 | ## including repository groups, while {repo_name} is replaced with just | |
187 | ## the name of the repository. |
|
187 | ## the name of the repository. | |
188 |
|
188 | |||
189 | issue_server_link = https://issues.example.com/{repo}/issue/\1 |
|
189 | issue_server_link = https://issues.example.com/{repo}/issue/\1 | |
190 |
|
190 | |||
191 | ## substitution pattern to use as the link text |
|
191 | ## substitution pattern to use as the link text | |
192 | ## If issue_sub is empty, the text matched by issue_pat is retained verbatim |
|
192 | ## If issue_sub is empty, the text matched by issue_pat is retained verbatim | |
193 | ## for the link text. Otherwise, the link text is that of issue_sub, with any |
|
193 | ## for the link text. Otherwise, the link text is that of issue_sub, with any | |
194 | ## backreferences to groups in issue_pat replaced. |
|
194 | ## backreferences to groups in issue_pat replaced. | |
195 |
|
195 | |||
196 | issue_sub = |
|
196 | issue_sub = | |
197 |
|
197 | |||
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 | |
205 | #issue_sub_wiki = WIKI-\1 |
|
205 | #issue_sub_wiki = WIKI-\1 | |
206 |
|
206 | |||
207 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
207 | ## alternative return HTTP header for failed authentication. Default HTTP | |
208 | ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with |
|
208 | ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with | |
209 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
209 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
210 | auth_ret_code = |
|
210 | auth_ret_code = | |
211 |
|
211 | |||
212 | ## allows to change the repository location in settings page |
|
212 | ## allows to change the repository location in settings page | |
213 | allow_repo_location_change = True |
|
213 | allow_repo_location_change = True | |
214 |
|
214 | |||
215 | ## allows to setup custom hooks in settings page |
|
215 | ## allows to setup custom hooks in settings page | |
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 | #index.extensions = |
|
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 | #index.filenames = |
|
224 | #index.filenames = | |
225 | # .dockerignore |
|
225 | # .dockerignore | |
226 | # .editorconfig |
|
226 | # .editorconfig | |
227 | # INSTALL |
|
227 | # INSTALL | |
228 | # CHANGELOG |
|
228 | # CHANGELOG | |
229 |
|
229 | |||
230 | #################################### |
|
230 | #################################### | |
231 |
## |
|
231 | ## SSH CONFIG ## | |
232 | #################################### |
|
232 | #################################### | |
233 |
|
233 | |||
234 | ## SSH is disabled by default, until an Administrator decides to enable it. |
|
234 | ## SSH is disabled by default, until an Administrator decides to enable it. | |
235 | ssh_enabled = false |
|
235 | ssh_enabled = false | |
236 |
|
236 | |||
237 | ## File where users' SSH keys will be stored *if* ssh_enabled is true. |
|
237 | ## File where users' SSH keys will be stored *if* ssh_enabled is true. | |
238 | #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys |
|
238 | #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys | |
239 |
|
239 | |||
240 | ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. |
|
240 | ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. | |
241 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli |
|
241 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli | |
242 |
|
242 | |||
243 | ## Locale to be used in the ssh-serve command. |
|
243 | ## Locale to be used in the ssh-serve command. | |
244 | ## This is needed because an SSH client may try to use its own locale |
|
244 | ## This is needed because an SSH client may try to use its own locale | |
245 | ## settings, which may not be available on the server. |
|
245 | ## settings, which may not be available on the server. | |
246 | ## See `locale -a` for valid values on this system. |
|
246 | ## See `locale -a` for valid values on this system. | |
247 | #ssh_locale = C.UTF-8 |
|
247 | #ssh_locale = C.UTF-8 | |
248 |
|
248 | |||
249 | #################################### |
|
249 | #################################### | |
250 |
## |
|
250 | ## CELERY CONFIG ## | |
251 | #################################### |
|
251 | #################################### | |
252 |
|
252 | |||
253 | ## Note: Celery doesn't support Windows. |
|
253 | ## Note: Celery doesn't support Windows. | |
254 | use_celery = false |
|
254 | use_celery = false | |
255 |
|
255 | |||
256 | ## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'. |
|
256 | ## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'. | |
257 |
|
257 | |||
258 | ## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea': |
|
258 | ## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea': | |
259 | celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost |
|
259 | celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost | |
260 |
|
260 | |||
261 | celery.result.backend = db+sqlite:///celery-results.db |
|
261 | celery.result.backend = db+sqlite:///celery-results.db | |
262 |
|
262 | |||
263 | #celery.amqp.task.result.expires = 18000 |
|
263 | #celery.amqp.task.result.expires = 18000 | |
264 |
|
264 | |||
265 | celery.worker_concurrency = 2 |
|
265 | celery.worker_concurrency = 2 | |
266 | celery.worker_max_tasks_per_child = 1 |
|
266 | celery.worker_max_tasks_per_child = 1 | |
267 |
|
267 | |||
268 | ## If true, tasks will never be sent to the queue, but executed locally instead. |
|
268 | ## If true, tasks will never be sent to the queue, but executed locally instead. | |
269 | celery.task_always_eager = false |
|
269 | celery.task_always_eager = false | |
270 |
|
270 | |||
271 | #################################### |
|
271 | #################################### | |
272 |
## |
|
272 | ## BEAKER CACHE ## | |
273 | #################################### |
|
273 | #################################### | |
274 |
|
274 | |||
275 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
275 | beaker.cache.data_dir = %(here)s/data/cache/data | |
276 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
276 | beaker.cache.lock_dir = %(here)s/data/cache/lock | |
277 |
|
277 | |||
278 | beaker.cache.regions = long_term,long_term_file |
|
278 | beaker.cache.regions = long_term,long_term_file | |
279 |
|
279 | |||
280 | beaker.cache.long_term.type = memory |
|
280 | beaker.cache.long_term.type = memory | |
281 | beaker.cache.long_term.expire = 36000 |
|
281 | beaker.cache.long_term.expire = 36000 | |
282 | beaker.cache.long_term.key_length = 256 |
|
282 | beaker.cache.long_term.key_length = 256 | |
283 |
|
283 | |||
284 | beaker.cache.long_term_file.type = file |
|
284 | beaker.cache.long_term_file.type = file | |
285 | beaker.cache.long_term_file.expire = 604800 |
|
285 | beaker.cache.long_term_file.expire = 604800 | |
286 | beaker.cache.long_term_file.key_length = 256 |
|
286 | beaker.cache.long_term_file.key_length = 256 | |
287 |
|
287 | |||
288 | #################################### |
|
288 | #################################### | |
289 |
## |
|
289 | ## BEAKER SESSION ## | |
290 | #################################### |
|
290 | #################################### | |
291 |
|
291 | |||
292 | ## Name of session cookie. Should be unique for a given host and path, even when running |
|
292 | ## Name of session cookie. Should be unique for a given host and path, even when running | |
293 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
293 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. | |
294 | session.key = kallithea |
|
294 | session.key = kallithea | |
295 | ## Sessions should always only be accessible by the browser, not directly by JavaScript. |
|
295 | ## Sessions should always only be accessible by the browser, not directly by JavaScript. | |
296 | session.httponly = true |
|
296 | session.httponly = true | |
297 | ## Session lifetime. 2592000 seconds is 30 days. |
|
297 | ## Session lifetime. 2592000 seconds is 30 days. | |
298 | session.timeout = 2592000 |
|
298 | session.timeout = 2592000 | |
299 |
|
299 | |||
300 | ## Server secret used with HMAC to ensure integrity of cookies. |
|
300 | ## Server secret used with HMAC to ensure integrity of cookies. | |
301 | #session.secret = VERY-SECRET |
|
301 | #session.secret = VERY-SECRET | |
302 | session.secret = development-not-secret |
|
302 | session.secret = development-not-secret | |
303 | ## Further, encrypt the data with AES. |
|
303 | ## Further, encrypt the data with AES. | |
304 | #session.encrypt_key = <key_for_encryption> |
|
304 | #session.encrypt_key = <key_for_encryption> | |
305 | #session.validate_key = <validation_key> |
|
305 | #session.validate_key = <validation_key> | |
306 |
|
306 | |||
307 | ## Type of storage used for the session, current types are |
|
307 | ## Type of storage used for the session, current types are | |
308 | ## dbm, file, memcached, database, and memory. |
|
308 | ## dbm, file, memcached, database, and memory. | |
309 |
|
309 | |||
310 | ## File system storage of session data. (default) |
|
310 | ## File system storage of session data. (default) | |
311 | #session.type = file |
|
311 | #session.type = file | |
312 |
|
312 | |||
313 | ## Cookie only, store all session data inside the cookie. Requires secure secrets. |
|
313 | ## Cookie only, store all session data inside the cookie. Requires secure secrets. | |
314 | #session.type = cookie |
|
314 | #session.type = cookie | |
315 |
|
315 | |||
316 | ## Database storage of session data. |
|
316 | ## Database storage of session data. | |
317 | #session.type = ext:database |
|
317 | #session.type = ext:database | |
318 | #session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
318 | #session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
319 | #session.table_name = db_session |
|
319 | #session.table_name = db_session | |
320 |
|
320 | |||
321 | #################################### |
|
321 | #################################### | |
322 |
## |
|
322 | ## ERROR HANDLING ## | |
323 | #################################### |
|
323 | #################################### | |
324 |
|
324 | |||
325 | ## Show a nice error page for application HTTP errors and exceptions (default true) |
|
325 | ## Show a nice error page for application HTTP errors and exceptions (default true) | |
326 | #errorpage.enabled = true |
|
326 | #errorpage.enabled = true | |
327 |
|
327 | |||
328 | ## Enable Backlash client-side interactive debugger (default false) |
|
328 | ## Enable Backlash client-side interactive debugger (default false) | |
329 | ## WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!* |
|
329 | ## WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!* | |
330 | ## This debug mode will allow all visitors to execute malicious code. |
|
330 | ## This debug mode will allow all visitors to execute malicious code. | |
331 | #debug = false |
|
331 | #debug = false | |
332 | debug = true |
|
332 | debug = true | |
333 |
|
333 | |||
334 | ## Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true) |
|
334 | ## Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true) | |
335 | #trace_errors.enable = true |
|
335 | #trace_errors.enable = true | |
336 | ## Errors will be reported by mail if trace_errors.error_email is set. |
|
336 | ## Errors will be reported by mail if trace_errors.error_email is set. | |
337 |
|
337 | |||
338 | ## Propagate email settings to ErrorReporter of TurboGears2 |
|
338 | ## Propagate email settings to ErrorReporter of TurboGears2 | |
339 | ## You do not normally need to change these lines |
|
339 | ## You do not normally need to change these lines | |
340 | get trace_errors.smtp_server = smtp_server |
|
340 | get trace_errors.smtp_server = smtp_server | |
341 | get trace_errors.smtp_port = smtp_port |
|
341 | get trace_errors.smtp_port = smtp_port | |
342 | get trace_errors.from_address = error_email_from |
|
342 | get trace_errors.from_address = error_email_from | |
343 | get trace_errors.error_email = email_to |
|
343 | get trace_errors.error_email = email_to | |
344 | get trace_errors.smtp_username = smtp_username |
|
344 | get trace_errors.smtp_username = smtp_username | |
345 | get trace_errors.smtp_password = smtp_password |
|
345 | get trace_errors.smtp_password = smtp_password | |
346 | get trace_errors.smtp_use_tls = smtp_use_tls |
|
346 | get trace_errors.smtp_use_tls = smtp_use_tls | |
347 |
|
347 | |||
348 |
|
348 | |||
349 | ################################## |
|
349 | ################################## | |
350 |
## |
|
350 | ## LOGVIEW CONFIG ## | |
351 | ################################## |
|
351 | ################################## | |
352 |
|
352 | |||
353 | logview.sqlalchemy = #faa |
|
353 | logview.sqlalchemy = #faa | |
354 | logview.pylons.templating = #bfb |
|
354 | logview.pylons.templating = #bfb | |
355 | logview.pylons.util = #eee |
|
355 | logview.pylons.util = #eee | |
356 |
|
356 | |||
357 |
######################### |
|
357 | ######################### | |
358 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
358 | ## DB CONFIG ## | |
359 |
######################### |
|
359 | ######################### | |
360 |
|
360 | |||
361 | ## SQLITE [default] |
|
361 | ## SQLITE [default] | |
362 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
362 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 | |
363 |
|
363 | |||
364 | ## see sqlalchemy docs for other backends |
|
364 | ## see sqlalchemy docs for other backends | |
365 |
|
365 | |||
366 | sqlalchemy.pool_recycle = 3600 |
|
366 | sqlalchemy.pool_recycle = 3600 | |
367 |
|
367 | |||
368 | ################################ |
|
368 | ################################ | |
369 |
## |
|
369 | ## ALEMBIC CONFIGURATION ## | |
370 | ################################ |
|
370 | ################################ | |
371 |
|
371 | |||
372 | [alembic] |
|
372 | [alembic] | |
373 | script_location = kallithea:alembic |
|
373 | script_location = kallithea:alembic | |
374 |
|
374 | |||
375 | ################################ |
|
375 | ################################ | |
376 |
## |
|
376 | ## LOGGING CONFIGURATION ## | |
377 | ################################ |
|
377 | ################################ | |
378 |
|
378 | |||
379 | [loggers] |
|
379 | [loggers] | |
380 | keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash |
|
380 | keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash | |
381 |
|
381 | |||
382 | [handlers] |
|
382 | [handlers] | |
383 | keys = console, console_color, console_color_sql, null |
|
383 | keys = console, console_color, console_color_sql, null | |
384 |
|
384 | |||
385 | [formatters] |
|
385 | [formatters] | |
386 | keys = generic, color_formatter, color_formatter_sql |
|
386 | keys = generic, color_formatter, color_formatter_sql | |
387 |
|
387 | |||
388 | ############# |
|
388 | ############# | |
389 | ## LOGGERS ## |
|
389 | ## LOGGERS ## | |
390 | ############# |
|
390 | ############# | |
391 |
|
391 | |||
392 | [logger_root] |
|
392 | [logger_root] | |
393 | level = NOTSET |
|
393 | level = NOTSET | |
394 | #handlers = console |
|
394 | #handlers = console | |
395 | ## For coloring based on log level: |
|
395 | ## For coloring based on log level: | |
396 | handlers = console_color |
|
396 | handlers = console_color | |
397 |
|
397 | |||
398 | [logger_routes] |
|
398 | [logger_routes] | |
399 | #level = WARN |
|
399 | #level = WARN | |
400 | level = DEBUG |
|
400 | level = DEBUG | |
401 | handlers = |
|
401 | handlers = | |
402 | qualname = routes.middleware |
|
402 | qualname = routes.middleware | |
403 | ## "level = DEBUG" logs the route matched and routing variables. |
|
403 | ## "level = DEBUG" logs the route matched and routing variables. | |
404 |
|
404 | |||
405 | [logger_beaker] |
|
405 | [logger_beaker] | |
406 | #level = WARN |
|
406 | #level = WARN | |
407 | level = DEBUG |
|
407 | level = DEBUG | |
408 | handlers = |
|
408 | handlers = | |
409 | qualname = beaker.container |
|
409 | qualname = beaker.container | |
410 |
|
410 | |||
411 | [logger_templates] |
|
411 | [logger_templates] | |
412 | #level = WARN |
|
412 | #level = WARN | |
413 | level = INFO |
|
413 | level = INFO | |
414 | handlers = |
|
414 | handlers = | |
415 | qualname = pylons.templating |
|
415 | qualname = pylons.templating | |
416 |
|
416 | |||
417 | [logger_kallithea] |
|
417 | [logger_kallithea] | |
418 | #level = WARN |
|
418 | #level = WARN | |
419 | level = DEBUG |
|
419 | level = DEBUG | |
420 | handlers = |
|
420 | handlers = | |
421 | qualname = kallithea |
|
421 | qualname = kallithea | |
422 |
|
422 | |||
423 | [logger_tg] |
|
423 | [logger_tg] | |
424 | #level = WARN |
|
424 | #level = WARN | |
425 | level = DEBUG |
|
425 | level = DEBUG | |
426 | handlers = |
|
426 | handlers = | |
427 | qualname = tg |
|
427 | qualname = tg | |
428 |
|
428 | |||
429 | [logger_gearbox] |
|
429 | [logger_gearbox] | |
430 | #level = WARN |
|
430 | #level = WARN | |
431 | level = DEBUG |
|
431 | level = DEBUG | |
432 | handlers = |
|
432 | handlers = | |
433 | qualname = gearbox |
|
433 | qualname = gearbox | |
434 |
|
434 | |||
435 | [logger_sqlalchemy] |
|
435 | [logger_sqlalchemy] | |
436 | level = WARN |
|
436 | level = WARN | |
437 | handlers = |
|
437 | handlers = | |
438 | qualname = sqlalchemy.engine |
|
438 | qualname = sqlalchemy.engine | |
439 | ## For coloring based on log level and pretty printing of SQL: |
|
439 | ## For coloring based on log level and pretty printing of SQL: | |
440 | #level = INFO |
|
440 | #level = INFO | |
441 | #handlers = console_color_sql |
|
441 | #handlers = console_color_sql | |
442 | #propagate = 0 |
|
442 | #propagate = 0 | |
443 |
|
443 | |||
444 | [logger_whoosh_indexer] |
|
444 | [logger_whoosh_indexer] | |
445 | #level = WARN |
|
445 | #level = WARN | |
446 | level = DEBUG |
|
446 | level = DEBUG | |
447 | handlers = |
|
447 | handlers = | |
448 | qualname = whoosh_indexer |
|
448 | qualname = whoosh_indexer | |
449 |
|
449 | |||
450 | [logger_werkzeug] |
|
450 | [logger_werkzeug] | |
451 | level = WARN |
|
451 | level = WARN | |
452 | handlers = |
|
452 | handlers = | |
453 | qualname = werkzeug |
|
453 | qualname = werkzeug | |
454 |
|
454 | |||
455 | [logger_backlash] |
|
455 | [logger_backlash] | |
456 | level = WARN |
|
456 | level = WARN | |
457 | handlers = |
|
457 | handlers = | |
458 | qualname = backlash |
|
458 | qualname = backlash | |
459 |
|
459 | |||
460 | ############## |
|
460 | ############## | |
461 | ## HANDLERS ## |
|
461 | ## HANDLERS ## | |
462 | ############## |
|
462 | ############## | |
463 |
|
463 | |||
464 | [handler_console] |
|
464 | [handler_console] | |
465 | class = StreamHandler |
|
465 | class = StreamHandler | |
466 | args = (sys.stderr,) |
|
466 | args = (sys.stderr,) | |
467 | formatter = generic |
|
467 | formatter = generic | |
468 |
|
468 | |||
469 | [handler_console_color] |
|
469 | [handler_console_color] | |
470 | ## ANSI color coding based on log level |
|
470 | ## ANSI color coding based on log level | |
471 | class = StreamHandler |
|
471 | class = StreamHandler | |
472 | args = (sys.stderr,) |
|
472 | args = (sys.stderr,) | |
473 | formatter = color_formatter |
|
473 | formatter = color_formatter | |
474 |
|
474 | |||
475 | [handler_console_color_sql] |
|
475 | [handler_console_color_sql] | |
476 | ## ANSI color coding and pretty printing of SQL statements |
|
476 | ## ANSI color coding and pretty printing of SQL statements | |
477 | class = StreamHandler |
|
477 | class = StreamHandler | |
478 | args = (sys.stderr,) |
|
478 | args = (sys.stderr,) | |
479 | formatter = color_formatter_sql |
|
479 | formatter = color_formatter_sql | |
480 |
|
480 | |||
481 | [handler_null] |
|
481 | [handler_null] | |
482 | class = NullHandler |
|
482 | class = NullHandler | |
483 | args = () |
|
483 | args = () | |
484 |
|
484 | |||
485 | ################ |
|
485 | ################ | |
486 | ## FORMATTERS ## |
|
486 | ## FORMATTERS ## | |
487 | ################ |
|
487 | ################ | |
488 |
|
488 | |||
489 | [formatter_generic] |
|
489 | [formatter_generic] | |
490 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
490 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
491 | datefmt = %Y-%m-%d %H:%M:%S |
|
491 | datefmt = %Y-%m-%d %H:%M:%S | |
492 |
|
492 | |||
493 | [formatter_color_formatter] |
|
493 | [formatter_color_formatter] | |
494 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
494 | class = kallithea.lib.colored_formatter.ColorFormatter | |
495 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
495 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
496 | datefmt = %Y-%m-%d %H:%M:%S |
|
496 | datefmt = %Y-%m-%d %H:%M:%S | |
497 |
|
497 | |||
498 | [formatter_color_formatter_sql] |
|
498 | [formatter_color_formatter_sql] | |
499 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
499 | class = kallithea.lib.colored_formatter.ColorFormatterSql | |
500 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
500 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
501 | datefmt = %Y-%m-%d %H:%M:%S |
|
501 | datefmt = %Y-%m-%d %H:%M:%S | |
502 |
|
502 | |||
503 | ################# |
|
503 | ################# | |
504 | ## SSH LOGGING ## |
|
504 | ## SSH LOGGING ## | |
505 | ################# |
|
505 | ################# | |
506 |
|
506 | |||
507 | ## The default loggers use 'handler_console' that uses StreamHandler with |
|
507 | ## The default loggers use 'handler_console' that uses StreamHandler with | |
508 | ## destination 'sys.stderr'. In the context of the SSH server process, these log |
|
508 | ## destination 'sys.stderr'. In the context of the SSH server process, these log | |
509 | ## messages would be sent to the client, which is normally not what you want. |
|
509 | ## messages would be sent to the client, which is normally not what you want. | |
510 | ## By default, when running ssh-serve, just use NullHandler and disable logging |
|
510 | ## By default, when running ssh-serve, just use NullHandler and disable logging | |
511 | ## completely. For other logging options, see: |
|
511 | ## completely. For other logging options, see: | |
512 | ## https://docs.python.org/2/library/logging.handlers.html |
|
512 | ## https://docs.python.org/2/library/logging.handlers.html | |
513 |
|
513 | |||
514 | [ssh_serve:logger_root] |
|
514 | [ssh_serve:logger_root] | |
515 | level = CRITICAL |
|
515 | level = CRITICAL | |
516 | handlers = null |
|
516 | handlers = null | |
517 |
|
517 | |||
518 | ## Note: If logging is configured with other handlers, they might need similar |
|
518 | ## Note: If logging is configured with other handlers, they might need similar | |
519 | ## muting for ssh-serve too. |
|
519 | ## muting for ssh-serve too. |
@@ -1,615 +1,615 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
<%text>################################################################################### |
|
2 | <%text>##</%text>################################################################################# | |
3 |
<%text>################################################################################### |
|
3 | <%text>##</%text>################################################################################# | |
4 |
<%text>## Kallithea config file generated with kallithea-config ## |
|
4 | <%text>##</%text> Kallithea config file generated with kallithea-config ## | |
5 |
<%text>## ## |
|
5 | <%text>##</%text> ## | |
6 |
<%text>## The %(here)s variable will be replaced with the parent directory of this file ## |
|
6 | <%text>##</%text> The %(here)s variable will be replaced with the parent directory of this file ## | |
7 |
<%text>################################################################################### |
|
7 | <%text>##</%text>################################################################################# | |
8 |
<%text>################################################################################### |
|
8 | <%text>##</%text>################################################################################# | |
9 |
|
9 | |||
10 | [DEFAULT] |
|
10 | [DEFAULT] | |
11 |
|
11 | |||
12 |
<%text>################################################################################ |
|
12 | <%text>##</%text>############################################################################## | |
13 |
<%text>## Email settings ## |
|
13 | <%text>##</%text> Email settings ## | |
14 |
<%text>## ## |
|
14 | <%text>##</%text> ## | |
15 |
<%text>## Refer to the documentation ("Email settings") for more details. ## |
|
15 | <%text>##</%text> Refer to the documentation ("Email settings") for more details. ## | |
16 |
<%text>## ## |
|
16 | <%text>##</%text> ## | |
17 |
<%text>## It is recommended to use a valid sender address that passes access ## |
|
17 | <%text>##</%text> It is recommended to use a valid sender address that passes access ## | |
18 |
<%text>## validation and spam filtering in mail servers. ## |
|
18 | <%text>##</%text> validation and spam filtering in mail servers. ## | |
19 |
<%text>################################################################################ |
|
19 | <%text>##</%text>############################################################################## | |
20 |
|
20 | |||
21 |
<%text>## 'From' header for application emails. You can optionally add a name. |
|
21 | <%text>##</%text> 'From' header for application emails. You can optionally add a name. | |
22 |
<%text>## Default: |
|
22 | <%text>##</%text> Default: | |
23 | #app_email_from = Kallithea |
|
23 | #app_email_from = Kallithea | |
24 |
<%text>## Examples: |
|
24 | <%text>##</%text> Examples: | |
25 | #app_email_from = Kallithea <kallithea-noreply@example.com> |
|
25 | #app_email_from = Kallithea <kallithea-noreply@example.com> | |
26 | #app_email_from = kallithea-noreply@example.com |
|
26 | #app_email_from = kallithea-noreply@example.com | |
27 |
|
27 | |||
28 |
<%text>## Subject prefix for application emails. |
|
28 | <%text>##</%text> Subject prefix for application emails. | |
29 |
<%text>## A space between this prefix and the real subject is automatically added. |
|
29 | <%text>##</%text> A space between this prefix and the real subject is automatically added. | |
30 |
<%text>## Default: |
|
30 | <%text>##</%text> Default: | |
31 | #email_prefix = |
|
31 | #email_prefix = | |
32 |
<%text>## Example: |
|
32 | <%text>##</%text> Example: | |
33 | #email_prefix = [Kallithea] |
|
33 | #email_prefix = [Kallithea] | |
34 |
|
34 | |||
35 |
<%text>## Recipients for error emails and fallback recipients of application mails. |
|
35 | <%text>##</%text> Recipients for error emails and fallback recipients of application mails. | |
36 |
<%text>## Multiple addresses can be specified, comma-separated. |
|
36 | <%text>##</%text> Multiple addresses can be specified, comma-separated. | |
37 |
<%text>## Only addresses are allowed, do not add any name part. |
|
37 | <%text>##</%text> Only addresses are allowed, do not add any name part. | |
38 |
<%text>## Default: |
|
38 | <%text>##</%text> Default: | |
39 | #email_to = |
|
39 | #email_to = | |
40 |
<%text>## Examples: |
|
40 | <%text>##</%text> Examples: | |
41 | #email_to = admin@example.com |
|
41 | #email_to = admin@example.com | |
42 | #email_to = admin@example.com,another_admin@example.com |
|
42 | #email_to = admin@example.com,another_admin@example.com | |
43 | email_to = |
|
43 | email_to = | |
44 |
|
44 | |||
45 |
<%text>## 'From' header for error emails. You can optionally add a name. |
|
45 | <%text>##</%text> 'From' header for error emails. You can optionally add a name. | |
46 |
<%text>## Default: (none) |
|
46 | <%text>##</%text> Default: (none) | |
47 |
<%text>## Examples: |
|
47 | <%text>##</%text> Examples: | |
48 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> |
|
48 | #error_email_from = Kallithea Errors <kallithea-noreply@example.com> | |
49 | #error_email_from = kallithea_errors@example.com |
|
49 | #error_email_from = kallithea_errors@example.com | |
50 | error_email_from = |
|
50 | error_email_from = | |
51 |
|
51 | |||
52 |
<%text>## SMTP server settings |
|
52 | <%text>##</%text> SMTP server settings | |
53 |
<%text>## If specifying credentials, make sure to use secure connections. |
|
53 | <%text>##</%text> If specifying credentials, make sure to use secure connections. | |
54 |
<%text>## Default: Send unencrypted unauthenticated mails to the specified smtp_server. |
|
54 | <%text>##</%text> Default: Send unencrypted unauthenticated mails to the specified smtp_server. | |
55 |
<%text>## For "SSL", use smtp_use_ssl = true and smtp_port = 465. |
|
55 | <%text>##</%text> For "SSL", use smtp_use_ssl = true and smtp_port = 465. | |
56 |
<%text>## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587. |
|
56 | <%text>##</%text> For "STARTTLS", use smtp_use_tls = true and smtp_port = 587. | |
57 | smtp_server = |
|
57 | smtp_server = | |
58 | smtp_username = |
|
58 | smtp_username = | |
59 | smtp_password = |
|
59 | smtp_password = | |
60 | smtp_port = |
|
60 | smtp_port = | |
61 | smtp_use_ssl = false |
|
61 | smtp_use_ssl = false | |
62 | smtp_use_tls = false |
|
62 | smtp_use_tls = false | |
63 |
|
63 | |||
64 | %if http_server != 'uwsgi': |
|
64 | %if http_server != 'uwsgi': | |
65 |
<%text>## Entry point for 'gearbox serve' |
|
65 | <%text>##</%text> Entry point for 'gearbox serve' | |
66 | [server:main] |
|
66 | [server:main] | |
67 | host = ${host} |
|
67 | host = ${host} | |
68 | port = ${port} |
|
68 | port = ${port} | |
69 |
|
69 | |||
70 | %if http_server == 'gearbox': |
|
70 | %if http_server == 'gearbox': | |
71 |
<%text>## Gearbox default web server ## |
|
71 | <%text>##</%text> Gearbox default web server ## | |
72 | use = egg:gearbox#wsgiref |
|
72 | use = egg:gearbox#wsgiref | |
73 |
<%text>## nr of worker threads to spawn |
|
73 | <%text>##</%text> nr of worker threads to spawn | |
74 | threadpool_workers = 1 |
|
74 | threadpool_workers = 1 | |
75 |
<%text>## max request before thread respawn |
|
75 | <%text>##</%text> max request before thread respawn | |
76 | threadpool_max_requests = 100 |
|
76 | threadpool_max_requests = 100 | |
77 |
<%text>## option to use threads of process |
|
77 | <%text>##</%text> option to use threads of process | |
78 | use_threadpool = true |
|
78 | use_threadpool = true | |
79 |
|
79 | |||
80 | %elif http_server == 'gevent': |
|
80 | %elif http_server == 'gevent': | |
81 |
<%text>## Gearbox gevent web server ## |
|
81 | <%text>##</%text> Gearbox gevent web server ## | |
82 | use = egg:gearbox#gevent |
|
82 | use = egg:gearbox#gevent | |
83 |
|
83 | |||
84 | %elif http_server == 'waitress': |
|
84 | %elif http_server == 'waitress': | |
85 |
<%text>## WAITRESS ## |
|
85 | <%text>##</%text> WAITRESS ## | |
86 | use = egg:waitress#main |
|
86 | use = egg:waitress#main | |
87 |
<%text>## number of worker threads |
|
87 | <%text>##</%text> number of worker threads | |
88 | threads = 1 |
|
88 | threads = 1 | |
89 |
<%text>## MAX BODY SIZE 100GB |
|
89 | <%text>##</%text> MAX BODY SIZE 100GB | |
90 | max_request_body_size = 107374182400 |
|
90 | max_request_body_size = 107374182400 | |
91 |
<%text>## use poll instead of select, fixes fd limits, may not work on old |
|
91 | <%text>##</%text> use poll instead of select, fixes fd limits, may not work on old | |
92 |
<%text>## windows systems. |
|
92 | <%text>##</%text> windows systems. | |
93 | #asyncore_use_poll = True |
|
93 | #asyncore_use_poll = True | |
94 |
|
94 | |||
95 | %elif http_server == 'gunicorn': |
|
95 | %elif http_server == 'gunicorn': | |
96 |
<%text>## GUNICORN ## |
|
96 | <%text>##</%text> GUNICORN ## | |
97 | use = egg:gunicorn#main |
|
97 | use = egg:gunicorn#main | |
98 |
<%text>## number of process workers. You must set `instance_id = *` when this option |
|
98 | <%text>##</%text> number of process workers. You must set `instance_id = *` when this option | |
99 |
<%text>## is set to more than one worker |
|
99 | <%text>##</%text> is set to more than one worker | |
100 | workers = 4 |
|
100 | workers = 4 | |
101 |
<%text>## process name |
|
101 | <%text>##</%text> process name | |
102 | proc_name = kallithea |
|
102 | proc_name = kallithea | |
103 |
<%text>## type of worker class, one of sync, eventlet, gevent, tornado |
|
103 | <%text>##</%text> type of worker class, one of sync, eventlet, gevent, tornado | |
104 |
<%text>## recommended for bigger setup is using of of other than sync one |
|
104 | <%text>##</%text> recommended for bigger setup is using of of other than sync one | |
105 | worker_class = sync |
|
105 | worker_class = sync | |
106 | max_requests = 1000 |
|
106 | max_requests = 1000 | |
107 |
<%text>## amount of time a worker can handle request before it gets killed and |
|
107 | <%text>##</%text> amount of time a worker can handle request before it gets killed and | |
108 |
<%text>## restarted |
|
108 | <%text>##</%text> restarted | |
109 | timeout = 3600 |
|
109 | timeout = 3600 | |
110 |
|
110 | |||
111 | %endif |
|
111 | %endif | |
112 | %else: |
|
112 | %else: | |
113 |
<%text>## UWSGI ## |
|
113 | <%text>##</%text> UWSGI ## | |
114 | [uwsgi] |
|
114 | [uwsgi] | |
115 |
<%text>## Note: this section is parsed by the uWSGI .ini parser when run as: |
|
115 | <%text>##</%text> Note: this section is parsed by the uWSGI .ini parser when run as: | |
116 |
<%text>## uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini |
|
116 | <%text>##</%text> uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini | |
117 |
<%text>## Note: in uWSGI 2.0.18 or older, pastescript needs to be installed to |
|
117 | <%text>##</%text> Note: in uWSGI 2.0.18 or older, pastescript needs to be installed to | |
118 |
<%text>## get correct application logging. In later versions this is not necessary. |
|
118 | <%text>##</%text> get correct application logging. In later versions this is not necessary. | |
119 |
<%text>## pip install pastescript |
|
119 | <%text>##</%text> pip install pastescript | |
120 |
|
120 | |||
121 |
<%text>## HTTP Basics: |
|
121 | <%text>##</%text> HTTP Basics: | |
122 | http-socket = ${host}:${port} |
|
122 | http-socket = ${host}:${port} | |
123 | buffer-size = 65535 ; Mercurial will use huge GET headers for discovery |
|
123 | buffer-size = 65535 ; Mercurial will use huge GET headers for discovery | |
124 |
|
124 | |||
125 |
<%text>## Scaling: |
|
125 | <%text>##</%text> Scaling: | |
126 | master = true ; Use separate master and worker processes |
|
126 | master = true ; Use separate master and worker processes | |
127 | auto-procname = true ; Name worker processes accordingly |
|
127 | auto-procname = true ; Name worker processes accordingly | |
128 | lazy = true ; App *must* be loaded in workers - db connections can't be shared |
|
128 | lazy = true ; App *must* be loaded in workers - db connections can't be shared | |
129 | workers = 4 ; On demand scaling up to this many worker processes |
|
129 | workers = 4 ; On demand scaling up to this many worker processes | |
130 | cheaper = 1 ; Initial and on demand scaling down to this many worker processes |
|
130 | cheaper = 1 ; Initial and on demand scaling down to this many worker processes | |
131 | max-requests = 1000 ; Graceful reload of worker processes to avoid leaks |
|
131 | max-requests = 1000 ; Graceful reload of worker processes to avoid leaks | |
132 |
|
132 | |||
133 |
<%text>## Tweak defaults: |
|
133 | <%text>##</%text> Tweak defaults: | |
134 | strict = true ; Fail on unknown config directives |
|
134 | strict = true ; Fail on unknown config directives | |
135 | enable-threads = true ; Enable Python threads (not threaded workers) |
|
135 | enable-threads = true ; Enable Python threads (not threaded workers) | |
136 | vacuum = true ; Delete sockets during shutdown |
|
136 | vacuum = true ; Delete sockets during shutdown | |
137 | single-interpreter = true |
|
137 | single-interpreter = true | |
138 | die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) |
|
138 | die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) | |
139 | need-app = true ; Exit early if no app can be loaded. |
|
139 | need-app = true ; Exit early if no app can be loaded. | |
140 | reload-on-exception = true ; Don't assume that the application worker can process more requests after a severe error |
|
140 | reload-on-exception = true ; Don't assume that the application worker can process more requests after a severe error | |
141 |
|
141 | |||
142 | %endif |
|
142 | %endif | |
143 |
<%text>## middleware for hosting the WSGI application under a URL prefix |
|
143 | <%text>##</%text> middleware for hosting the WSGI application under a URL prefix | |
144 | #[filter:proxy-prefix] |
|
144 | #[filter:proxy-prefix] | |
145 | #use = egg:PasteDeploy#prefix |
|
145 | #use = egg:PasteDeploy#prefix | |
146 | #prefix = /<your-prefix> |
|
146 | #prefix = /<your-prefix> | |
147 |
|
147 | |||
148 | [app:main] |
|
148 | [app:main] | |
149 | use = egg:kallithea |
|
149 | use = egg:kallithea | |
150 |
<%text>## enable proxy prefix middleware |
|
150 | <%text>##</%text> enable proxy prefix middleware | |
151 | #filter-with = proxy-prefix |
|
151 | #filter-with = proxy-prefix | |
152 |
|
152 | |||
153 | full_stack = true |
|
153 | full_stack = true | |
154 | static_files = true |
|
154 | static_files = true | |
155 |
|
155 | |||
156 |
<%text>## Internationalization (see setup documentation for details) |
|
156 | <%text>##</%text> Internationalization (see setup documentation for details) | |
157 |
<%text>## By default, the languages requested by the browser are used if available, with English as default. |
|
157 | <%text>##</%text> By default, the languages requested by the browser are used if available, with English as default. | |
158 |
<%text>## Set i18n.enabled=false to disable automatic language choice. |
|
158 | <%text>##</%text> Set i18n.enabled=false to disable automatic language choice. | |
159 | #i18n.enabled = true |
|
159 | #i18n.enabled = true | |
160 |
<%text>## To Force a language, set i18n.enabled=false and specify the language in i18n.lang. |
|
160 | <%text>##</%text> To Force a language, set i18n.enabled=false and specify the language in i18n.lang. | |
161 |
<%text>## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo |
|
161 | <%text>##</%text> Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo | |
162 | #i18n.lang = en |
|
162 | #i18n.lang = en | |
163 |
|
163 | |||
164 | cache_dir = %(here)s/data |
|
164 | cache_dir = %(here)s/data | |
165 | index_dir = %(here)s/data/index |
|
165 | index_dir = %(here)s/data/index | |
166 |
|
166 | |||
167 |
<%text>## uncomment and set this path to use archive download cache |
|
167 | <%text>##</%text> uncomment and set this path to use archive download cache | |
168 | archive_cache_dir = %(here)s/tarballcache |
|
168 | archive_cache_dir = %(here)s/tarballcache | |
169 |
|
169 | |||
170 |
<%text>## change this to unique ID for security |
|
170 | <%text>##</%text> change this to unique ID for security | |
171 | app_instance_uuid = ${uuid()} |
|
171 | app_instance_uuid = ${uuid()} | |
172 |
|
172 | |||
173 |
<%text>## cut off limit for large diffs (size in bytes) |
|
173 | <%text>##</%text> cut off limit for large diffs (size in bytes) | |
174 | cut_off_limit = 256000 |
|
174 | cut_off_limit = 256000 | |
175 |
|
175 | |||
176 |
<%text>## force https in Kallithea, fixes https redirects, assumes it's always https |
|
176 | <%text>##</%text> force https in Kallithea, fixes https redirects, assumes it's always https | |
177 | force_https = false |
|
177 | force_https = false | |
178 |
|
178 | |||
179 |
<%text>## use Strict-Transport-Security headers |
|
179 | <%text>##</%text> use Strict-Transport-Security headers | |
180 | use_htsts = false |
|
180 | use_htsts = false | |
181 |
|
181 | |||
182 |
<%text>## number of commits stats will parse on each iteration |
|
182 | <%text>##</%text> number of commits stats will parse on each iteration | |
183 | commit_parse_limit = 25 |
|
183 | commit_parse_limit = 25 | |
184 |
|
184 | |||
185 |
<%text>## Path to Python executable to be used for git hooks. |
|
185 | <%text>##</%text> Path to Python executable to be used for git hooks. | |
186 |
<%text>## This value will be written inside the git hook scripts as the text |
|
186 | <%text>##</%text> This value will be written inside the git hook scripts as the text | |
187 |
<%text>## after '#!' (shebang). When empty or not defined, the value of |
|
187 | <%text>##</%text> after '#!' (shebang). When empty or not defined, the value of | |
188 |
<%text>## 'sys.executable' at the time of installation of the git hooks is |
|
188 | <%text>##</%text> 'sys.executable' at the time of installation of the git hooks is | |
189 |
<%text>## used, which is correct in many cases but for example not when using uwsgi. |
|
189 | <%text>##</%text> used, which is correct in many cases but for example not when using uwsgi. | |
190 |
<%text>## If you change this setting, you should reinstall the Git hooks via |
|
190 | <%text>##</%text> If you change this setting, you should reinstall the Git hooks via | |
191 |
<%text>## Admin > Settings > Remap and Rescan. |
|
191 | <%text>##</%text> Admin > Settings > Remap and Rescan. | |
192 | #git_hook_interpreter = /srv/kallithea/venv/bin/python3 |
|
192 | #git_hook_interpreter = /srv/kallithea/venv/bin/python3 | |
193 | %if git_hook_interpreter: |
|
193 | %if git_hook_interpreter: | |
194 | git_hook_interpreter = ${git_hook_interpreter} |
|
194 | git_hook_interpreter = ${git_hook_interpreter} | |
195 | %endif |
|
195 | %endif | |
196 |
|
196 | |||
197 |
<%text>## path to git executable |
|
197 | <%text>##</%text> path to git executable | |
198 | git_path = git |
|
198 | git_path = git | |
199 |
|
199 | |||
200 |
<%text>## git rev filter option, --all is the default filter, if you need to |
|
200 | <%text>##</%text> git rev filter option, --all is the default filter, if you need to | |
201 |
<%text>## hide all refs in changelog switch this to --branches --tags |
|
201 | <%text>##</%text> hide all refs in changelog switch this to --branches --tags | |
202 | #git_rev_filter = --branches --tags |
|
202 | #git_rev_filter = --branches --tags | |
203 |
|
203 | |||
204 |
<%text>## RSS feed options |
|
204 | <%text>##</%text> RSS feed options | |
205 | rss_cut_off_limit = 256000 |
|
205 | rss_cut_off_limit = 256000 | |
206 | rss_items_per_page = 10 |
|
206 | rss_items_per_page = 10 | |
207 | rss_include_diff = false |
|
207 | rss_include_diff = false | |
208 |
|
208 | |||
209 |
<%text>## options for showing and identifying changesets |
|
209 | <%text>##</%text> options for showing and identifying changesets | |
210 | show_sha_length = 12 |
|
210 | show_sha_length = 12 | |
211 | show_revision_number = false |
|
211 | show_revision_number = false | |
212 |
|
212 | |||
213 |
<%text>## Canonical URL to use when creating full URLs in UI and texts. |
|
213 | <%text>##</%text> Canonical URL to use when creating full URLs in UI and texts. | |
214 |
<%text>## Useful when the site is available under different names or protocols. |
|
214 | <%text>##</%text> Useful when the site is available under different names or protocols. | |
215 |
<%text>## Defaults to what is provided in the WSGI environment. |
|
215 | <%text>##</%text> Defaults to what is provided in the WSGI environment. | |
216 | #canonical_url = https://kallithea.example.com/repos |
|
216 | #canonical_url = https://kallithea.example.com/repos | |
217 |
|
217 | |||
218 |
<%text>## gist URL alias, used to create nicer urls for gist. This should be an |
|
218 | <%text>##</%text> gist URL alias, used to create nicer urls for gist. This should be an | |
219 |
<%text>## url that does rewrites to _admin/gists/<gistid>. |
|
219 | <%text>##</%text> url that does rewrites to _admin/gists/<gistid>. | |
220 |
<%text>## example: http://gist.example.com/{gistid}. Empty means use the internal |
|
220 | <%text>##</%text> example: http://gist.example.com/{gistid}. Empty means use the internal | |
221 |
<%text>## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid> |
|
221 | <%text>##</%text> Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid> | |
222 | gist_alias_url = |
|
222 | gist_alias_url = | |
223 |
|
223 | |||
224 |
<%text>## default encoding used to convert from and to unicode |
|
224 | <%text>##</%text> default encoding used to convert from and to unicode | |
225 |
<%text>## can be also a comma separated list of encoding in case of mixed encodings |
|
225 | <%text>##</%text> can be also a comma separated list of encoding in case of mixed encodings | |
226 | default_encoding = utf-8 |
|
226 | default_encoding = utf-8 | |
227 |
|
227 | |||
228 |
<%text>## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea |
|
228 | <%text>##</%text> Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea | |
229 | hgencoding = utf-8 |
|
229 | hgencoding = utf-8 | |
230 |
|
230 | |||
231 |
<%text>## issue tracker for Kallithea (leave blank to disable, absent for default) |
|
231 | <%text>##</%text> issue tracker for Kallithea (leave blank to disable, absent for default) | |
232 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues |
|
232 | #bugtracker = https://bitbucket.org/conservancy/kallithea/issues | |
233 |
|
233 | |||
234 |
<%text>## issue tracking mapping for commit messages, comments, PR descriptions, ... |
|
234 | <%text>##</%text> issue tracking mapping for commit messages, comments, PR descriptions, ... | |
235 |
<%text>## Refer to the documentation ("Integration with issue trackers") for more details. |
|
235 | <%text>##</%text> Refer to the documentation ("Integration with issue trackers") for more details. | |
236 |
|
236 | |||
237 |
<%text>## regular expression to match issue references |
|
237 | <%text>##</%text> regular expression to match issue references | |
238 |
<%text>## This pattern may/should contain parenthesized groups, that can |
|
238 | <%text>##</%text> This pattern may/should contain parenthesized groups, that can | |
239 |
<%text>## be referred to in issue_server_link or issue_sub using Python backreferences |
|
239 | <%text>##</%text> be referred to in issue_server_link or issue_sub using Python backreferences | |
240 |
<%text>## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'. |
|
240 | <%text>##</%text> (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'. | |
241 |
<%text>## To require mandatory whitespace before the issue pattern, use: |
|
241 | <%text>##</%text> To require mandatory whitespace before the issue pattern, use: | |
242 |
<%text>## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace |
|
242 | <%text>##</%text> (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace | |
243 |
<%text>## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern. |
|
243 | <%text>##</%text> behind the issue pattern, use (?:$|(?=\s)) after the actual pattern. | |
244 |
|
244 | |||
245 | issue_pat = #(\d+) |
|
245 | issue_pat = #(\d+) | |
246 |
|
246 | |||
247 |
<%text>## server url to the issue |
|
247 | <%text>##</%text> server url to the issue | |
248 |
<%text>## This pattern may/should contain backreferences to parenthesized groups in issue_pat. |
|
248 | <%text>##</%text> This pattern may/should contain backreferences to parenthesized groups in issue_pat. | |
249 |
<%text>## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group |
|
249 | <%text>##</%text> A backreference can be \1, \2, ... or \g<groupname> if you specified a named group | |
250 |
<%text>## called 'groupname' in issue_pat. |
|
250 | <%text>##</%text> called 'groupname' in issue_pat. | |
251 |
<%text>## The special token {repo} is replaced with the full repository name |
|
251 | <%text>##</%text> The special token {repo} is replaced with the full repository name | |
252 |
<%text>## including repository groups, while {repo_name} is replaced with just |
|
252 | <%text>##</%text> including repository groups, while {repo_name} is replaced with just | |
253 |
<%text>## the name of the repository. |
|
253 | <%text>##</%text> the name of the repository. | |
254 |
|
254 | |||
255 | issue_server_link = https://issues.example.com/{repo}/issue/\1 |
|
255 | issue_server_link = https://issues.example.com/{repo}/issue/\1 | |
256 |
|
256 | |||
257 |
<%text>## substitution pattern to use as the link text |
|
257 | <%text>##</%text> substitution pattern to use as the link text | |
258 |
<%text>## If issue_sub is empty, the text matched by issue_pat is retained verbatim |
|
258 | <%text>##</%text> If issue_sub is empty, the text matched by issue_pat is retained verbatim | |
259 |
<%text>## for the link text. Otherwise, the link text is that of issue_sub, with any |
|
259 | <%text>##</%text> for the link text. Otherwise, the link text is that of issue_sub, with any | |
260 |
<%text>## backreferences to groups in issue_pat replaced. |
|
260 | <%text>##</%text> backreferences to groups in issue_pat replaced. | |
261 |
|
261 | |||
262 | issue_sub = |
|
262 | issue_sub = | |
263 |
|
263 | |||
264 |
<%text>## issue_pat, issue_server_link and issue_sub can have suffixes to specify |
|
264 | <%text>##</%text> issue_pat, issue_server_link and issue_sub can have suffixes to specify | |
265 |
<%text>## multiple patterns, to other issues server, wiki or others |
|
265 | <%text>##</%text> multiple patterns, to other issues server, wiki or others | |
266 |
<%text>## below an example how to create a wiki pattern |
|
266 | <%text>##</%text> below an example how to create a wiki pattern | |
267 |
<%text>## wiki-some-id -> https://wiki.example.com/some-id |
|
267 | <%text>##</%text> wiki-some-id -> https://wiki.example.com/some-id | |
268 |
|
268 | |||
269 | #issue_pat_wiki = wiki-(\S+) |
|
269 | #issue_pat_wiki = wiki-(\S+) | |
270 | #issue_server_link_wiki = https://wiki.example.com/\1 |
|
270 | #issue_server_link_wiki = https://wiki.example.com/\1 | |
271 | #issue_sub_wiki = WIKI-\1 |
|
271 | #issue_sub_wiki = WIKI-\1 | |
272 |
|
272 | |||
273 |
<%text>## alternative return HTTP header for failed authentication. Default HTTP |
|
273 | <%text>##</%text> alternative return HTTP header for failed authentication. Default HTTP | |
274 |
<%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with |
|
274 | <%text>##</%text> response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with | |
275 |
<%text>## handling that. Set this variable to 403 to return HTTPForbidden |
|
275 | <%text>##</%text> handling that. Set this variable to 403 to return HTTPForbidden | |
276 | auth_ret_code = |
|
276 | auth_ret_code = | |
277 |
|
277 | |||
278 |
<%text>## allows to change the repository location in settings page |
|
278 | <%text>##</%text> allows to change the repository location in settings page | |
279 | allow_repo_location_change = True |
|
279 | allow_repo_location_change = True | |
280 |
|
280 | |||
281 |
<%text>## allows to setup custom hooks in settings page |
|
281 | <%text>##</%text> allows to setup custom hooks in settings page | |
282 | allow_custom_hooks_settings = True |
|
282 | allow_custom_hooks_settings = True | |
283 |
|
283 | |||
284 |
<%text>## extra extensions for indexing, space separated and without the leading '.'. |
|
284 | <%text>##</%text> extra extensions for indexing, space separated and without the leading '.'. | |
285 | #index.extensions = |
|
285 | #index.extensions = | |
286 | # gemfile |
|
286 | # gemfile | |
287 | # lock |
|
287 | # lock | |
288 |
|
288 | |||
289 |
<%text>## extra filenames for indexing, space separated |
|
289 | <%text>##</%text> extra filenames for indexing, space separated | |
290 | #index.filenames = |
|
290 | #index.filenames = | |
291 | # .dockerignore |
|
291 | # .dockerignore | |
292 | # .editorconfig |
|
292 | # .editorconfig | |
293 | # INSTALL |
|
293 | # INSTALL | |
294 | # CHANGELOG |
|
294 | # CHANGELOG | |
295 |
|
295 | |||
296 |
<%text>#################################### |
|
296 | <%text>##</%text>################################## | |
297 |
<%text>## |
|
297 | <%text>##</%text> SSH CONFIG ## | |
298 |
<%text>#################################### |
|
298 | <%text>##</%text>################################## | |
299 |
|
299 | |||
300 |
<%text>## SSH is disabled by default, until an Administrator decides to enable it. |
|
300 | <%text>##</%text> SSH is disabled by default, until an Administrator decides to enable it. | |
301 | ssh_enabled = false |
|
301 | ssh_enabled = false | |
302 |
|
302 | |||
303 |
<%text>## File where users' SSH keys will be stored *if* ssh_enabled is true. |
|
303 | <%text>##</%text> File where users' SSH keys will be stored *if* ssh_enabled is true. | |
304 | #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys |
|
304 | #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys | |
305 | %if user_home_path: |
|
305 | %if user_home_path: | |
306 | ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys |
|
306 | ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys | |
307 | %endif |
|
307 | %endif | |
308 |
|
308 | |||
309 |
<%text>## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. |
|
309 | <%text>##</%text> Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. | |
310 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli |
|
310 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli | |
311 | %if kallithea_cli_path: |
|
311 | %if kallithea_cli_path: | |
312 | kallithea_cli_path = ${kallithea_cli_path} |
|
312 | kallithea_cli_path = ${kallithea_cli_path} | |
313 | %endif |
|
313 | %endif | |
314 |
|
314 | |||
315 |
<%text>## Locale to be used in the ssh-serve command. |
|
315 | <%text>##</%text> Locale to be used in the ssh-serve command. | |
316 |
<%text>## This is needed because an SSH client may try to use its own locale |
|
316 | <%text>##</%text> This is needed because an SSH client may try to use its own locale | |
317 |
<%text>## settings, which may not be available on the server. |
|
317 | <%text>##</%text> settings, which may not be available on the server. | |
318 |
<%text>## See `locale -a` for valid values on this system. |
|
318 | <%text>##</%text> See `locale -a` for valid values on this system. | |
319 | #ssh_locale = C.UTF-8 |
|
319 | #ssh_locale = C.UTF-8 | |
320 | %if ssh_locale: |
|
320 | %if ssh_locale: | |
321 | ssh_locale = ${ssh_locale} |
|
321 | ssh_locale = ${ssh_locale} | |
322 | %endif |
|
322 | %endif | |
323 |
|
323 | |||
324 |
<%text>#################################### |
|
324 | <%text>##</%text>################################## | |
325 |
<%text>## |
|
325 | <%text>##</%text> CELERY CONFIG ## | |
326 |
<%text>#################################### |
|
326 | <%text>##</%text>################################## | |
327 |
|
327 | |||
328 |
<%text>## Note: Celery doesn't support Windows. |
|
328 | <%text>##</%text> Note: Celery doesn't support Windows. | |
329 | use_celery = false |
|
329 | use_celery = false | |
330 |
|
330 | |||
331 |
<%text>## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'. |
|
331 | <%text>##</%text> Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'. | |
332 |
|
332 | |||
333 |
<%text>## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea': |
|
333 | <%text>##</%text> Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea': | |
334 | celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost |
|
334 | celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost | |
335 |
|
335 | |||
336 | celery.result.backend = db+sqlite:///celery-results.db |
|
336 | celery.result.backend = db+sqlite:///celery-results.db | |
337 |
|
337 | |||
338 | #celery.amqp.task.result.expires = 18000 |
|
338 | #celery.amqp.task.result.expires = 18000 | |
339 |
|
339 | |||
340 | celery.worker_concurrency = 2 |
|
340 | celery.worker_concurrency = 2 | |
341 | celery.worker_max_tasks_per_child = 1 |
|
341 | celery.worker_max_tasks_per_child = 1 | |
342 |
|
342 | |||
343 |
<%text>## If true, tasks will never be sent to the queue, but executed locally instead. |
|
343 | <%text>##</%text> If true, tasks will never be sent to the queue, but executed locally instead. | |
344 | celery.task_always_eager = false |
|
344 | celery.task_always_eager = false | |
345 |
|
345 | |||
346 |
<%text>#################################### |
|
346 | <%text>##</%text>################################## | |
347 |
<%text>## |
|
347 | <%text>##</%text> BEAKER CACHE ## | |
348 |
<%text>#################################### |
|
348 | <%text>##</%text>################################## | |
349 |
|
349 | |||
350 | beaker.cache.data_dir = %(here)s/data/cache/data |
|
350 | beaker.cache.data_dir = %(here)s/data/cache/data | |
351 | beaker.cache.lock_dir = %(here)s/data/cache/lock |
|
351 | beaker.cache.lock_dir = %(here)s/data/cache/lock | |
352 |
|
352 | |||
353 | beaker.cache.regions = long_term,long_term_file |
|
353 | beaker.cache.regions = long_term,long_term_file | |
354 |
|
354 | |||
355 | beaker.cache.long_term.type = memory |
|
355 | beaker.cache.long_term.type = memory | |
356 | beaker.cache.long_term.expire = 36000 |
|
356 | beaker.cache.long_term.expire = 36000 | |
357 | beaker.cache.long_term.key_length = 256 |
|
357 | beaker.cache.long_term.key_length = 256 | |
358 |
|
358 | |||
359 | beaker.cache.long_term_file.type = file |
|
359 | beaker.cache.long_term_file.type = file | |
360 | beaker.cache.long_term_file.expire = 604800 |
|
360 | beaker.cache.long_term_file.expire = 604800 | |
361 | beaker.cache.long_term_file.key_length = 256 |
|
361 | beaker.cache.long_term_file.key_length = 256 | |
362 |
|
362 | |||
363 |
<%text>#################################### |
|
363 | <%text>##</%text>################################## | |
364 |
<%text>## |
|
364 | <%text>##</%text> BEAKER SESSION ## | |
365 |
<%text>#################################### |
|
365 | <%text>##</%text>################################## | |
366 |
|
366 | |||
367 |
<%text>## Name of session cookie. Should be unique for a given host and path, even when running |
|
367 | <%text>##</%text> Name of session cookie. Should be unique for a given host and path, even when running | |
368 |
<%text>## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
368 | <%text>##</%text> on different ports. Otherwise, cookie sessions will be shared and messed up. | |
369 | session.key = kallithea |
|
369 | session.key = kallithea | |
370 |
<%text>## Sessions should always only be accessible by the browser, not directly by JavaScript. |
|
370 | <%text>##</%text> Sessions should always only be accessible by the browser, not directly by JavaScript. | |
371 | session.httponly = true |
|
371 | session.httponly = true | |
372 |
<%text>## Session lifetime. 2592000 seconds is 30 days. |
|
372 | <%text>##</%text> Session lifetime. 2592000 seconds is 30 days. | |
373 | session.timeout = 2592000 |
|
373 | session.timeout = 2592000 | |
374 |
|
374 | |||
375 |
<%text>## Server secret used with HMAC to ensure integrity of cookies. |
|
375 | <%text>##</%text> Server secret used with HMAC to ensure integrity of cookies. | |
376 | session.secret = ${uuid()} |
|
376 | session.secret = ${uuid()} | |
377 |
<%text>## Further, encrypt the data with AES. |
|
377 | <%text>##</%text> Further, encrypt the data with AES. | |
378 | #session.encrypt_key = <key_for_encryption> |
|
378 | #session.encrypt_key = <key_for_encryption> | |
379 | #session.validate_key = <validation_key> |
|
379 | #session.validate_key = <validation_key> | |
380 |
|
380 | |||
381 |
<%text>## Type of storage used for the session, current types are |
|
381 | <%text>##</%text> Type of storage used for the session, current types are | |
382 |
<%text>## dbm, file, memcached, database, and memory. |
|
382 | <%text>##</%text> dbm, file, memcached, database, and memory. | |
383 |
|
383 | |||
384 |
<%text>## File system storage of session data. (default) |
|
384 | <%text>##</%text> File system storage of session data. (default) | |
385 | #session.type = file |
|
385 | #session.type = file | |
386 |
|
386 | |||
387 |
<%text>## Cookie only, store all session data inside the cookie. Requires secure secrets. |
|
387 | <%text>##</%text> Cookie only, store all session data inside the cookie. Requires secure secrets. | |
388 | #session.type = cookie |
|
388 | #session.type = cookie | |
389 |
|
389 | |||
390 |
<%text>## Database storage of session data. |
|
390 | <%text>##</%text> Database storage of session data. | |
391 | #session.type = ext:database |
|
391 | #session.type = ext:database | |
392 | #session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
392 | #session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
393 | #session.table_name = db_session |
|
393 | #session.table_name = db_session | |
394 |
|
394 | |||
395 |
<%text>#################################### |
|
395 | <%text>##</%text>################################## | |
396 |
<%text>## |
|
396 | <%text>##</%text> ERROR HANDLING ## | |
397 |
<%text>#################################### |
|
397 | <%text>##</%text>################################## | |
398 |
|
398 | |||
399 |
<%text>## Show a nice error page for application HTTP errors and exceptions (default true) |
|
399 | <%text>##</%text> Show a nice error page for application HTTP errors and exceptions (default true) | |
400 | #errorpage.enabled = true |
|
400 | #errorpage.enabled = true | |
401 |
|
401 | |||
402 |
<%text>## Enable Backlash client-side interactive debugger (default false) |
|
402 | <%text>##</%text> Enable Backlash client-side interactive debugger (default false) | |
403 |
<%text>## WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!* |
|
403 | <%text>##</%text> WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!* | |
404 |
<%text>## This debug mode will allow all visitors to execute malicious code. |
|
404 | <%text>##</%text> This debug mode will allow all visitors to execute malicious code. | |
405 | #debug = false |
|
405 | #debug = false | |
406 |
|
406 | |||
407 |
<%text>## Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true) |
|
407 | <%text>##</%text> Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true) | |
408 | #trace_errors.enable = true |
|
408 | #trace_errors.enable = true | |
409 |
<%text>## Errors will be reported by mail if trace_errors.error_email is set. |
|
409 | <%text>##</%text> Errors will be reported by mail if trace_errors.error_email is set. | |
410 |
|
410 | |||
411 |
<%text>## Propagate email settings to ErrorReporter of TurboGears2 |
|
411 | <%text>##</%text> Propagate email settings to ErrorReporter of TurboGears2 | |
412 |
<%text>## You do not normally need to change these lines |
|
412 | <%text>##</%text> You do not normally need to change these lines | |
413 | get trace_errors.smtp_server = smtp_server |
|
413 | get trace_errors.smtp_server = smtp_server | |
414 | get trace_errors.smtp_port = smtp_port |
|
414 | get trace_errors.smtp_port = smtp_port | |
415 | get trace_errors.from_address = error_email_from |
|
415 | get trace_errors.from_address = error_email_from | |
416 | get trace_errors.error_email = email_to |
|
416 | get trace_errors.error_email = email_to | |
417 | get trace_errors.smtp_username = smtp_username |
|
417 | get trace_errors.smtp_username = smtp_username | |
418 | get trace_errors.smtp_password = smtp_password |
|
418 | get trace_errors.smtp_password = smtp_password | |
419 | get trace_errors.smtp_use_tls = smtp_use_tls |
|
419 | get trace_errors.smtp_use_tls = smtp_use_tls | |
420 |
|
420 | |||
421 | %if error_aggregation_service == 'sentry': |
|
421 | %if error_aggregation_service == 'sentry': | |
422 |
<%text>################ |
|
422 | <%text>##</%text>############## | |
423 |
<%text>## |
|
423 | <%text>##</%text> [sentry] ## | |
424 |
<%text>################ |
|
424 | <%text>##</%text>############## | |
425 |
|
425 | |||
426 |
<%text>## sentry is a alternative open source error aggregator |
|
426 | <%text>##</%text> sentry is a alternative open source error aggregator | |
427 |
<%text>## you must install python packages `sentry` and `raven` to enable |
|
427 | <%text>##</%text> you must install python packages `sentry` and `raven` to enable | |
428 |
|
428 | |||
429 | sentry.dsn = YOUR_DNS |
|
429 | sentry.dsn = YOUR_DNS | |
430 | sentry.servers = |
|
430 | sentry.servers = | |
431 | sentry.name = |
|
431 | sentry.name = | |
432 | sentry.key = |
|
432 | sentry.key = | |
433 | sentry.public_key = |
|
433 | sentry.public_key = | |
434 | sentry.secret_key = |
|
434 | sentry.secret_key = | |
435 | sentry.project = |
|
435 | sentry.project = | |
436 | sentry.site = |
|
436 | sentry.site = | |
437 | sentry.include_paths = |
|
437 | sentry.include_paths = | |
438 | sentry.exclude_paths = |
|
438 | sentry.exclude_paths = | |
439 |
|
439 | |||
440 | %endif |
|
440 | %endif | |
441 |
|
441 | |||
442 |
<%text>################################## |
|
442 | <%text>##</%text>################################ | |
443 |
<%text>## |
|
443 | <%text>##</%text> LOGVIEW CONFIG ## | |
444 |
<%text>################################## |
|
444 | <%text>##</%text>################################ | |
445 |
|
445 | |||
446 | logview.sqlalchemy = #faa |
|
446 | logview.sqlalchemy = #faa | |
447 | logview.pylons.templating = #bfb |
|
447 | logview.pylons.templating = #bfb | |
448 | logview.pylons.util = #eee |
|
448 | logview.pylons.util = #eee | |
449 |
|
449 | |||
450 | <%text>#########################################################</%text> |
|
450 | <%text>##</%text>####################### | |
451 | <%text>### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###</%text> |
|
451 | <%text>##</%text> DB CONFIG ## | |
452 | <%text>#########################################################</%text> |
|
452 | <%text>##</%text>####################### | |
453 |
|
453 | |||
454 | %if database_engine == 'sqlite': |
|
454 | %if database_engine == 'sqlite': | |
455 |
<%text>## SQLITE [default] |
|
455 | <%text>##</%text> SQLITE [default] | |
456 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 |
|
456 | sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 | |
457 |
|
457 | |||
458 | %elif database_engine == 'postgres': |
|
458 | %elif database_engine == 'postgres': | |
459 |
<%text>## POSTGRESQL |
|
459 | <%text>##</%text> POSTGRESQL | |
460 | sqlalchemy.url = postgresql://user:pass@localhost/kallithea |
|
460 | sqlalchemy.url = postgresql://user:pass@localhost/kallithea | |
461 |
|
461 | |||
462 | %elif database_engine == 'mysql': |
|
462 | %elif database_engine == 'mysql': | |
463 |
<%text>## |
|
463 | <%text>##</%text> MySQL | |
464 | sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 |
|
464 | sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 | |
465 |
|
465 | |||
466 | %endif |
|
466 | %endif | |
467 |
<%text>## see sqlalchemy docs for other backends |
|
467 | <%text>##</%text> see sqlalchemy docs for other backends | |
468 |
|
468 | |||
469 | sqlalchemy.pool_recycle = 3600 |
|
469 | sqlalchemy.pool_recycle = 3600 | |
470 |
|
470 | |||
471 |
<%text>################################ |
|
471 | <%text>##</%text>############################## | |
472 |
<%text>## |
|
472 | <%text>##</%text> ALEMBIC CONFIGURATION ## | |
473 |
<%text>################################ |
|
473 | <%text>##</%text>############################## | |
474 |
|
474 | |||
475 | [alembic] |
|
475 | [alembic] | |
476 | script_location = kallithea:alembic |
|
476 | script_location = kallithea:alembic | |
477 |
|
477 | |||
478 |
<%text>################################ |
|
478 | <%text>##</%text>############################## | |
479 |
<%text>## |
|
479 | <%text>##</%text> LOGGING CONFIGURATION ## | |
480 |
<%text>################################ |
|
480 | <%text>##</%text>############################## | |
481 |
|
481 | |||
482 | [loggers] |
|
482 | [loggers] | |
483 | keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash |
|
483 | keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash | |
484 |
|
484 | |||
485 | [handlers] |
|
485 | [handlers] | |
486 | keys = console, console_color, console_color_sql, null |
|
486 | keys = console, console_color, console_color_sql, null | |
487 |
|
487 | |||
488 | [formatters] |
|
488 | [formatters] | |
489 | keys = generic, color_formatter, color_formatter_sql |
|
489 | keys = generic, color_formatter, color_formatter_sql | |
490 |
|
490 | |||
491 |
<%text>############# |
|
491 | <%text>##</%text>########### | |
492 |
<%text>## LOGGERS ## |
|
492 | <%text>##</%text> LOGGERS ## | |
493 |
<%text>############# |
|
493 | <%text>##</%text>########### | |
494 |
|
494 | |||
495 | [logger_root] |
|
495 | [logger_root] | |
496 | level = NOTSET |
|
496 | level = NOTSET | |
497 | handlers = console |
|
497 | handlers = console | |
498 |
<%text>## For coloring based on log level: |
|
498 | <%text>##</%text> For coloring based on log level: | |
499 | #handlers = console_color |
|
499 | #handlers = console_color | |
500 |
|
500 | |||
501 | [logger_routes] |
|
501 | [logger_routes] | |
502 | level = WARN |
|
502 | level = WARN | |
503 | handlers = |
|
503 | handlers = | |
504 | qualname = routes.middleware |
|
504 | qualname = routes.middleware | |
505 |
<%text>## "level = DEBUG" logs the route matched and routing variables. |
|
505 | <%text>##</%text> "level = DEBUG" logs the route matched and routing variables. | |
506 |
|
506 | |||
507 | [logger_beaker] |
|
507 | [logger_beaker] | |
508 | level = WARN |
|
508 | level = WARN | |
509 | handlers = |
|
509 | handlers = | |
510 | qualname = beaker.container |
|
510 | qualname = beaker.container | |
511 |
|
511 | |||
512 | [logger_templates] |
|
512 | [logger_templates] | |
513 | level = WARN |
|
513 | level = WARN | |
514 | handlers = |
|
514 | handlers = | |
515 | qualname = pylons.templating |
|
515 | qualname = pylons.templating | |
516 |
|
516 | |||
517 | [logger_kallithea] |
|
517 | [logger_kallithea] | |
518 | level = WARN |
|
518 | level = WARN | |
519 | handlers = |
|
519 | handlers = | |
520 | qualname = kallithea |
|
520 | qualname = kallithea | |
521 |
|
521 | |||
522 | [logger_tg] |
|
522 | [logger_tg] | |
523 | level = WARN |
|
523 | level = WARN | |
524 | handlers = |
|
524 | handlers = | |
525 | qualname = tg |
|
525 | qualname = tg | |
526 |
|
526 | |||
527 | [logger_gearbox] |
|
527 | [logger_gearbox] | |
528 | level = WARN |
|
528 | level = WARN | |
529 | handlers = |
|
529 | handlers = | |
530 | qualname = gearbox |
|
530 | qualname = gearbox | |
531 |
|
531 | |||
532 | [logger_sqlalchemy] |
|
532 | [logger_sqlalchemy] | |
533 | level = WARN |
|
533 | level = WARN | |
534 | handlers = |
|
534 | handlers = | |
535 | qualname = sqlalchemy.engine |
|
535 | qualname = sqlalchemy.engine | |
536 |
<%text>## For coloring based on log level and pretty printing of SQL: |
|
536 | <%text>##</%text> For coloring based on log level and pretty printing of SQL: | |
537 | #level = INFO |
|
537 | #level = INFO | |
538 | #handlers = console_color_sql |
|
538 | #handlers = console_color_sql | |
539 | #propagate = 0 |
|
539 | #propagate = 0 | |
540 |
|
540 | |||
541 | [logger_whoosh_indexer] |
|
541 | [logger_whoosh_indexer] | |
542 | level = WARN |
|
542 | level = WARN | |
543 | handlers = |
|
543 | handlers = | |
544 | qualname = whoosh_indexer |
|
544 | qualname = whoosh_indexer | |
545 |
|
545 | |||
546 | [logger_werkzeug] |
|
546 | [logger_werkzeug] | |
547 | level = WARN |
|
547 | level = WARN | |
548 | handlers = |
|
548 | handlers = | |
549 | qualname = werkzeug |
|
549 | qualname = werkzeug | |
550 |
|
550 | |||
551 | [logger_backlash] |
|
551 | [logger_backlash] | |
552 | level = WARN |
|
552 | level = WARN | |
553 | handlers = |
|
553 | handlers = | |
554 | qualname = backlash |
|
554 | qualname = backlash | |
555 |
|
555 | |||
556 |
<%text>############## |
|
556 | <%text>##</%text>############ | |
557 |
<%text>## HANDLERS ## |
|
557 | <%text>##</%text> HANDLERS ## | |
558 |
<%text>############## |
|
558 | <%text>##</%text>############ | |
559 |
|
559 | |||
560 | [handler_console] |
|
560 | [handler_console] | |
561 | class = StreamHandler |
|
561 | class = StreamHandler | |
562 | args = (sys.stderr,) |
|
562 | args = (sys.stderr,) | |
563 | formatter = generic |
|
563 | formatter = generic | |
564 |
|
564 | |||
565 | [handler_console_color] |
|
565 | [handler_console_color] | |
566 |
<%text>## ANSI color coding based on log level |
|
566 | <%text>##</%text> ANSI color coding based on log level | |
567 | class = StreamHandler |
|
567 | class = StreamHandler | |
568 | args = (sys.stderr,) |
|
568 | args = (sys.stderr,) | |
569 | formatter = color_formatter |
|
569 | formatter = color_formatter | |
570 |
|
570 | |||
571 | [handler_console_color_sql] |
|
571 | [handler_console_color_sql] | |
572 |
<%text>## ANSI color coding and pretty printing of SQL statements |
|
572 | <%text>##</%text> ANSI color coding and pretty printing of SQL statements | |
573 | class = StreamHandler |
|
573 | class = StreamHandler | |
574 | args = (sys.stderr,) |
|
574 | args = (sys.stderr,) | |
575 | formatter = color_formatter_sql |
|
575 | formatter = color_formatter_sql | |
576 |
|
576 | |||
577 | [handler_null] |
|
577 | [handler_null] | |
578 | class = NullHandler |
|
578 | class = NullHandler | |
579 | args = () |
|
579 | args = () | |
580 |
|
580 | |||
581 |
<%text>################ |
|
581 | <%text>##</%text>############## | |
582 |
<%text>## FORMATTERS ## |
|
582 | <%text>##</%text> FORMATTERS ## | |
583 |
<%text>################ |
|
583 | <%text>##</%text>############## | |
584 |
|
584 | |||
585 | [formatter_generic] |
|
585 | [formatter_generic] | |
586 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
586 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
587 | datefmt = %Y-%m-%d %H:%M:%S |
|
587 | datefmt = %Y-%m-%d %H:%M:%S | |
588 |
|
588 | |||
589 | [formatter_color_formatter] |
|
589 | [formatter_color_formatter] | |
590 | class = kallithea.lib.colored_formatter.ColorFormatter |
|
590 | class = kallithea.lib.colored_formatter.ColorFormatter | |
591 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
591 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
592 | datefmt = %Y-%m-%d %H:%M:%S |
|
592 | datefmt = %Y-%m-%d %H:%M:%S | |
593 |
|
593 | |||
594 | [formatter_color_formatter_sql] |
|
594 | [formatter_color_formatter_sql] | |
595 | class = kallithea.lib.colored_formatter.ColorFormatterSql |
|
595 | class = kallithea.lib.colored_formatter.ColorFormatterSql | |
596 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
596 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
597 | datefmt = %Y-%m-%d %H:%M:%S |
|
597 | datefmt = %Y-%m-%d %H:%M:%S | |
598 |
|
598 | |||
599 |
<%text>################# |
|
599 | <%text>##</%text>############### | |
600 |
<%text>## SSH LOGGING ## |
|
600 | <%text>##</%text> SSH LOGGING ## | |
601 |
<%text>################# |
|
601 | <%text>##</%text>############### | |
602 |
|
602 | |||
603 |
<%text>## The default loggers use 'handler_console' that uses StreamHandler with |
|
603 | <%text>##</%text> The default loggers use 'handler_console' that uses StreamHandler with | |
604 |
<%text>## destination 'sys.stderr'. In the context of the SSH server process, these log |
|
604 | <%text>##</%text> destination 'sys.stderr'. In the context of the SSH server process, these log | |
605 |
<%text>## messages would be sent to the client, which is normally not what you want. |
|
605 | <%text>##</%text> messages would be sent to the client, which is normally not what you want. | |
606 |
<%text>## By default, when running ssh-serve, just use NullHandler and disable logging |
|
606 | <%text>##</%text> By default, when running ssh-serve, just use NullHandler and disable logging | |
607 |
<%text>## completely. For other logging options, see: |
|
607 | <%text>##</%text> completely. For other logging options, see: | |
608 |
<%text>## https://docs.python.org/2/library/logging.handlers.html |
|
608 | <%text>##</%text> https://docs.python.org/2/library/logging.handlers.html | |
609 |
|
609 | |||
610 | [ssh_serve:logger_root] |
|
610 | [ssh_serve:logger_root] | |
611 | level = CRITICAL |
|
611 | level = CRITICAL | |
612 | handlers = null |
|
612 | handlers = null | |
613 |
|
613 | |||
614 |
<%text>## Note: If logging is configured with other handlers, they might need similar |
|
614 | <%text>##</%text> Note: If logging is configured with other handlers, they might need similar | |
615 |
<%text>## muting for ssh-serve too. |
|
615 | <%text>##</%text> muting for ssh-serve too. |
@@ -1,77 +1,77 b'' | |||||
1 | #!/usr/bin/env python3 |
|
1 | #!/usr/bin/env python3 | |
2 | """ |
|
2 | """ | |
3 | Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini |
|
3 | Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini | |
4 | """ |
|
4 | """ | |
5 |
|
5 | |||
6 | import re |
|
6 | import re | |
7 |
|
7 | |||
8 | from kallithea.lib import inifile |
|
8 | from kallithea.lib import inifile | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | # files to be generated from the mako template |
|
11 | # files to be generated from the mako template | |
12 | ini_files = [ |
|
12 | ini_files = [ | |
13 | ('development.ini', |
|
13 | ('development.ini', | |
14 | { |
|
14 | { | |
15 | '[server:main]': { |
|
15 | '[server:main]': { | |
16 | 'host': '0.0.0.0', |
|
16 | 'host': '0.0.0.0', | |
17 | }, |
|
17 | }, | |
18 | '[app:main]': { |
|
18 | '[app:main]': { | |
19 | 'debug': 'true', |
|
19 | 'debug': 'true', | |
20 | 'app_instance_uuid': 'development-not-secret', |
|
20 | 'app_instance_uuid': 'development-not-secret', | |
21 | 'session.secret': 'development-not-secret', |
|
21 | 'session.secret': 'development-not-secret', | |
22 | }, |
|
22 | }, | |
23 | '[logger_root]': { |
|
23 | '[logger_root]': { | |
24 | 'handlers': 'console_color', |
|
24 | 'handlers': 'console_color', | |
25 | }, |
|
25 | }, | |
26 | '[logger_routes]': { |
|
26 | '[logger_routes]': { | |
27 | 'level': 'DEBUG', |
|
27 | 'level': 'DEBUG', | |
28 | }, |
|
28 | }, | |
29 | '[logger_beaker]': { |
|
29 | '[logger_beaker]': { | |
30 | 'level': 'DEBUG', |
|
30 | 'level': 'DEBUG', | |
31 | }, |
|
31 | }, | |
32 | '[logger_templates]': { |
|
32 | '[logger_templates]': { | |
33 | 'level': 'INFO', |
|
33 | 'level': 'INFO', | |
34 | }, |
|
34 | }, | |
35 | '[logger_kallithea]': { |
|
35 | '[logger_kallithea]': { | |
36 | 'level': 'DEBUG', |
|
36 | 'level': 'DEBUG', | |
37 | }, |
|
37 | }, | |
38 | '[logger_tg]': { |
|
38 | '[logger_tg]': { | |
39 | 'level': 'DEBUG', |
|
39 | 'level': 'DEBUG', | |
40 | }, |
|
40 | }, | |
41 | '[logger_gearbox]': { |
|
41 | '[logger_gearbox]': { | |
42 | 'level': 'DEBUG', |
|
42 | 'level': 'DEBUG', | |
43 | }, |
|
43 | }, | |
44 | '[logger_whoosh_indexer]': { |
|
44 | '[logger_whoosh_indexer]': { | |
45 | 'level': 'DEBUG', |
|
45 | 'level': 'DEBUG', | |
46 | }, |
|
46 | }, | |
47 | }, |
|
47 | }, | |
48 | ), |
|
48 | ), | |
49 | ] |
|
49 | ] | |
50 |
|
50 | |||
51 |
|
51 | |||
52 | def main(): |
|
52 | def main(): | |
53 | # make sure all mako lines starting with '#' (the '##' comments) are marked up as <text> |
|
53 | # make sure all mako lines starting with '#' (the '##' comments) are marked up as <text> | |
54 | makofile = inifile.template_file |
|
54 | makofile = inifile.template_file | |
55 | print('reading:', makofile) |
|
55 | print('reading:', makofile) | |
56 | mako_org = open(makofile).read() |
|
56 | mako_org = open(makofile).read() | |
57 | mako_no_text_markup = re.sub(r'</?%text>', '', mako_org) |
|
57 | mako_no_text_markup = re.sub(r'</?%text>', '', mako_org) | |
58 |
mako_marked_up = re.sub(r'\n |
|
58 | mako_marked_up = re.sub(r'\n##(.*)', r'\n<%text>##</%text>\1', mako_no_text_markup, flags=re.MULTILINE) | |
59 | if mako_marked_up != mako_org: |
|
59 | if mako_marked_up != mako_org: | |
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) |
|
63 | lines = re.findall(r'\n(# [^ ].*)', mako_marked_up) | |
64 | if lines: |
|
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') |
|
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: |
|
66 | for line in lines: | |
67 | print(line) |
|
67 | print(line) | |
68 | raise SystemExit(1) |
|
68 | raise SystemExit(1) | |
69 |
|
69 | |||
70 | # create ini files |
|
70 | # create ini files | |
71 | for fn, settings in ini_files: |
|
71 | for fn, settings in ini_files: | |
72 | print('updating:', fn) |
|
72 | print('updating:', fn) | |
73 | inifile.create(fn, None, settings) |
|
73 | inifile.create(fn, None, settings) | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | if __name__ == '__main__': |
|
76 | if __name__ == '__main__': | |
77 | main() |
|
77 | main() |
General Comments 0
You need to be logged in to leave comments.
Login now