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