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