##// END OF EJS Templates
issue #7 remove obsolete configuration
domruf -
r4501:a68fc4ab default
parent child Browse files
Show More
@@ -1,615 +1,587 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 # set 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
15 debug = true
16 pdebug = false
16 pdebug = false
17
17
18 ################################################################################
18 ################################################################################
19 ## Uncomment and replace with the address which should receive ##
19 ## Uncomment and replace with the address which should receive ##
20 ## any error reports after application crash ##
20 ## any error reports after application crash ##
21 ## Additionally those settings will be used by Kallithea mailing system ##
21 ## Additionally those settings will be used by Kallithea mailing system ##
22 ################################################################################
22 ################################################################################
23 #email_to = admin@localhost
23 #email_to = admin@localhost
24 #error_email_from = paste_error@localhost
24 #error_email_from = paste_error@localhost
25 #app_email_from = kallithea-noreply@localhost
25 #app_email_from = kallithea-noreply@localhost
26 #error_message =
26 #error_message =
27 #email_prefix = [Kallithea]
27 #email_prefix = [Kallithea]
28
28
29 #smtp_server = mail.server.com
29 #smtp_server = mail.server.com
30 #smtp_username =
30 #smtp_username =
31 #smtp_password =
31 #smtp_password =
32 #smtp_port =
32 #smtp_port =
33 #smtp_use_tls = false
33 #smtp_use_tls = false
34 #smtp_use_ssl = true
34 #smtp_use_ssl = true
35 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
35 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
36 #smtp_auth =
36 #smtp_auth =
37
37
38 [server:main]
38 [server:main]
39 ## PASTE ##
39 ## PASTE ##
40 #use = egg:Paste#http
40 #use = egg:Paste#http
41 ## nr of worker threads to spawn
41 ## nr of worker threads to spawn
42 #threadpool_workers = 5
42 #threadpool_workers = 5
43 ## max request before thread respawn
43 ## max request before thread respawn
44 #threadpool_max_requests = 10
44 #threadpool_max_requests = 10
45 ## option to use threads of process
45 ## option to use threads of process
46 #use_threadpool = true
46 #use_threadpool = true
47
47
48 ## WAITRESS ##
48 ## WAITRESS ##
49 use = egg:waitress#main
49 use = egg:waitress#main
50 ## number of worker threads
50 ## number of worker threads
51 threads = 5
51 threads = 5
52 ## MAX BODY SIZE 100GB
52 ## MAX BODY SIZE 100GB
53 max_request_body_size = 107374182400
53 max_request_body_size = 107374182400
54 ## use poll instead of select, fixes fd limits, may not work on old
54 ## use poll instead of select, fixes fd limits, may not work on old
55 ## windows systems.
55 ## windows systems.
56 #asyncore_use_poll = True
56 #asyncore_use_poll = True
57
57
58 ## GUNICORN ##
58 ## GUNICORN ##
59 #use = egg:gunicorn#main
59 #use = egg:gunicorn#main
60 ## number of process workers. You must set `instance_id = *` when this option
60 ## number of process workers. You must set `instance_id = *` when this option
61 ## is set to more than one worker
61 ## is set to more than one worker
62 #workers = 1
62 #workers = 1
63 ## process name
63 ## process name
64 #proc_name = kallithea
64 #proc_name = kallithea
65 ## type of worker class, one of sync, eventlet, gevent, tornado
65 ## type of worker class, one of sync, eventlet, gevent, tornado
66 ## recommended for bigger setup is using of of other than sync one
66 ## recommended for bigger setup is using of of other than sync one
67 #worker_class = sync
67 #worker_class = sync
68 #max_requests = 1000
68 #max_requests = 1000
69 ## ammount of time a worker can handle request before it gets killed and
69 ## ammount of time a worker can handle request before it gets killed and
70 ## restarted
70 ## restarted
71 #timeout = 3600
71 #timeout = 3600
72
72
73 ## UWSGI ##
73 ## UWSGI ##
74 ## run with uwsgi --ini-paste-logged <inifile.ini>
74 ## run with uwsgi --ini-paste-logged <inifile.ini>
75 #[uwsgi]
75 #[uwsgi]
76 #socket = /tmp/uwsgi.sock
76 #socket = /tmp/uwsgi.sock
77 #master = true
77 #master = true
78 #http = 127.0.0.1:5000
78 #http = 127.0.0.1:5000
79
79
80 ## set as deamon and redirect all output to file
80 ## set as deamon and redirect all output to file
81 #daemonize = ./uwsgi_kallithea.log
81 #daemonize = ./uwsgi_kallithea.log
82
82
83 ## master process PID
83 ## master process PID
84 #pidfile = ./uwsgi_kallithea.pid
84 #pidfile = ./uwsgi_kallithea.pid
85
85
86 ## stats server with workers statistics, use uwsgitop
86 ## stats server with workers statistics, use uwsgitop
87 ## for monitoring, `uwsgitop 127.0.0.1:1717`
87 ## for monitoring, `uwsgitop 127.0.0.1:1717`
88 #stats = 127.0.0.1:1717
88 #stats = 127.0.0.1:1717
89 #memory-report = true
89 #memory-report = true
90
90
91 ## log 5XX errors
91 ## log 5XX errors
92 #log-5xx = true
92 #log-5xx = true
93
93
94 ## Set the socket listen queue size.
94 ## Set the socket listen queue size.
95 #listen = 256
95 #listen = 256
96
96
97 ## Gracefully Reload workers after the specified amount of managed requests
97 ## Gracefully Reload workers after the specified amount of managed requests
98 ## (avoid memory leaks).
98 ## (avoid memory leaks).
99 #max-requests = 1000
99 #max-requests = 1000
100
100
101 ## enable large buffers
101 ## enable large buffers
102 #buffer-size=65535
102 #buffer-size=65535
103
103
104 ## socket and http timeouts ##
104 ## socket and http timeouts ##
105 #http-timeout=3600
105 #http-timeout=3600
106 #socket-timeout=3600
106 #socket-timeout=3600
107
107
108 ## Log requests slower than the specified number of milliseconds.
108 ## Log requests slower than the specified number of milliseconds.
109 #log-slow = 10
109 #log-slow = 10
110
110
111 ## Exit if no app can be loaded.
111 ## Exit if no app can be loaded.
112 #need-app = true
112 #need-app = true
113
113
114 ## Set lazy mode (load apps in workers instead of master).
114 ## Set lazy mode (load apps in workers instead of master).
115 #lazy = true
115 #lazy = true
116
116
117 ## scaling ##
117 ## scaling ##
118 ## set cheaper algorithm to use, if not set default will be used
118 ## set cheaper algorithm to use, if not set default will be used
119 #cheaper-algo = spare
119 #cheaper-algo = spare
120
120
121 ## minimum number of workers to keep at all times
121 ## minimum number of workers to keep at all times
122 #cheaper = 1
122 #cheaper = 1
123
123
124 ## number of workers to spawn at startup
124 ## number of workers to spawn at startup
125 #cheaper-initial = 1
125 #cheaper-initial = 1
126
126
127 ## maximum number of workers that can be spawned
127 ## maximum number of workers that can be spawned
128 #workers = 4
128 #workers = 4
129
129
130 ## how many workers should be spawned at a time
130 ## how many workers should be spawned at a time
131 #cheaper-step = 1
131 #cheaper-step = 1
132
132
133 ## COMMON ##
133 ## COMMON ##
134 host = 0.0.0.0
134 host = 0.0.0.0
135 port = 5000
135 port = 5000
136
136
137 ## prefix middleware for rc
137 ## prefix middleware for rc
138 #[filter:proxy-prefix]
138 #[filter:proxy-prefix]
139 #use = egg:PasteDeploy#prefix
139 #use = egg:PasteDeploy#prefix
140 #prefix = /<your-prefix>
140 #prefix = /<your-prefix>
141
141
142 [app:main]
142 [app:main]
143 use = egg:kallithea
143 use = egg:kallithea
144 ## enable proxy prefix middleware
144 ## enable proxy prefix middleware
145 #filter-with = proxy-prefix
145 #filter-with = proxy-prefix
146
146
147 full_stack = true
147 full_stack = true
148 static_files = true
148 static_files = true
149 ## Available Languages:
149 ## Available Languages:
150 ## de en fr ja pl pt_BR ru zh_CN zh_TW
150 ## de en fr ja pl pt_BR ru zh_CN zh_TW
151 lang = en
151 lang = en
152 cache_dir = %(here)s/data
152 cache_dir = %(here)s/data
153 index_dir = %(here)s/data/index
153 index_dir = %(here)s/data/index
154
154
155 ## perform a full repository scan on each server start, this should be
155 ## perform a full repository scan on each server start, this should be
156 ## set to false after first startup, to allow faster server restarts.
156 ## set to false after first startup, to allow faster server restarts.
157 #initial_repo_scan = false
157 #initial_repo_scan = false
158 initial_repo_scan = true
158 initial_repo_scan = true
159
159
160 ## uncomment and set this path to use archive download cache
160 ## uncomment and set this path to use archive download cache
161 archive_cache_dir = %(here)s/tarballcache
161 archive_cache_dir = %(here)s/tarballcache
162
162
163 ## change this to unique ID for security
163 ## change this to unique ID for security
164 app_instance_uuid = development-not-secret
164 app_instance_uuid = development-not-secret
165
165
166 ## cut off limit for large diffs (size in bytes)
166 ## cut off limit for large diffs (size in bytes)
167 cut_off_limit = 256000
167 cut_off_limit = 256000
168
168
169 ## use cache version of scm repo everywhere
169 ## use cache version of scm repo everywhere
170 vcs_full_cache = true
170 vcs_full_cache = true
171
171
172 ## force https in Kallithea, fixes https redirects, assumes it's always https
172 ## force https in Kallithea, fixes https redirects, assumes it's always https
173 force_https = false
173 force_https = false
174
174
175 ## use Strict-Transport-Security headers
175 ## use Strict-Transport-Security headers
176 use_htsts = false
176 use_htsts = false
177
177
178 ## number of commits stats will parse on each iteration
178 ## number of commits stats will parse on each iteration
179 commit_parse_limit = 25
179 commit_parse_limit = 25
180
180
181 ## use gravatar service to display avatars
182 use_gravatar = true
183
184 ## path to git executable
181 ## path to git executable
185 git_path = git
182 git_path = git
186
183
187 ## git rev filter option, --all is the default filter, if you need to
184 ## git rev filter option, --all is the default filter, if you need to
188 ## hide all refs in changelog switch this to --branches --tags
185 ## hide all refs in changelog switch this to --branches --tags
189 #git_rev_filter = --branches --tags
186 #git_rev_filter = --branches --tags
190
187
191 ## RSS feed options
188 ## RSS feed options
192 rss_cut_off_limit = 256000
189 rss_cut_off_limit = 256000
193 rss_items_per_page = 10
190 rss_items_per_page = 10
194 rss_include_diff = false
191 rss_include_diff = false
195
192
196 ## options for showing and identifying changesets
193 ## options for showing and identifying changesets
197 show_sha_length = 12
194 show_sha_length = 12
198 show_revision_number = true
195 show_revision_number = true
199
196
200 ## gist URL alias, used to create nicer urls for gist. This should be an
197 ## gist URL alias, used to create nicer urls for gist. This should be an
201 ## url that does rewrites to _admin/gists/<gistid>.
198 ## url that does rewrites to _admin/gists/<gistid>.
202 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
199 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
203 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
200 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
204 gist_alias_url =
201 gist_alias_url =
205
202
206 ## white list of API enabled controllers. This allows to add list of
203 ## white list of API enabled controllers. This allows to add list of
207 ## controllers to which access will be enabled by api_key. eg: to enable
204 ## controllers to which access will be enabled by api_key. eg: to enable
208 ## api access to raw_files put `FilesController:raw`, to enable access to patches
205 ## api access to raw_files put `FilesController:raw`, to enable access to patches
209 ## add `ChangesetController:changeset_patch`. This list should be "," separated
206 ## add `ChangesetController:changeset_patch`. This list should be "," separated
210 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
207 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
211 ## Recommended settings below are commented out:
208 ## Recommended settings below are commented out:
212 api_access_controllers_whitelist =
209 api_access_controllers_whitelist =
213 # ChangesetController:changeset_patch,
210 # ChangesetController:changeset_patch,
214 # ChangesetController:changeset_raw,
211 # ChangesetController:changeset_raw,
215 # FilesController:raw,
212 # FilesController:raw,
216 # FilesController:archivefile
213 # FilesController:archivefile
217
214
218 ## alternative_gravatar_url allows you to use your own avatar server application
219 ## the following parts of the URL will be replaced
220 ## {email} user email
221 ## {md5email} md5 hash of the user email (like at gravatar.com)
222 ## {size} size of the image that is expected from the server application
223 ## {scheme} http/https from Kallithea server
224 ## {netloc} network location from Kallithea server
225 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
226 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
227
228
229 ## container auth options
230 container_auth_enabled = false
231 proxypass_auth_enabled = false
232
233 ## default encoding used to convert from and to unicode
215 ## default encoding used to convert from and to unicode
234 ## can be also a comma seperated list of encoding in case of mixed encodings
216 ## can be also a comma seperated list of encoding in case of mixed encodings
235 default_encoding = utf8
217 default_encoding = utf8
236
218
237 ## overwrite schema of clone url
238 ## available vars:
239 ## scheme - http/https
240 ## user - current user
241 ## pass - password
242 ## netloc - network location
243 ## path - usually repo_name
244
245 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
246
247 ## issue tracker for Kallithea (leave blank to disable, absent for default)
219 ## issue tracker for Kallithea (leave blank to disable, absent for default)
248 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
220 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
249
221
250 ## issue tracking mapping for commits messages
222 ## issue tracking mapping for commits messages
251 ## comment out issue_pat, issue_server, issue_prefix to enable
223 ## comment out issue_pat, issue_server, issue_prefix to enable
252
224
253 ## pattern to get the issues from commit messages
225 ## pattern to get the issues from commit messages
254 ## default one used here is #<numbers> with a regex passive group for `#`
226 ## default one used here is #<numbers> with a regex passive group for `#`
255 ## {id} will be all groups matched from this pattern
227 ## {id} will be all groups matched from this pattern
256
228
257 issue_pat = (?:\s*#)(\d+)
229 issue_pat = (?:\s*#)(\d+)
258
230
259 ## server url to the issue, each {id} will be replaced with match
231 ## server url to the issue, each {id} will be replaced with match
260 ## fetched from the regex and {repo} is replaced with full repository name
232 ## fetched from the regex and {repo} is replaced with full repository name
261 ## including groups {repo_name} is replaced with just name of repo
233 ## including groups {repo_name} is replaced with just name of repo
262
234
263 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
235 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
264
236
265 ## prefix to add to link to indicate it's an url
237 ## prefix to add to link to indicate it's an url
266 ## #314 will be replaced by <issue_prefix><id>
238 ## #314 will be replaced by <issue_prefix><id>
267
239
268 issue_prefix = #
240 issue_prefix = #
269
241
270 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
242 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
271 ## multiple patterns, to other issues server, wiki or others
243 ## multiple patterns, to other issues server, wiki or others
272 ## below an example how to create a wiki pattern
244 ## below an example how to create a wiki pattern
273 # wiki-some-id -> https://mywiki.com/some-id
245 # wiki-some-id -> https://mywiki.com/some-id
274
246
275 #issue_pat_wiki = (?:wiki-)(.+)
247 #issue_pat_wiki = (?:wiki-)(.+)
276 #issue_server_link_wiki = https://mywiki.com/{id}
248 #issue_server_link_wiki = https://mywiki.com/{id}
277 #issue_prefix_wiki = WIKI-
249 #issue_prefix_wiki = WIKI-
278
250
279
251
280 ## instance-id prefix
252 ## instance-id prefix
281 ## a prefix key for this instance used for cache invalidation when running
253 ## a prefix key for this instance used for cache invalidation when running
282 ## multiple instances of kallithea, make sure it's globally unique for
254 ## multiple instances of kallithea, make sure it's globally unique for
283 ## all running kallithea instances. Leave empty if you don't use it
255 ## all running kallithea instances. Leave empty if you don't use it
284 instance_id =
256 instance_id =
285
257
286 ## alternative return HTTP header for failed authentication. Default HTTP
258 ## alternative return HTTP header for failed authentication. Default HTTP
287 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
259 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
288 ## handling that. Set this variable to 403 to return HTTPForbidden
260 ## handling that. Set this variable to 403 to return HTTPForbidden
289 auth_ret_code =
261 auth_ret_code =
290
262
291 ## locking return code. When repository is locked return this HTTP code. 2XX
263 ## locking return code. When repository is locked return this HTTP code. 2XX
292 ## codes don't break the transactions while 4XX codes do
264 ## codes don't break the transactions while 4XX codes do
293 lock_ret_code = 423
265 lock_ret_code = 423
294
266
295 ## allows to change the repository location in settings page
267 ## allows to change the repository location in settings page
296 allow_repo_location_change = True
268 allow_repo_location_change = True
297
269
298 ## allows to setup custom hooks in settings page
270 ## allows to setup custom hooks in settings page
299 allow_custom_hooks_settings = True
271 allow_custom_hooks_settings = True
300
272
301
273
302 ####################################
274 ####################################
303 ### CELERY CONFIG ####
275 ### CELERY CONFIG ####
304 ####################################
276 ####################################
305
277
306 use_celery = false
278 use_celery = false
307 broker.host = localhost
279 broker.host = localhost
308 broker.vhost = rabbitmqhost
280 broker.vhost = rabbitmqhost
309 broker.port = 5672
281 broker.port = 5672
310 broker.user = rabbitmq
282 broker.user = rabbitmq
311 broker.password = qweqwe
283 broker.password = qweqwe
312
284
313 celery.imports = kallithea.lib.celerylib.tasks
285 celery.imports = kallithea.lib.celerylib.tasks
314
286
315 celery.result.backend = amqp
287 celery.result.backend = amqp
316 celery.result.dburi = amqp://
288 celery.result.dburi = amqp://
317 celery.result.serialier = json
289 celery.result.serialier = json
318
290
319 #celery.send.task.error.emails = true
291 #celery.send.task.error.emails = true
320 #celery.amqp.task.result.expires = 18000
292 #celery.amqp.task.result.expires = 18000
321
293
322 celeryd.concurrency = 2
294 celeryd.concurrency = 2
323 #celeryd.log.file = celeryd.log
295 #celeryd.log.file = celeryd.log
324 celeryd.log.level = debug
296 celeryd.log.level = debug
325 celeryd.max.tasks.per.child = 1
297 celeryd.max.tasks.per.child = 1
326
298
327 ## tasks will never be sent to the queue, but executed locally instead.
299 ## tasks will never be sent to the queue, but executed locally instead.
328 celery.always.eager = false
300 celery.always.eager = false
329
301
330 ####################################
302 ####################################
331 ### BEAKER CACHE ####
303 ### BEAKER CACHE ####
332 ####################################
304 ####################################
333
305
334 beaker.cache.data_dir=%(here)s/data/cache/data
306 beaker.cache.data_dir=%(here)s/data/cache/data
335 beaker.cache.lock_dir=%(here)s/data/cache/lock
307 beaker.cache.lock_dir=%(here)s/data/cache/lock
336
308
337 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
309 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
338
310
339 beaker.cache.super_short_term.type=memory
311 beaker.cache.super_short_term.type=memory
340 beaker.cache.super_short_term.expire=10
312 beaker.cache.super_short_term.expire=10
341 beaker.cache.super_short_term.key_length = 256
313 beaker.cache.super_short_term.key_length = 256
342
314
343 beaker.cache.short_term.type=memory
315 beaker.cache.short_term.type=memory
344 beaker.cache.short_term.expire=60
316 beaker.cache.short_term.expire=60
345 beaker.cache.short_term.key_length = 256
317 beaker.cache.short_term.key_length = 256
346
318
347 beaker.cache.long_term.type=memory
319 beaker.cache.long_term.type=memory
348 beaker.cache.long_term.expire=36000
320 beaker.cache.long_term.expire=36000
349 beaker.cache.long_term.key_length = 256
321 beaker.cache.long_term.key_length = 256
350
322
351 beaker.cache.sql_cache_short.type=memory
323 beaker.cache.sql_cache_short.type=memory
352 beaker.cache.sql_cache_short.expire=10
324 beaker.cache.sql_cache_short.expire=10
353 beaker.cache.sql_cache_short.key_length = 256
325 beaker.cache.sql_cache_short.key_length = 256
354
326
355 beaker.cache.sql_cache_med.type=memory
327 beaker.cache.sql_cache_med.type=memory
356 beaker.cache.sql_cache_med.expire=360
328 beaker.cache.sql_cache_med.expire=360
357 beaker.cache.sql_cache_med.key_length = 256
329 beaker.cache.sql_cache_med.key_length = 256
358
330
359 beaker.cache.sql_cache_long.type=file
331 beaker.cache.sql_cache_long.type=file
360 beaker.cache.sql_cache_long.expire=3600
332 beaker.cache.sql_cache_long.expire=3600
361 beaker.cache.sql_cache_long.key_length = 256
333 beaker.cache.sql_cache_long.key_length = 256
362
334
363 ####################################
335 ####################################
364 ### BEAKER SESSION ####
336 ### BEAKER SESSION ####
365 ####################################
337 ####################################
366 ## Type of storage used for the session, current types are
338 ## Type of storage used for the session, current types are
367 ## dbm, file, memcached, database, and memory.
339 ## dbm, file, memcached, database, and memory.
368 ## The storage uses the Container API
340 ## The storage uses the Container API
369 ## that is also used by the cache system.
341 ## that is also used by the cache system.
370
342
371 ## db session ##
343 ## db session ##
372 #beaker.session.type = ext:database
344 #beaker.session.type = ext:database
373 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
345 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
374 #beaker.session.table_name = db_session
346 #beaker.session.table_name = db_session
375
347
376 ## encrypted cookie client side session, good for many instances ##
348 ## encrypted cookie client side session, good for many instances ##
377 #beaker.session.type = cookie
349 #beaker.session.type = cookie
378
350
379 ## file based cookies (default) ##
351 ## file based cookies (default) ##
380 #beaker.session.type = file
352 #beaker.session.type = file
381
353
382 beaker.session.key = kallithea
354 beaker.session.key = kallithea
383 beaker.session.secret = development-not-secret
355 beaker.session.secret = development-not-secret
384
356
385 ## Secure encrypted cookie. Requires AES and AES python libraries
357 ## Secure encrypted cookie. Requires AES and AES python libraries
386 ## you must disable beaker.session.secret to use this
358 ## you must disable beaker.session.secret to use this
387 #beaker.session.encrypt_key = <key_for_encryption>
359 #beaker.session.encrypt_key = <key_for_encryption>
388 #beaker.session.validate_key = <validation_key>
360 #beaker.session.validate_key = <validation_key>
389
361
390 ## sets session as invalid if it haven't been accessed for given amount of time
362 ## sets session as invalid if it haven't been accessed for given amount of time
391 beaker.session.timeout = 2592000
363 beaker.session.timeout = 2592000
392 beaker.session.httponly = true
364 beaker.session.httponly = true
393 #beaker.session.cookie_path = /<your-prefix>
365 #beaker.session.cookie_path = /<your-prefix>
394
366
395 ## uncomment for https secure cookie
367 ## uncomment for https secure cookie
396 beaker.session.secure = false
368 beaker.session.secure = false
397
369
398 ## auto save the session to not to use .save()
370 ## auto save the session to not to use .save()
399 beaker.session.auto = False
371 beaker.session.auto = False
400
372
401 ## default cookie expiration time in seconds `true` expire at browser close ##
373 ## default cookie expiration time in seconds `true` expire at browser close ##
402 #beaker.session.cookie_expires = 3600
374 #beaker.session.cookie_expires = 3600
403
375
404
376
405 ############################
377 ############################
406 ## ERROR HANDLING SYSTEMS ##
378 ## ERROR HANDLING SYSTEMS ##
407 ############################
379 ############################
408
380
409 ####################
381 ####################
410 ### [errormator] ###
382 ### [errormator] ###
411 ####################
383 ####################
412
384
413 ## Errormator is tailored to work with Kallithea, see
385 ## Errormator is tailored to work with Kallithea, see
414 ## http://errormator.com for details how to obtain an account
386 ## http://errormator.com for details how to obtain an account
415 ## you must install python package `errormator_client` to make it work
387 ## you must install python package `errormator_client` to make it work
416
388
417 ## errormator enabled
389 ## errormator enabled
418 errormator = false
390 errormator = false
419
391
420 errormator.server_url = https://api.errormator.com
392 errormator.server_url = https://api.errormator.com
421 errormator.api_key = YOUR_API_KEY
393 errormator.api_key = YOUR_API_KEY
422
394
423 ## TWEAK AMOUNT OF INFO SENT HERE
395 ## TWEAK AMOUNT OF INFO SENT HERE
424
396
425 ## enables 404 error logging (default False)
397 ## enables 404 error logging (default False)
426 errormator.report_404 = false
398 errormator.report_404 = false
427
399
428 ## time in seconds after request is considered being slow (default 1)
400 ## time in seconds after request is considered being slow (default 1)
429 errormator.slow_request_time = 1
401 errormator.slow_request_time = 1
430
402
431 ## record slow requests in application
403 ## record slow requests in application
432 ## (needs to be enabled for slow datastore recording and time tracking)
404 ## (needs to be enabled for slow datastore recording and time tracking)
433 errormator.slow_requests = true
405 errormator.slow_requests = true
434
406
435 ## enable hooking to application loggers
407 ## enable hooking to application loggers
436 # errormator.logging = true
408 # errormator.logging = true
437
409
438 ## minimum log level for log capture
410 ## minimum log level for log capture
439 # errormator.logging.level = WARNING
411 # errormator.logging.level = WARNING
440
412
441 ## send logs only from erroneous/slow requests
413 ## send logs only from erroneous/slow requests
442 ## (saves API quota for intensive logging)
414 ## (saves API quota for intensive logging)
443 errormator.logging_on_error = false
415 errormator.logging_on_error = false
444
416
445 ## list of additonal keywords that should be grabbed from environ object
417 ## list of additonal keywords that should be grabbed from environ object
446 ## can be string with comma separated list of words in lowercase
418 ## can be string with comma separated list of words in lowercase
447 ## (by default client will always send following info:
419 ## (by default client will always send following info:
448 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
420 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
449 ## start with HTTP* this list be extended with additional keywords here
421 ## start with HTTP* this list be extended with additional keywords here
450 errormator.environ_keys_whitelist =
422 errormator.environ_keys_whitelist =
451
423
452
424
453 ## list of keywords that should be blanked from request object
425 ## list of keywords that should be blanked from request object
454 ## can be string with comma separated list of words in lowercase
426 ## can be string with comma separated list of words in lowercase
455 ## (by default client will always blank keys that contain following words
427 ## (by default client will always blank keys that contain following words
456 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
428 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
457 ## this list be extended with additional keywords set here
429 ## this list be extended with additional keywords set here
458 errormator.request_keys_blacklist =
430 errormator.request_keys_blacklist =
459
431
460
432
461 ## list of namespaces that should be ignores when gathering log entries
433 ## list of namespaces that should be ignores when gathering log entries
462 ## can be string with comma separated list of namespaces
434 ## can be string with comma separated list of namespaces
463 ## (by default the client ignores own entries: errormator_client.client)
435 ## (by default the client ignores own entries: errormator_client.client)
464 errormator.log_namespace_blacklist =
436 errormator.log_namespace_blacklist =
465
437
466
438
467 ################
439 ################
468 ### [sentry] ###
440 ### [sentry] ###
469 ################
441 ################
470
442
471 ## sentry is a alternative open source error aggregator
443 ## sentry is a alternative open source error aggregator
472 ## you must install python packages `sentry` and `raven` to enable
444 ## you must install python packages `sentry` and `raven` to enable
473
445
474 sentry.dsn = YOUR_DNS
446 sentry.dsn = YOUR_DNS
475 sentry.servers =
447 sentry.servers =
476 sentry.name =
448 sentry.name =
477 sentry.key =
449 sentry.key =
478 sentry.public_key =
450 sentry.public_key =
479 sentry.secret_key =
451 sentry.secret_key =
480 sentry.project =
452 sentry.project =
481 sentry.site =
453 sentry.site =
482 sentry.include_paths =
454 sentry.include_paths =
483 sentry.exclude_paths =
455 sentry.exclude_paths =
484
456
485
457
486 ################################################################################
458 ################################################################################
487 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
459 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
488 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
460 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
489 ## execute malicious code after an exception is raised. ##
461 ## execute malicious code after an exception is raised. ##
490 ################################################################################
462 ################################################################################
491 #set debug = false
463 #set debug = false
492 set debug = true
464 set debug = true
493
465
494 ##################################
466 ##################################
495 ### LOGVIEW CONFIG ###
467 ### LOGVIEW CONFIG ###
496 ##################################
468 ##################################
497
469
498 logview.sqlalchemy = #faa
470 logview.sqlalchemy = #faa
499 logview.pylons.templating = #bfb
471 logview.pylons.templating = #bfb
500 logview.pylons.util = #eee
472 logview.pylons.util = #eee
501
473
502 #########################################################
474 #########################################################
503 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
475 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
504 #########################################################
476 #########################################################
505
477
506 # SQLITE [default]
478 # SQLITE [default]
507 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
479 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
508
480
509 # POSTGRESQL
481 # POSTGRESQL
510 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
482 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
511
483
512 # MySQL
484 # MySQL
513 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
485 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
514
486
515 # see sqlalchemy docs for others
487 # see sqlalchemy docs for others
516
488
517 sqlalchemy.db1.echo = false
489 sqlalchemy.db1.echo = false
518 sqlalchemy.db1.pool_recycle = 3600
490 sqlalchemy.db1.pool_recycle = 3600
519 sqlalchemy.db1.convert_unicode = true
491 sqlalchemy.db1.convert_unicode = true
520
492
521 ################################
493 ################################
522 ### LOGGING CONFIGURATION ####
494 ### LOGGING CONFIGURATION ####
523 ################################
495 ################################
524
496
525 [loggers]
497 [loggers]
526 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
498 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
527
499
528 [handlers]
500 [handlers]
529 keys = console, console_sql
501 keys = console, console_sql
530
502
531 [formatters]
503 [formatters]
532 keys = generic, color_formatter, color_formatter_sql
504 keys = generic, color_formatter, color_formatter_sql
533
505
534 #############
506 #############
535 ## LOGGERS ##
507 ## LOGGERS ##
536 #############
508 #############
537
509
538 [logger_root]
510 [logger_root]
539 level = NOTSET
511 level = NOTSET
540 handlers = console
512 handlers = console
541
513
542 [logger_routes]
514 [logger_routes]
543 level = DEBUG
515 level = DEBUG
544 handlers =
516 handlers =
545 qualname = routes.middleware
517 qualname = routes.middleware
546 ## "level = DEBUG" logs the route matched and routing variables.
518 ## "level = DEBUG" logs the route matched and routing variables.
547 propagate = 1
519 propagate = 1
548
520
549 [logger_beaker]
521 [logger_beaker]
550 level = DEBUG
522 level = DEBUG
551 handlers =
523 handlers =
552 qualname = beaker.container
524 qualname = beaker.container
553 propagate = 1
525 propagate = 1
554
526
555 [logger_templates]
527 [logger_templates]
556 level = INFO
528 level = INFO
557 handlers =
529 handlers =
558 qualname = pylons.templating
530 qualname = pylons.templating
559 propagate = 1
531 propagate = 1
560
532
561 [logger_kallithea]
533 [logger_kallithea]
562 level = DEBUG
534 level = DEBUG
563 handlers =
535 handlers =
564 qualname = kallithea
536 qualname = kallithea
565 propagate = 1
537 propagate = 1
566
538
567 [logger_sqlalchemy]
539 [logger_sqlalchemy]
568 level = INFO
540 level = INFO
569 handlers = console_sql
541 handlers = console_sql
570 qualname = sqlalchemy.engine
542 qualname = sqlalchemy.engine
571 propagate = 0
543 propagate = 0
572
544
573 [logger_whoosh_indexer]
545 [logger_whoosh_indexer]
574 level = DEBUG
546 level = DEBUG
575 handlers =
547 handlers =
576 qualname = whoosh_indexer
548 qualname = whoosh_indexer
577 propagate = 1
549 propagate = 1
578
550
579 ##############
551 ##############
580 ## HANDLERS ##
552 ## HANDLERS ##
581 ##############
553 ##############
582
554
583 [handler_console]
555 [handler_console]
584 class = StreamHandler
556 class = StreamHandler
585 args = (sys.stderr,)
557 args = (sys.stderr,)
586 #level = INFO
558 #level = INFO
587 #formatter = generic
559 #formatter = generic
588 level = DEBUG
560 level = DEBUG
589 formatter = color_formatter
561 formatter = color_formatter
590
562
591 [handler_console_sql]
563 [handler_console_sql]
592 class = StreamHandler
564 class = StreamHandler
593 args = (sys.stderr,)
565 args = (sys.stderr,)
594 #level = WARN
566 #level = WARN
595 #formatter = generic
567 #formatter = generic
596 level = DEBUG
568 level = DEBUG
597 formatter = color_formatter_sql
569 formatter = color_formatter_sql
598
570
599 ################
571 ################
600 ## FORMATTERS ##
572 ## FORMATTERS ##
601 ################
573 ################
602
574
603 [formatter_generic]
575 [formatter_generic]
604 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
576 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
605 datefmt = %Y-%m-%d %H:%M:%S
577 datefmt = %Y-%m-%d %H:%M:%S
606
578
607 [formatter_color_formatter]
579 [formatter_color_formatter]
608 class=kallithea.lib.colored_formatter.ColorFormatter
580 class=kallithea.lib.colored_formatter.ColorFormatter
609 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
581 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
610 datefmt = %Y-%m-%d %H:%M:%S
582 datefmt = %Y-%m-%d %H:%M:%S
611
583
612 [formatter_color_formatter_sql]
584 [formatter_color_formatter_sql]
613 class=kallithea.lib.colored_formatter.ColorFormatterSql
585 class=kallithea.lib.colored_formatter.ColorFormatterSql
614 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
586 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
615 datefmt = %Y-%m-%d %H:%M:%S
587 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,747 +1,739 b''
1 .. _setup:
1 .. _setup:
2
2
3 =====
3 =====
4 Setup
4 Setup
5 =====
5 =====
6
6
7
7
8 Setting up Kallithea
8 Setting up Kallithea
9 --------------------
9 --------------------
10
10
11 First, you will need to create a Kallithea configuration file. Run the
11 First, you will need to create a Kallithea configuration file. Run the
12 following command to do this::
12 following command to do this::
13
13
14 paster make-config Kallithea production.ini
14 paster make-config Kallithea production.ini
15
15
16 - This will create the file `production.ini` in the current directory. This
16 - This will create the file `production.ini` in the current directory. This
17 configuration file contains the various settings for Kallithea, e.g proxy
17 configuration file contains the various settings for Kallithea, e.g proxy
18 port, email settings, usage of static files, cache, celery settings and
18 port, email settings, usage of static files, cache, celery settings and
19 logging.
19 logging.
20
20
21
21
22 Next, you need to create the databases used by Kallithea. I recommend that you
22 Next, you need to create the databases used by Kallithea. I recommend that you
23 use postgresql or sqlite (default). If you choose a database other than the
23 use postgresql or sqlite (default). If you choose a database other than the
24 default ensure you properly adjust the db url in your production.ini
24 default ensure you properly adjust the db url in your production.ini
25 configuration file to use this other database. Kallithea currently supports
25 configuration file to use this other database. Kallithea currently supports
26 postgresql, sqlite and mysql databases. Create the database by running
26 postgresql, sqlite and mysql databases. Create the database by running
27 the following command::
27 the following command::
28
28
29 paster setup-db production.ini
29 paster setup-db production.ini
30
30
31 This will prompt you for a "root" path. This "root" path is the location where
31 This will prompt you for a "root" path. This "root" path is the location where
32 Kallithea will store all of its repositories on the current machine. After
32 Kallithea will store all of its repositories on the current machine. After
33 entering this "root" path ``setup-db`` will also prompt you for a username
33 entering this "root" path ``setup-db`` will also prompt you for a username
34 and password for the initial admin account which ``setup-db`` sets
34 and password for the initial admin account which ``setup-db`` sets
35 up for you.
35 up for you.
36
36
37 setup process can be fully automated, example for lazy::
37 setup process can be fully automated, example for lazy::
38
38
39 paster setup-db production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
39 paster setup-db production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
40
40
41
41
42 - The ``setup-db`` command will create all of the needed tables and an
42 - The ``setup-db`` command will create all of the needed tables and an
43 admin account. When choosing a root path you can either use a new empty
43 admin account. When choosing a root path you can either use a new empty
44 location, or a location which already contains existing repositories. If you
44 location, or a location which already contains existing repositories. If you
45 choose a location which contains existing repositories Kallithea will simply
45 choose a location which contains existing repositories Kallithea will simply
46 add all of the repositories at the chosen location to it's database.
46 add all of the repositories at the chosen location to it's database.
47 (Note: make sure you specify the correct path to the root).
47 (Note: make sure you specify the correct path to the root).
48 - Note: the given path for mercurial_ repositories **must** be write accessible
48 - Note: the given path for mercurial_ repositories **must** be write accessible
49 for the application. It's very important since the Kallithea web interface
49 for the application. It's very important since the Kallithea web interface
50 will work without write access, but when trying to do a push it will
50 will work without write access, but when trying to do a push it will
51 eventually fail with permission denied errors unless it has write access.
51 eventually fail with permission denied errors unless it has write access.
52
52
53 You are now ready to use Kallithea, to run it simply execute::
53 You are now ready to use Kallithea, to run it simply execute::
54
54
55 paster serve production.ini
55 paster serve production.ini
56
56
57 - This command runs the Kallithea server. The web app should be available at the
57 - This command runs the Kallithea server. The web app should be available at the
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
59 file created in previous step
59 file created in previous step
60 - Use the admin account you created above when running ``setup-db``
60 - Use the admin account you created above when running ``setup-db``
61 to login to the web app.
61 to login to the web app.
62 - The default permissions on each repository is read, and the owner is admin.
62 - The default permissions on each repository is read, and the owner is admin.
63 Remember to update these if needed.
63 Remember to update these if needed.
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
65 well as edit more advanced options on users and repositories
65 well as edit more advanced options on users and repositories
66
66
67 Optionally users can create `rcextensions` package that extends Kallithea
67 Optionally users can create `rcextensions` package that extends Kallithea
68 functionality. To do this simply execute::
68 functionality. To do this simply execute::
69
69
70 paster make-rcext production.ini
70 paster make-rcext production.ini
71
71
72 This will create `rcextensions` package in the same place that your `ini` file
72 This will create `rcextensions` package in the same place that your `ini` file
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
74 stats and add additional code into the push/pull/create/delete repo hooks.
74 stats and add additional code into the push/pull/create/delete repo hooks.
75 For example for sending signals to build-bots such as jenkins.
75 For example for sending signals to build-bots such as jenkins.
76 Please see the `__init__.py` file inside `rcextensions` package
76 Please see the `__init__.py` file inside `rcextensions` package
77 for more details.
77 for more details.
78
78
79
79
80 Using Kallithea with SSH
80 Using Kallithea with SSH
81 ------------------------
81 ------------------------
82
82
83 Kallithea currently only hosts repositories using http and https. (The addition
83 Kallithea currently only hosts repositories using http and https. (The addition
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
85 parallel with Kallithea. (Repository access via ssh is a standard "out of
85 parallel with Kallithea. (Repository access via ssh is a standard "out of
86 the box" feature of mercurial_ and you can use this to access any of the
86 the box" feature of mercurial_ and you can use this to access any of the
87 repositories that Kallithea is hosting. See PublishingRepositories_)
87 repositories that Kallithea is hosting. See PublishingRepositories_)
88
88
89 Kallithea repository structures are kept in directories with the same name
89 Kallithea repository structures are kept in directories with the same name
90 as the project. When using repository groups, each group is a subdirectory.
90 as the project. When using repository groups, each group is a subdirectory.
91 This allows you to easily use ssh for accessing repositories.
91 This allows you to easily use ssh for accessing repositories.
92
92
93 In order to use ssh you need to make sure that your web-server and the users
93 In order to use ssh you need to make sure that your web-server and the users
94 login accounts have the correct permissions set on the appropriate directories.
94 login accounts have the correct permissions set on the appropriate directories.
95 (Note that these permissions are independent of any permissions you have set up
95 (Note that these permissions are independent of any permissions you have set up
96 using the Kallithea web interface.)
96 using the Kallithea web interface.)
97
97
98 If your main directory (the same as set in Kallithea settings) is for example
98 If your main directory (the same as set in Kallithea settings) is for example
99 set to **/home/hg** and the repository you are using is named `kallithea`, then
99 set to **/home/hg** and the repository you are using is named `kallithea`, then
100 to clone via ssh you should run::
100 to clone via ssh you should run::
101
101
102 hg clone ssh://user@server.com/home/hg/kallithea
102 hg clone ssh://user@server.com/home/hg/kallithea
103
103
104 Using other external tools such as mercurial-server_ or using ssh key based
104 Using other external tools such as mercurial-server_ or using ssh key based
105 authentication is fully supported.
105 authentication is fully supported.
106
106
107 Note: In an advanced setup, in order for your ssh access to use the same
107 Note: In an advanced setup, in order for your ssh access to use the same
108 permissions as set up via the Kallithea web interface, you can create an
108 permissions as set up via the Kallithea web interface, you can create an
109 authentication hook to connect to the Kallithea db and runs check functions for
109 authentication hook to connect to the Kallithea db and runs check functions for
110 permissions against that.
110 permissions against that.
111
111
112 Setting up Whoosh full text search
112 Setting up Whoosh full text search
113 ----------------------------------
113 ----------------------------------
114
114
115 Starting from version 1.1 the whoosh index can be build by using the paster
115 Starting from version 1.1 the whoosh index can be build by using the paster
116 command ``make-index``. To use ``make-index`` you must specify the configuration
116 command ``make-index``. To use ``make-index`` you must specify the configuration
117 file that stores the location of the index. You may specify the location of the
117 file that stores the location of the index. You may specify the location of the
118 repositories (`--repo-location`). If not specified, this value is retrieved
118 repositories (`--repo-location`). If not specified, this value is retrieved
119 from the Kallithea database. This was required prior to 1.2. Starting from
119 from the Kallithea database. This was required prior to 1.2. Starting from
120 version 1.2 it is also possible to specify a comma separated list of
120 version 1.2 it is also possible to specify a comma separated list of
121 repositories (`--index-only`) to build index only on chooses repositories
121 repositories (`--index-only`) to build index only on chooses repositories
122 skipping any other found in repos location
122 skipping any other found in repos location
123
123
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
125 the `-f` option, indexing will run always in "incremental" mode.
125 the `-f` option, indexing will run always in "incremental" mode.
126
126
127 For an incremental index build use::
127 For an incremental index build use::
128
128
129 paster make-index production.ini
129 paster make-index production.ini
130
130
131 For a full index rebuild use::
131 For a full index rebuild use::
132
132
133 paster make-index production.ini -f
133 paster make-index production.ini -f
134
134
135
135
136 building index just for chosen repositories is possible with such command::
136 building index just for chosen repositories is possible with such command::
137
137
138 paster make-index production.ini --index-only=vcs,kallithea
138 paster make-index production.ini --index-only=vcs,kallithea
139
139
140
140
141 In order to do periodical index builds and keep your index always up to date.
141 In order to do periodical index builds and keep your index always up to date.
142 It's recommended to do a crontab entry for incremental indexing.
142 It's recommended to do a crontab entry for incremental indexing.
143 An example entry might look like this::
143 An example entry might look like this::
144
144
145 /path/to/python/bin/paster make-index /path/to/kallithea/production.ini
145 /path/to/python/bin/paster make-index /path/to/kallithea/production.ini
146
146
147 When using incremental mode (the default) whoosh will check the last
147 When using incremental mode (the default) whoosh will check the last
148 modification date of each file and add it to be reindexed if a newer file is
148 modification date of each file and add it to be reindexed if a newer file is
149 available. The indexing daemon checks for any removed files and removes them
149 available. The indexing daemon checks for any removed files and removes them
150 from index.
150 from index.
151
151
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
153 or in the admin panel you can check `build from scratch` flag.
153 or in the admin panel you can check `build from scratch` flag.
154
154
155
155
156 Setting up LDAP support
156 Setting up LDAP support
157 -----------------------
157 -----------------------
158
158
159 Kallithea starting from version 1.1 supports ldap authentication. In order
159 Kallithea starting from version 1.1 supports ldap authentication. In order
160 to use LDAP, you have to install the python-ldap_ package. This package is
160 to use LDAP, you have to install the python-ldap_ package. This package is
161 available via pypi, so you can install it by running
161 available via pypi, so you can install it by running
162
162
163 using easy_install::
163 using easy_install::
164
164
165 easy_install python-ldap
165 easy_install python-ldap
166
166
167 using pip::
167 using pip::
168
168
169 pip install python-ldap
169 pip install python-ldap
170
170
171 .. note::
171 .. note::
172 python-ldap requires some certain libs on your system, so before installing
172 python-ldap requires some certain libs on your system, so before installing
173 it check that you have at least `openldap`, and `sasl` libraries.
173 it check that you have at least `openldap`, and `sasl` libraries.
174
174
175 LDAP settings are located in admin->ldap section,
175 LDAP settings are located in admin->ldap section,
176
176
177 Here's a typical ldap setup::
177 Here's a typical ldap setup::
178
178
179 Connection settings
179 Connection settings
180 Enable LDAP = checked
180 Enable LDAP = checked
181 Host = host.example.org
181 Host = host.example.org
182 Port = 389
182 Port = 389
183 Account = <account>
183 Account = <account>
184 Password = <password>
184 Password = <password>
185 Connection Security = LDAPS connection
185 Connection Security = LDAPS connection
186 Certificate Checks = DEMAND
186 Certificate Checks = DEMAND
187
187
188 Search settings
188 Search settings
189 Base DN = CN=users,DC=host,DC=example,DC=org
189 Base DN = CN=users,DC=host,DC=example,DC=org
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
191 LDAP Search Scope = SUBTREE
191 LDAP Search Scope = SUBTREE
192
192
193 Attribute mappings
193 Attribute mappings
194 Login Attribute = uid
194 Login Attribute = uid
195 First Name Attribute = firstName
195 First Name Attribute = firstName
196 Last Name Attribute = lastName
196 Last Name Attribute = lastName
197 E-mail Attribute = mail
197 E-mail Attribute = mail
198
198
199 If your user groups are placed in a Organisation Unit (OU) structure the Search Settings configuration differs::
199 If your user groups are placed in a Organisation Unit (OU) structure the Search Settings configuration differs::
200
200
201 Search settings
201 Search settings
202 Base DN = DC=host,DC=example,DC=org
202 Base DN = DC=host,DC=example,DC=org
203 LDAP Filter = (&(memberOf=CN=your user group,OU=subunit,OU=unit,DC=host,DC=example,DC=org)(objectClass=user))
203 LDAP Filter = (&(memberOf=CN=your user group,OU=subunit,OU=unit,DC=host,DC=example,DC=org)(objectClass=user))
204 LDAP Search Scope = SUBTREE
204 LDAP Search Scope = SUBTREE
205
205
206 .. _enable_ldap:
206 .. _enable_ldap:
207
207
208 Enable LDAP : required
208 Enable LDAP : required
209 Whether to use LDAP for authenticating users.
209 Whether to use LDAP for authenticating users.
210
210
211 .. _ldap_host:
211 .. _ldap_host:
212
212
213 Host : required
213 Host : required
214 LDAP server hostname or IP address. Can be also a comma separated
214 LDAP server hostname or IP address. Can be also a comma separated
215 list of servers to support LDAP fail-over.
215 list of servers to support LDAP fail-over.
216
216
217 .. _Port:
217 .. _Port:
218
218
219 Port : required
219 Port : required
220 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
220 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
221
221
222 .. _ldap_account:
222 .. _ldap_account:
223
223
224 Account : optional
224 Account : optional
225 Only required if the LDAP server does not allow anonymous browsing of
225 Only required if the LDAP server does not allow anonymous browsing of
226 records. This should be a special account for record browsing. This
226 records. This should be a special account for record browsing. This
227 will require `LDAP Password`_ below.
227 will require `LDAP Password`_ below.
228
228
229 .. _LDAP Password:
229 .. _LDAP Password:
230
230
231 Password : optional
231 Password : optional
232 Only required if the LDAP server does not allow anonymous browsing of
232 Only required if the LDAP server does not allow anonymous browsing of
233 records.
233 records.
234
234
235 .. _Enable LDAPS:
235 .. _Enable LDAPS:
236
236
237 Connection Security : required
237 Connection Security : required
238 Defines the connection to LDAP server
238 Defines the connection to LDAP server
239
239
240 No encryption
240 No encryption
241 Plain non encrypted connection
241 Plain non encrypted connection
242
242
243 LDAPS connection
243 LDAPS connection
244 Enable ldaps connection. It will likely require `Port`_ to be set to
244 Enable ldaps connection. It will likely require `Port`_ to be set to
245 a different value (standard LDAPS port is 636). When LDAPS is enabled
245 a different value (standard LDAPS port is 636). When LDAPS is enabled
246 then `Certificate Checks`_ is required.
246 then `Certificate Checks`_ is required.
247
247
248 START_TLS on LDAP connection
248 START_TLS on LDAP connection
249 START TLS connection
249 START TLS connection
250
250
251 .. _Certificate Checks:
251 .. _Certificate Checks:
252
252
253 Certificate Checks : optional
253 Certificate Checks : optional
254 How SSL certificates verification is handled - this is only useful when
254 How SSL certificates verification is handled - this is only useful when
255 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
255 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
256 while the other options are susceptible to man-in-the-middle attacks. SSL
256 while the other options are susceptible to man-in-the-middle attacks. SSL
257 certificates can be installed to /etc/openldap/cacerts so that the
257 certificates can be installed to /etc/openldap/cacerts so that the
258 DEMAND or HARD options can be used with self-signed certificates or
258 DEMAND or HARD options can be used with self-signed certificates or
259 certificates that do not have traceable certificates of authority.
259 certificates that do not have traceable certificates of authority.
260
260
261 NEVER
261 NEVER
262 A serve certificate will never be requested or checked.
262 A serve certificate will never be requested or checked.
263
263
264 ALLOW
264 ALLOW
265 A server certificate is requested. Failure to provide a
265 A server certificate is requested. Failure to provide a
266 certificate or providing a bad certificate will not terminate the
266 certificate or providing a bad certificate will not terminate the
267 session.
267 session.
268
268
269 TRY
269 TRY
270 A server certificate is requested. Failure to provide a
270 A server certificate is requested. Failure to provide a
271 certificate does not halt the session; providing a bad certificate
271 certificate does not halt the session; providing a bad certificate
272 halts the session.
272 halts the session.
273
273
274 DEMAND
274 DEMAND
275 A server certificate is requested and must be provided and
275 A server certificate is requested and must be provided and
276 authenticated for the session to proceed.
276 authenticated for the session to proceed.
277
277
278 HARD
278 HARD
279 The same as DEMAND.
279 The same as DEMAND.
280
280
281 .. _Base DN:
281 .. _Base DN:
282
282
283 Base DN : required
283 Base DN : required
284 The Distinguished Name (DN) where searches for users will be performed.
284 The Distinguished Name (DN) where searches for users will be performed.
285 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
285 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
286
286
287 .. _LDAP Filter:
287 .. _LDAP Filter:
288
288
289 LDAP Filter : optional
289 LDAP Filter : optional
290 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
290 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
291 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
291 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
292 which LDAP objects are identified as representing Users for
292 which LDAP objects are identified as representing Users for
293 authentication. The filter is augmented by `Login Attribute`_ below.
293 authentication. The filter is augmented by `Login Attribute`_ below.
294 This can commonly be left blank.
294 This can commonly be left blank.
295
295
296 .. _LDAP Search Scope:
296 .. _LDAP Search Scope:
297
297
298 LDAP Search Scope : required
298 LDAP Search Scope : required
299 This limits how far LDAP will search for a matching object.
299 This limits how far LDAP will search for a matching object.
300
300
301 BASE
301 BASE
302 Only allows searching of `Base DN`_ and is usually not what you
302 Only allows searching of `Base DN`_ and is usually not what you
303 want.
303 want.
304
304
305 ONELEVEL
305 ONELEVEL
306 Searches all entries under `Base DN`_, but not Base DN itself.
306 Searches all entries under `Base DN`_, but not Base DN itself.
307
307
308 SUBTREE
308 SUBTREE
309 Searches all entries below `Base DN`_, but not Base DN itself.
309 Searches all entries below `Base DN`_, but not Base DN itself.
310 When using SUBTREE `LDAP Filter`_ is useful to limit object
310 When using SUBTREE `LDAP Filter`_ is useful to limit object
311 location.
311 location.
312
312
313 .. _Login Attribute:
313 .. _Login Attribute:
314
314
315 Login Attribute : required
315 Login Attribute : required
316 The LDAP record attribute that will be matched as the USERNAME or
316 The LDAP record attribute that will be matched as the USERNAME or
317 ACCOUNT used to connect to Kallithea. This will be added to `LDAP
317 ACCOUNT used to connect to Kallithea. This will be added to `LDAP
318 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
318 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
319 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
319 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
320 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
320 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
321 ::
321 ::
322
322
323 (&(LDAPFILTER)(uid=jsmith))
323 (&(LDAPFILTER)(uid=jsmith))
324
324
325 .. _ldap_attr_firstname:
325 .. _ldap_attr_firstname:
326
326
327 First Name Attribute : required
327 First Name Attribute : required
328 The LDAP record attribute which represents the user's first name.
328 The LDAP record attribute which represents the user's first name.
329
329
330 .. _ldap_attr_lastname:
330 .. _ldap_attr_lastname:
331
331
332 Last Name Attribute : required
332 Last Name Attribute : required
333 The LDAP record attribute which represents the user's last name.
333 The LDAP record attribute which represents the user's last name.
334
334
335 .. _ldap_attr_email:
335 .. _ldap_attr_email:
336
336
337 Email Attribute : required
337 Email Attribute : required
338 The LDAP record attribute which represents the user's email address.
338 The LDAP record attribute which represents the user's email address.
339
339
340 If all data are entered correctly, and python-ldap_ is properly installed
340 If all data are entered correctly, and python-ldap_ is properly installed
341 users should be granted access to Kallithea with ldap accounts. At this
341 users should be granted access to Kallithea with ldap accounts. At this
342 time user information is copied from LDAP into the Kallithea user database.
342 time user information is copied from LDAP into the Kallithea user database.
343 This means that updates of an LDAP user object may not be reflected as a
343 This means that updates of an LDAP user object may not be reflected as a
344 user update in Kallithea.
344 user update in Kallithea.
345
345
346 If You have problems with LDAP access and believe You entered correct
346 If You have problems with LDAP access and believe You entered correct
347 information check out the Kallithea logs, any error messages sent from LDAP
347 information check out the Kallithea logs, any error messages sent from LDAP
348 will be saved there.
348 will be saved there.
349
349
350 Active Directory
350 Active Directory
351 ''''''''''''''''
351 ''''''''''''''''
352
352
353 Kallithea can use Microsoft Active Directory for user authentication. This
353 Kallithea can use Microsoft Active Directory for user authentication. This
354 is done through an LDAP or LDAPS connection to Active Directory. The
354 is done through an LDAP or LDAPS connection to Active Directory. The
355 following LDAP configuration settings are typical for using Active
355 following LDAP configuration settings are typical for using Active
356 Directory ::
356 Directory ::
357
357
358 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
358 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
359 Login Attribute = sAMAccountName
359 Login Attribute = sAMAccountName
360 First Name Attribute = givenName
360 First Name Attribute = givenName
361 Last Name Attribute = sn
361 Last Name Attribute = sn
362 E-mail Attribute = mail
362 E-mail Attribute = mail
363
363
364 All other LDAP settings will likely be site-specific and should be
364 All other LDAP settings will likely be site-specific and should be
365 appropriately configured.
365 appropriately configured.
366
366
367
367
368 Authentication by container or reverse-proxy
368 Authentication by container or reverse-proxy
369 --------------------------------------------
369 --------------------------------------------
370
370
371 Starting with version 1.3, Kallithea supports delegating the authentication
371 Kallithea supports delegating the authentication
372 of users to its WSGI container, or to a reverse-proxy server through which all
372 of users to its WSGI container, or to a reverse-proxy server through which all
373 clients access the application.
373 clients access the application.
374
374
375 When these authentication methods are enabled in Kallithea, it uses the
375 When these authentication methods are enabled in Kallithea, it uses the
376 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
376 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
377 perform the authentication itself. The authorization, however, is still done by
377 perform the authentication itself. The authorization, however, is still done by
378 Kallithea according to its settings.
378 Kallithea according to its settings.
379
379
380 When a user logs in for the first time using these authentication methods,
380 When a user logs in for the first time using these authentication methods,
381 a matching user account is created in Kallithea with default permissions. An
381 a matching user account is created in Kallithea with default permissions. An
382 administrator can then modify it using Kallithea's admin interface.
382 administrator can then modify it using Kallithea's admin interface.
383 It's also possible for an administrator to create accounts and configure their
383 It's also possible for an administrator to create accounts and configure their
384 permissions before the user logs in for the first time.
384 permissions before the user logs in for the first time.
385
385
386
386 Container-based authentication
387 Container-based authentication
387 ''''''''''''''''''''''''''''''
388 ''''''''''''''''''''''''''''''
388
389
389 In a container-based authentication setup, Kallithea reads the user name from
390 In a container-based authentication setup, Kallithea reads the user name from
390 the ``REMOTE_USER`` server variable provided by the WSGI container.
391 the ``REMOTE_USER`` server variable provided by the WSGI container.
391
392
392 After setting up your container (see `Apache's WSGI config`_), you'd need
393 After setting up your container (see `Apache's WSGI config`_), you'd need
393 to configure it to require authentication on the location configured for
394 to configure it to require authentication on the location configured for
394 Kallithea.
395 Kallithea.
395
396
396 In order for Kallithea to start using the provided username, you should set the
397 following in the [app:main] section of your .ini file::
398
399 container_auth_enabled = true
400
401
397
402 Proxy pass-through authentication
398 Proxy pass-through authentication
403 '''''''''''''''''''''''''''''''''
399 '''''''''''''''''''''''''''''''''
404
400
405 In a proxy pass-through authentication setup, Kallithea reads the user name
401 In a proxy pass-through authentication setup, Kallithea reads the user name
406 from the ``X-Forwarded-User`` request header, which should be configured to be
402 from the ``X-Forwarded-User`` request header, which should be configured to be
407 sent by the reverse-proxy server.
403 sent by the reverse-proxy server.
408
404
409 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
405 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
410 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
406 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
411 configure the authentication and add the username in a request header named
407 configure the authentication and add the username in a request header named
412 ``X-Forwarded-User``.
408 ``X-Forwarded-User``.
413
409
414 For example, the following config section for Apache sets a subdirectory in a
410 For example, the following config section for Apache sets a subdirectory in a
415 reverse-proxy setup with basic auth::
411 reverse-proxy setup with basic auth::
416
412
417 <Location /<someprefix> >
413 <Location /<someprefix> >
418 ProxyPass http://127.0.0.1:5000/<someprefix>
414 ProxyPass http://127.0.0.1:5000/<someprefix>
419 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
415 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
420 SetEnvIf X-Url-Scheme https HTTPS=1
416 SetEnvIf X-Url-Scheme https HTTPS=1
421
417
422 AuthType Basic
418 AuthType Basic
423 AuthName "Kallithea authentication"
419 AuthName "Kallithea authentication"
424 AuthUserFile /home/web/kallithea/.htpasswd
420 AuthUserFile /home/web/kallithea/.htpasswd
425 require valid-user
421 require valid-user
426
422
427 RequestHeader unset X-Forwarded-User
423 RequestHeader unset X-Forwarded-User
428
424
429 RewriteEngine On
425 RewriteEngine On
430 RewriteCond %{LA-U:REMOTE_USER} (.+)
426 RewriteCond %{LA-U:REMOTE_USER} (.+)
431 RewriteRule .* - [E=RU:%1]
427 RewriteRule .* - [E=RU:%1]
432 RequestHeader set X-Forwarded-User %{RU}e
428 RequestHeader set X-Forwarded-User %{RU}e
433 </Location>
429 </Location>
434
430
435 In order for Kallithea to start using the forwarded username, you should set
436 the following in the [app:main] section of your .ini file::
437
438 proxypass_auth_enabled = true
439
431
440 .. note::
432 .. note::
441 If you enable proxy pass-through authentication, make sure your server is
433 If you enable proxy pass-through authentication, make sure your server is
442 only accessible through the proxy. Otherwise, any client would be able to
434 only accessible through the proxy. Otherwise, any client would be able to
443 forge the authentication header and could effectively become authenticated
435 forge the authentication header and could effectively become authenticated
444 using any account of their liking.
436 using any account of their liking.
445
437
446 Integration with Issue trackers
438 Integration with Issue trackers
447 -------------------------------
439 -------------------------------
448
440
449 Kallithea provides a simple integration with issue trackers. It's possible
441 Kallithea provides a simple integration with issue trackers. It's possible
450 to define a regular expression that will fetch issue id stored in commit
442 to define a regular expression that will fetch issue id stored in commit
451 messages and replace that with an url to this issue. To enable this simply
443 messages and replace that with an url to this issue. To enable this simply
452 uncomment following variables in the ini file::
444 uncomment following variables in the ini file::
453
445
454 issue_pat = (?:^#|\s#)(\w+)
446 issue_pat = (?:^#|\s#)(\w+)
455 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
447 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
456 issue_prefix = #
448 issue_prefix = #
457
449
458 `issue_pat` is the regular expression that will fetch issues from commit messages.
450 `issue_pat` is the regular expression that will fetch issues from commit messages.
459 Default regex will match issues in format of #<number> eg. #300.
451 Default regex will match issues in format of #<number> eg. #300.
460
452
461 Matched issues will be replace with the link specified as `issue_server_link`
453 Matched issues will be replace with the link specified as `issue_server_link`
462 {id} will be replaced with issue id, and {repo} with repository name.
454 {id} will be replaced with issue id, and {repo} with repository name.
463 Since the # is striped `issue_prefix` is added as a prefix to url.
455 Since the # is striped `issue_prefix` is added as a prefix to url.
464 `issue_prefix` can be something different than # if you pass
456 `issue_prefix` can be something different than # if you pass
465 ISSUE- as issue prefix this will generate an url in format::
457 ISSUE- as issue prefix this will generate an url in format::
466
458
467 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
459 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
468
460
469 Hook management
461 Hook management
470 ---------------
462 ---------------
471
463
472 Hooks can be managed in similar way to this used in .hgrc files.
464 Hooks can be managed in similar way to this used in .hgrc files.
473 To access hooks setting click `advanced setup` on Hooks section of Mercurial
465 To access hooks setting click `advanced setup` on Hooks section of Mercurial
474 Settings in Admin.
466 Settings in Admin.
475
467
476 There are 4 built in hooks that cannot be changed (only enable/disable by
468 There are 4 built in hooks that cannot be changed (only enable/disable by
477 checkboxes on previos section).
469 checkboxes on previos section).
478 To add another custom hook simply fill in first section with
470 To add another custom hook simply fill in first section with
479 <name>.<hook_type> and the second one with hook path. Example hooks
471 <name>.<hook_type> and the second one with hook path. Example hooks
480 can be found at *kallithea.lib.hooks*.
472 can be found at *kallithea.lib.hooks*.
481
473
482
474
483 Changing default encoding
475 Changing default encoding
484 -------------------------
476 -------------------------
485
477
486 By default Kallithea uses utf8 encoding, starting from 1.3 series this
478 By default Kallithea uses utf8 encoding, starting from 1.3 series this
487 can be changed, simply edit default_encoding in .ini file to desired one.
479 can be changed, simply edit default_encoding in .ini file to desired one.
488 This affects many parts in Kallithea including committers names, filenames,
480 This affects many parts in Kallithea including committers names, filenames,
489 encoding of commit messages. In addition Kallithea can detect if `chardet`
481 encoding of commit messages. In addition Kallithea can detect if `chardet`
490 library is installed. If `chardet` is detected Kallithea will fallback to it
482 library is installed. If `chardet` is detected Kallithea will fallback to it
491 when there are encode/decode errors.
483 when there are encode/decode errors.
492
484
493
485
494 Setting Up Celery
486 Setting Up Celery
495 -----------------
487 -----------------
496
488
497 Since version 1.1 celery is configured by the Kallithea ini configuration files.
489 Since version 1.1 celery is configured by the Kallithea ini configuration files.
498 Simply set use_celery=true in the ini file then add / change the configuration
490 Simply set use_celery=true in the ini file then add / change the configuration
499 variables inside the ini file.
491 variables inside the ini file.
500
492
501 Remember that the ini files use the format with '.' not with '_' like celery.
493 Remember that the ini files use the format with '.' not with '_' like celery.
502 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
494 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
503 the config file.
495 the config file.
504
496
505 In order to start using celery run::
497 In order to start using celery run::
506
498
507 paster celeryd <configfile.ini>
499 paster celeryd <configfile.ini>
508
500
509
501
510 .. note::
502 .. note::
511 Make sure you run this command from the same virtualenv, and with the same
503 Make sure you run this command from the same virtualenv, and with the same
512 user that Kallithea runs.
504 user that Kallithea runs.
513
505
514 HTTPS support
506 HTTPS support
515 -------------
507 -------------
516
508
517 Kallithea will by default generate URLs based on the WSGI environment.
509 Kallithea will by default generate URLs based on the WSGI environment.
518
510
519 Alternatively, you can use some special configuration settings to control
511 Alternatively, you can use some special configuration settings to control
520 directly which scheme/protocol Kallithea will use when generating URLs:
512 directly which scheme/protocol Kallithea will use when generating URLs:
521
513
522 - With `https_fixup = true`, the scheme will be taken from the HTTP_X_URL_SCHEME,
514 - With `https_fixup = true`, the scheme will be taken from the HTTP_X_URL_SCHEME,
523 HTTP_X_FORWARDED_SCHEME or HTTP_X_FORWARDED_PROTO HTTP header (default 'http').
515 HTTP_X_FORWARDED_SCHEME or HTTP_X_FORWARDED_PROTO HTTP header (default 'http').
524 - With `force_https = true` the default will be 'https'.
516 - With `force_https = true` the default will be 'https'.
525 - With `use_htsts = true`, it will set Strict-Transport-Security when using https.
517 - With `use_htsts = true`, it will set Strict-Transport-Security when using https.
526
518
527 Nginx virtual host example
519 Nginx virtual host example
528 --------------------------
520 --------------------------
529
521
530 Sample config for nginx using proxy::
522 Sample config for nginx using proxy::
531
523
532 upstream rc {
524 upstream rc {
533 server 127.0.0.1:5000;
525 server 127.0.0.1:5000;
534 # add more instances for load balancing
526 # add more instances for load balancing
535 #server 127.0.0.1:5001;
527 #server 127.0.0.1:5001;
536 #server 127.0.0.1:5002;
528 #server 127.0.0.1:5002;
537 }
529 }
538
530
539 ## gist alias
531 ## gist alias
540 server {
532 server {
541 listen 443;
533 listen 443;
542 server_name gist.myserver.com;
534 server_name gist.myserver.com;
543 access_log /var/log/nginx/gist.access.log;
535 access_log /var/log/nginx/gist.access.log;
544 error_log /var/log/nginx/gist.error.log;
536 error_log /var/log/nginx/gist.error.log;
545
537
546 ssl on;
538 ssl on;
547 ssl_certificate gist.your.kallithea.server.crt;
539 ssl_certificate gist.your.kallithea.server.crt;
548 ssl_certificate_key gist.your.kallithea.server.key;
540 ssl_certificate_key gist.your.kallithea.server.key;
549
541
550 ssl_session_timeout 5m;
542 ssl_session_timeout 5m;
551
543
552 ssl_protocols SSLv3 TLSv1;
544 ssl_protocols SSLv3 TLSv1;
553 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
545 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
554 ssl_prefer_server_ciphers on;
546 ssl_prefer_server_ciphers on;
555
547
556 rewrite ^/(.+)$ https://your.kallithea.server/_admin/gists/$1;
548 rewrite ^/(.+)$ https://your.kallithea.server/_admin/gists/$1;
557 rewrite (.*) https://your.kallithea.server/_admin/gists;
549 rewrite (.*) https://your.kallithea.server/_admin/gists;
558 }
550 }
559
551
560 server {
552 server {
561 listen 443;
553 listen 443;
562 server_name your.kallithea.server;
554 server_name your.kallithea.server;
563 access_log /var/log/nginx/kallithea.access.log;
555 access_log /var/log/nginx/kallithea.access.log;
564 error_log /var/log/nginx/kallithea.error.log;
556 error_log /var/log/nginx/kallithea.error.log;
565
557
566 ssl on;
558 ssl on;
567 ssl_certificate your.kallithea.server.crt;
559 ssl_certificate your.kallithea.server.crt;
568 ssl_certificate_key your.kallithea.server.key;
560 ssl_certificate_key your.kallithea.server.key;
569
561
570 ssl_session_timeout 5m;
562 ssl_session_timeout 5m;
571
563
572 ssl_protocols SSLv3 TLSv1;
564 ssl_protocols SSLv3 TLSv1;
573 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
565 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
574 ssl_prefer_server_ciphers on;
566 ssl_prefer_server_ciphers on;
575
567
576 ## uncomment root directive if you want to serve static files by nginx
568 ## uncomment root directive if you want to serve static files by nginx
577 ## requires static_files = false in .ini file
569 ## requires static_files = false in .ini file
578 #root /path/to/installation/kallithea/public;
570 #root /path/to/installation/kallithea/public;
579 include /etc/nginx/proxy.conf;
571 include /etc/nginx/proxy.conf;
580 location / {
572 location / {
581 try_files $uri @rhode;
573 try_files $uri @rhode;
582 }
574 }
583
575
584 location @rhode {
576 location @rhode {
585 proxy_pass http://rc;
577 proxy_pass http://rc;
586 }
578 }
587
579
588 }
580 }
589
581
590 Here's the proxy.conf. It's tuned so it will not timeout on long
582 Here's the proxy.conf. It's tuned so it will not timeout on long
591 pushes or large pushes::
583 pushes or large pushes::
592
584
593 proxy_redirect off;
585 proxy_redirect off;
594 proxy_set_header Host $host;
586 proxy_set_header Host $host;
595 ## needed for container auth
587 ## needed for container auth
596 #proxy_set_header REMOTE_USER $remote_user;
588 #proxy_set_header REMOTE_USER $remote_user;
597 #proxy_set_header X-Forwarded-User $remote_user;
589 #proxy_set_header X-Forwarded-User $remote_user;
598 proxy_set_header X-Url-Scheme $scheme;
590 proxy_set_header X-Url-Scheme $scheme;
599 proxy_set_header X-Host $http_host;
591 proxy_set_header X-Host $http_host;
600 proxy_set_header X-Real-IP $remote_addr;
592 proxy_set_header X-Real-IP $remote_addr;
601 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
593 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
602 proxy_set_header Proxy-host $proxy_host;
594 proxy_set_header Proxy-host $proxy_host;
603 proxy_buffering off;
595 proxy_buffering off;
604 proxy_connect_timeout 7200;
596 proxy_connect_timeout 7200;
605 proxy_send_timeout 7200;
597 proxy_send_timeout 7200;
606 proxy_read_timeout 7200;
598 proxy_read_timeout 7200;
607 proxy_buffers 8 32k;
599 proxy_buffers 8 32k;
608 client_max_body_size 1024m;
600 client_max_body_size 1024m;
609 client_body_buffer_size 128k;
601 client_body_buffer_size 128k;
610 large_client_header_buffers 8 64k;
602 large_client_header_buffers 8 64k;
611
603
612
604
613 Apache virtual host reverse proxy example
605 Apache virtual host reverse proxy example
614 -----------------------------------------
606 -----------------------------------------
615
607
616 Here is a sample configuration file for apache using proxy::
608 Here is a sample configuration file for apache using proxy::
617
609
618 <VirtualHost *:80>
610 <VirtualHost *:80>
619 ServerName hg.myserver.com
611 ServerName hg.myserver.com
620 ServerAlias hg.myserver.com
612 ServerAlias hg.myserver.com
621
613
622 <Proxy *>
614 <Proxy *>
623 Order allow,deny
615 Order allow,deny
624 Allow from all
616 Allow from all
625 </Proxy>
617 </Proxy>
626
618
627 #important !
619 #important !
628 #Directive to properly generate url (clone url) for pylons
620 #Directive to properly generate url (clone url) for pylons
629 ProxyPreserveHost On
621 ProxyPreserveHost On
630
622
631 #kallithea instance
623 #kallithea instance
632 ProxyPass / http://127.0.0.1:5000/
624 ProxyPass / http://127.0.0.1:5000/
633 ProxyPassReverse / http://127.0.0.1:5000/
625 ProxyPassReverse / http://127.0.0.1:5000/
634
626
635 #to enable https use line below
627 #to enable https use line below
636 #SetEnvIf X-Url-Scheme https HTTPS=1
628 #SetEnvIf X-Url-Scheme https HTTPS=1
637
629
638 </VirtualHost>
630 </VirtualHost>
639
631
640
632
641 Additional tutorial
633 Additional tutorial
642 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
634 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
643
635
644
636
645 Apache as subdirectory
637 Apache as subdirectory
646 ----------------------
638 ----------------------
647
639
648 Apache subdirectory part::
640 Apache subdirectory part::
649
641
650 <Location /<someprefix> >
642 <Location /<someprefix> >
651 ProxyPass http://127.0.0.1:5000/<someprefix>
643 ProxyPass http://127.0.0.1:5000/<someprefix>
652 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
644 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
653 SetEnvIf X-Url-Scheme https HTTPS=1
645 SetEnvIf X-Url-Scheme https HTTPS=1
654 </Location>
646 </Location>
655
647
656 Besides the regular apache setup you will need to add the following line
648 Besides the regular apache setup you will need to add the following line
657 into [app:main] section of your .ini file::
649 into [app:main] section of your .ini file::
658
650
659 filter-with = proxy-prefix
651 filter-with = proxy-prefix
660
652
661 Add the following at the end of the .ini file::
653 Add the following at the end of the .ini file::
662
654
663 [filter:proxy-prefix]
655 [filter:proxy-prefix]
664 use = egg:PasteDeploy#prefix
656 use = egg:PasteDeploy#prefix
665 prefix = /<someprefix>
657 prefix = /<someprefix>
666
658
667
659
668 then change <someprefix> into your chosen prefix
660 then change <someprefix> into your chosen prefix
669
661
670 Apache's WSGI config
662 Apache's WSGI config
671 --------------------
663 --------------------
672
664
673 Alternatively, Kallithea can be set up with Apache under mod_wsgi. For
665 Alternatively, Kallithea can be set up with Apache under mod_wsgi. For
674 that, you'll need to:
666 that, you'll need to:
675
667
676 - Install mod_wsgi. If using a Debian-based distro, you can install
668 - Install mod_wsgi. If using a Debian-based distro, you can install
677 the package libapache2-mod-wsgi::
669 the package libapache2-mod-wsgi::
678
670
679 aptitude install libapache2-mod-wsgi
671 aptitude install libapache2-mod-wsgi
680
672
681 - Enable mod_wsgi::
673 - Enable mod_wsgi::
682
674
683 a2enmod wsgi
675 a2enmod wsgi
684
676
685 - Create a wsgi dispatch script, like the one below. Make sure you
677 - Create a wsgi dispatch script, like the one below. Make sure you
686 check the paths correctly point to where you installed Kallithea
678 check the paths correctly point to where you installed Kallithea
687 and its Python Virtual Environment.
679 and its Python Virtual Environment.
688 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
680 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
689 as in the following example. Once again, check the paths are
681 as in the following example. Once again, check the paths are
690 correctly specified.
682 correctly specified.
691
683
692 Here is a sample excerpt from an Apache Virtual Host configuration file::
684 Here is a sample excerpt from an Apache Virtual Host configuration file::
693
685
694 WSGIDaemonProcess pylons \
686 WSGIDaemonProcess pylons \
695 threads=4 \
687 threads=4 \
696 python-path=/home/web/kallithea/pyenv/lib/python2.6/site-packages
688 python-path=/home/web/kallithea/pyenv/lib/python2.6/site-packages
697 WSGIScriptAlias / /home/web/kallithea/dispatch.wsgi
689 WSGIScriptAlias / /home/web/kallithea/dispatch.wsgi
698 WSGIPassAuthorization On
690 WSGIPassAuthorization On
699
691
700 .. note::
692 .. note::
701 when running apache as root please add: `user=www-data group=www-data`
693 when running apache as root please add: `user=www-data group=www-data`
702 into above configuration
694 into above configuration
703
695
704 .. note::
696 .. note::
705 Running Kallithea in multiprocess mode in apache is not supported,
697 Running Kallithea in multiprocess mode in apache is not supported,
706 make sure you don't specify `processes=num` directive in the config
698 make sure you don't specify `processes=num` directive in the config
707
699
708
700
709 Example wsgi dispatch script::
701 Example wsgi dispatch script::
710
702
711 import os
703 import os
712 os.environ["HGENCODING"] = "UTF-8"
704 os.environ["HGENCODING"] = "UTF-8"
713 os.environ['PYTHON_EGG_CACHE'] = '/home/web/kallithea/.egg-cache'
705 os.environ['PYTHON_EGG_CACHE'] = '/home/web/kallithea/.egg-cache'
714
706
715 # sometimes it's needed to set the curent dir
707 # sometimes it's needed to set the curent dir
716 os.chdir('/home/web/kallithea/')
708 os.chdir('/home/web/kallithea/')
717
709
718 import site
710 import site
719 site.addsitedir("/home/web/kallithea/pyenv/lib/python2.6/site-packages")
711 site.addsitedir("/home/web/kallithea/pyenv/lib/python2.6/site-packages")
720
712
721 from paste.deploy import loadapp
713 from paste.deploy import loadapp
722 from paste.script.util.logging_config import fileConfig
714 from paste.script.util.logging_config import fileConfig
723
715
724 fileConfig('/home/web/kallithea/production.ini')
716 fileConfig('/home/web/kallithea/production.ini')
725 application = loadapp('config:/home/web/kallithea/production.ini')
717 application = loadapp('config:/home/web/kallithea/production.ini')
726
718
727 Note: when using mod_wsgi you'll need to install the same version of
719 Note: when using mod_wsgi you'll need to install the same version of
728 Mercurial that's inside Kallithea's virtualenv also on the system's Python
720 Mercurial that's inside Kallithea's virtualenv also on the system's Python
729 environment.
721 environment.
730
722
731
723
732 Other configuration files
724 Other configuration files
733 -------------------------
725 -------------------------
734
726
735 Some example init.d scripts can be found in init.d directory::
727 Some example init.d scripts can be found in init.d directory::
736
728
737 https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
729 https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
738
730
739 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
731 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
740 .. _python: http://www.python.org/
732 .. _python: http://www.python.org/
741 .. _mercurial: http://mercurial.selenic.com/
733 .. _mercurial: http://mercurial.selenic.com/
742 .. _celery: http://celeryproject.org/
734 .. _celery: http://celeryproject.org/
743 .. _rabbitmq: http://www.rabbitmq.com/
735 .. _rabbitmq: http://www.rabbitmq.com/
744 .. _python-ldap: http://www.python-ldap.org/
736 .. _python-ldap: http://www.python-ldap.org/
745 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
737 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
746 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
738 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
747 .. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
739 .. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
@@ -1,609 +1,581 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%text>################################################################################
2 <%text>################################################################################
3 ################################################################################
3 ################################################################################
4 # Kallithea - config file generated with kallithea-config #
4 # Kallithea - config file generated with kallithea-config #
5 ################################################################################
5 ################################################################################
6 ################################################################################
6 ################################################################################
7 </%text>
7 </%text>
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 <%text>
11 <%text>
12 ################################################################################
12 ################################################################################
13 ## Uncomment and replace with the address which should receive ##
13 ## Uncomment and replace with the address which should receive ##
14 ## any error reports after application crash ##
14 ## any error reports after application crash ##
15 ## Additionally those settings will be used by Kallithea mailing system ##
15 ## Additionally those settings will be used by Kallithea mailing system ##
16 ################################################################################</%text>
16 ################################################################################</%text>
17 #email_to = admin@localhost
17 #email_to = admin@localhost
18 #error_email_from = paste_error@localhost
18 #error_email_from = paste_error@localhost
19 #app_email_from = kallithea-noreply@localhost
19 #app_email_from = kallithea-noreply@localhost
20 #error_message =
20 #error_message =
21 #email_prefix = [Kallithea]
21 #email_prefix = [Kallithea]
22
22
23 #smtp_server = mail.server.com
23 #smtp_server = mail.server.com
24 #smtp_username =
24 #smtp_username =
25 #smtp_password =
25 #smtp_password =
26 #smtp_port =
26 #smtp_port =
27 #smtp_use_tls = false
27 #smtp_use_tls = false
28 #smtp_use_ssl = true
28 #smtp_use_ssl = true
29 <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
29 <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
30 #smtp_auth =
30 #smtp_auth =
31
31
32 [server:main]
32 [server:main]
33 %if http_server == 'paste':
33 %if http_server == 'paste':
34 <%text>## PASTE ##</%text>
34 <%text>## PASTE ##</%text>
35 use = egg:Paste#http
35 use = egg:Paste#http
36 <%text>## nr of worker threads to spawn</%text>
36 <%text>## nr of worker threads to spawn</%text>
37 threadpool_workers = 5
37 threadpool_workers = 5
38 <%text>## max request before thread respawn</%text>
38 <%text>## max request before thread respawn</%text>
39 threadpool_max_requests = 10
39 threadpool_max_requests = 10
40 <%text>## option to use threads of process</%text>
40 <%text>## option to use threads of process</%text>
41 use_threadpool = true
41 use_threadpool = true
42 %endif
42 %endif
43 %if http_server == 'waitress':
43 %if http_server == 'waitress':
44 <%text>## WAITRESS ##</%text>
44 <%text>## WAITRESS ##</%text>
45 use = egg:waitress#main
45 use = egg:waitress#main
46 <%text>## number of worker threads</%text>
46 <%text>## number of worker threads</%text>
47 threads = 5
47 threads = 5
48 <%text>## MAX BODY SIZE 100GB</%text>
48 <%text>## MAX BODY SIZE 100GB</%text>
49 max_request_body_size = 107374182400
49 max_request_body_size = 107374182400
50 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
50 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
51 <%text>## windows systems.</%text>
51 <%text>## windows systems.</%text>
52 #asyncore_use_poll = True
52 #asyncore_use_poll = True
53 %endif
53 %endif
54 %if http_server == 'gunicorn':
54 %if http_server == 'gunicorn':
55 <%text>## GUNICORN ##</%text>
55 <%text>## GUNICORN ##</%text>
56 use = egg:gunicorn#main
56 use = egg:gunicorn#main
57 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
57 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
58 <%text>## is set to more than one worker</%text>
58 <%text>## is set to more than one worker</%text>
59 workers = 1
59 workers = 1
60 <%text>## process name</%text>
60 <%text>## process name</%text>
61 proc_name = kallithea
61 proc_name = kallithea
62 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
62 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
63 <%text>## recommended for bigger setup is using of of other than sync one</%text>
63 <%text>## recommended for bigger setup is using of of other than sync one</%text>
64 worker_class = sync
64 worker_class = sync
65 max_requests = 1000
65 max_requests = 1000
66 <%text>## ammount of time a worker can handle request before it gets killed and</%text>
66 <%text>## ammount of time a worker can handle request before it gets killed and</%text>
67 <%text>## restarted</%text>
67 <%text>## restarted</%text>
68 timeout = 3600
68 timeout = 3600
69 %endif
69 %endif
70 %if http_server == 'uwsgi':
70 %if http_server == 'uwsgi':
71 <%text>## UWSGI ##</%text>
71 <%text>## UWSGI ##</%text>
72 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
72 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
73 [uwsgi]
73 [uwsgi]
74 socket = /tmp/uwsgi.sock
74 socket = /tmp/uwsgi.sock
75 master = true
75 master = true
76 http = 127.0.0.1:5000
76 http = 127.0.0.1:5000
77
77
78 <%text>## set as deamon and redirect all output to file</%text>
78 <%text>## set as deamon and redirect all output to file</%text>
79 #daemonize = ./uwsgi_kallithea.log
79 #daemonize = ./uwsgi_kallithea.log
80
80
81 <%text>## master process PID</%text>
81 <%text>## master process PID</%text>
82 pidfile = ./uwsgi_kallithea.pid
82 pidfile = ./uwsgi_kallithea.pid
83
83
84 <%text>## stats server with workers statistics, use uwsgitop</%text>
84 <%text>## stats server with workers statistics, use uwsgitop</%text>
85 <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
85 <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
86 stats = 127.0.0.1:1717
86 stats = 127.0.0.1:1717
87 memory-report = true
87 memory-report = true
88
88
89 <%text>## log 5XX errors</%text>
89 <%text>## log 5XX errors</%text>
90 log-5xx = true
90 log-5xx = true
91
91
92 <%text>## Set the socket listen queue size.</%text>
92 <%text>## Set the socket listen queue size.</%text>
93 listen = 256
93 listen = 256
94
94
95 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
95 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
96 <%text>## (avoid memory leaks).</%text>
96 <%text>## (avoid memory leaks).</%text>
97 max-requests = 1000
97 max-requests = 1000
98
98
99 <%text>## enable large buffers</%text>
99 <%text>## enable large buffers</%text>
100 buffer-size=65535
100 buffer-size=65535
101
101
102 <%text>## socket and http timeouts ##</%text>
102 <%text>## socket and http timeouts ##</%text>
103 http-timeout=3600
103 http-timeout=3600
104 socket-timeout=3600
104 socket-timeout=3600
105
105
106 <%text>## Log requests slower than the specified number of milliseconds.</%text>
106 <%text>## Log requests slower than the specified number of milliseconds.</%text>
107 log-slow = 10
107 log-slow = 10
108
108
109 <%text>## Exit if no app can be loaded.</%text>
109 <%text>## Exit if no app can be loaded.</%text>
110 need-app = true
110 need-app = true
111
111
112 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
112 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
113 lazy = true
113 lazy = true
114
114
115 <%text>## scaling ##</%text>
115 <%text>## scaling ##</%text>
116 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
116 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
117 cheaper-algo = spare
117 cheaper-algo = spare
118
118
119 <%text>## minimum number of workers to keep at all times</%text>
119 <%text>## minimum number of workers to keep at all times</%text>
120 cheaper = 1
120 cheaper = 1
121
121
122 <%text>## number of workers to spawn at startup</%text>
122 <%text>## number of workers to spawn at startup</%text>
123 cheaper-initial = 1
123 cheaper-initial = 1
124
124
125 <%text>## maximum number of workers that can be spawned</%text>
125 <%text>## maximum number of workers that can be spawned</%text>
126 workers = 4
126 workers = 4
127
127
128 <%text>## how many workers should be spawned at a time</%text>
128 <%text>## how many workers should be spawned at a time</%text>
129 cheaper-step = 1
129 cheaper-step = 1
130 %endif
130 %endif
131 <%text>## COMMON ##</%text>
131 <%text>## COMMON ##</%text>
132 host = ${host}
132 host = ${host}
133 port = ${port}
133 port = ${port}
134
134
135 <%text>## prefix middleware for rc</%text>
135 <%text>## prefix middleware for rc</%text>
136 #[filter:proxy-prefix]
136 #[filter:proxy-prefix]
137 #use = egg:PasteDeploy#prefix
137 #use = egg:PasteDeploy#prefix
138 #prefix = /<your-prefix>
138 #prefix = /<your-prefix>
139
139
140 [app:main]
140 [app:main]
141 use = egg:kallithea
141 use = egg:kallithea
142 <%text>## enable proxy prefix middleware</%text>
142 <%text>## enable proxy prefix middleware</%text>
143 #filter-with = proxy-prefix
143 #filter-with = proxy-prefix
144
144
145 full_stack = true
145 full_stack = true
146 static_files = true
146 static_files = true
147 <%text>## Available Languages:</%text>
147 <%text>## Available Languages:</%text>
148 <%text>## de en fr ja pl pt_BR ru zh_CN zh_TW</%text>
148 <%text>## de en fr ja pl pt_BR ru zh_CN zh_TW</%text>
149 lang = ${lang}
149 lang = ${lang}
150 cache_dir = ${here}/data
150 cache_dir = ${here}/data
151 index_dir = ${here}/data/index
151 index_dir = ${here}/data/index
152
152
153 <%text>## perform a full repository scan on each server start, this should be</%text>
153 <%text>## perform a full repository scan on each server start, this should be</%text>
154 <%text>## set to false after first startup, to allow faster server restarts.</%text>
154 <%text>## set to false after first startup, to allow faster server restarts.</%text>
155 initial_repo_scan = false
155 initial_repo_scan = false
156
156
157 <%text>## uncomment and set this path to use archive download cache</%text>
157 <%text>## uncomment and set this path to use archive download cache</%text>
158 archive_cache_dir = ${here}/tarballcache
158 archive_cache_dir = ${here}/tarballcache
159
159
160 <%text>## change this to unique ID for security</%text>
160 <%text>## change this to unique ID for security</%text>
161 app_instance_uuid = ${uuid()}
161 app_instance_uuid = ${uuid()}
162
162
163 <%text>## cut off limit for large diffs (size in bytes)</%text>
163 <%text>## cut off limit for large diffs (size in bytes)</%text>
164 cut_off_limit = 256000
164 cut_off_limit = 256000
165
165
166 <%text>## use cache version of scm repo everywhere</%text>
166 <%text>## use cache version of scm repo everywhere</%text>
167 vcs_full_cache = true
167 vcs_full_cache = true
168
168
169 <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
169 <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
170 force_https = false
170 force_https = false
171
171
172 <%text>## use Strict-Transport-Security headers</%text>
172 <%text>## use Strict-Transport-Security headers</%text>
173 use_htsts = false
173 use_htsts = false
174
174
175 <%text>## number of commits stats will parse on each iteration</%text>
175 <%text>## number of commits stats will parse on each iteration</%text>
176 commit_parse_limit = 25
176 commit_parse_limit = 25
177
177
178 <%text>## use gravatar service to display avatars</%text>
179 use_gravatar = true
180
181 <%text>## path to git executable</%text>
178 <%text>## path to git executable</%text>
182 git_path = git
179 git_path = git
183
180
184 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
181 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
185 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
182 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
186 #git_rev_filter = --branches --tags
183 #git_rev_filter = --branches --tags
187
184
188 <%text>## RSS feed options</%text>
185 <%text>## RSS feed options</%text>
189 rss_cut_off_limit = 256000
186 rss_cut_off_limit = 256000
190 rss_items_per_page = 10
187 rss_items_per_page = 10
191 rss_include_diff = false
188 rss_include_diff = false
192
189
193 <%text>## options for showing and identifying changesets</%text>
190 <%text>## options for showing and identifying changesets</%text>
194 show_sha_length = 12
191 show_sha_length = 12
195 show_revision_number = true
192 show_revision_number = true
196
193
197 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
194 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
198 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
195 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
199 <%text>## example: http://gist.kallithea.server/{gistid}. Empty means use the internal</%text>
196 <%text>## example: http://gist.kallithea.server/{gistid}. Empty means use the internal</%text>
200 <%text>## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid></%text>
197 <%text>## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid></%text>
201 gist_alias_url =
198 gist_alias_url =
202
199
203 <%text>## white list of API enabled controllers. This allows to add list of</%text>
200 <%text>## white list of API enabled controllers. This allows to add list of</%text>
204 <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text>
201 <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text>
205 <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
202 <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
206 <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
203 <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
207 <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
204 <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
208 <%text>## Recommended settings below are commented out:</%text>
205 <%text>## Recommended settings below are commented out:</%text>
209 api_access_controllers_whitelist =
206 api_access_controllers_whitelist =
210 # ChangesetController:changeset_patch,
207 # ChangesetController:changeset_patch,
211 # ChangesetController:changeset_raw,
208 # ChangesetController:changeset_raw,
212 # FilesController:raw,
209 # FilesController:raw,
213 # FilesController:archivefile
210 # FilesController:archivefile
214
211
215 <%text>## alternative_gravatar_url allows you to use your own avatar server application</%text>
216 <%text>## the following parts of the URL will be replaced</%text>
217 <%text>## {email} user email</%text>
218 <%text>## {md5email} md5 hash of the user email (like at gravatar.com)</%text>
219 <%text>## {size} size of the image that is expected from the server application</%text>
220 <%text>## {scheme} http/https from Kallithea server</%text>
221 <%text>## {netloc} network location from Kallithea server</%text>
222 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
223 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
224
225
226 <%text>## container auth options</%text>
227 container_auth_enabled = false
228 proxypass_auth_enabled = false
229
230 <%text>## default encoding used to convert from and to unicode</%text>
212 <%text>## default encoding used to convert from and to unicode</%text>
231 <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text>
213 <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text>
232 default_encoding = utf8
214 default_encoding = utf8
233
215
234 <%text>## overwrite schema of clone url</%text>
235 <%text>## available vars:</%text>
236 <%text>## scheme - http/https</%text>
237 <%text>## user - current user</%text>
238 <%text>## pass - password</%text>
239 <%text>## netloc - network location</%text>
240 <%text>## path - usually repo_name</%text>
241
242 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
243
244 <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
216 <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
245 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
217 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
246
218
247 <%text>## issue tracking mapping for commits messages</%text>
219 <%text>## issue tracking mapping for commits messages</%text>
248 <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
220 <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
249
221
250 <%text>## pattern to get the issues from commit messages</%text>
222 <%text>## pattern to get the issues from commit messages</%text>
251 <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text>
223 <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text>
252 <%text>## {id} will be all groups matched from this pattern</%text>
224 <%text>## {id} will be all groups matched from this pattern</%text>
253
225
254 issue_pat = (?:\s*#)(\d+)
226 issue_pat = (?:\s*#)(\d+)
255
227
256 <%text>## server url to the issue, each {id} will be replaced with match</%text>
228 <%text>## server url to the issue, each {id} will be replaced with match</%text>
257 <%text>## fetched from the regex and {repo} is replaced with full repository name</%text>
229 <%text>## fetched from the regex and {repo} is replaced with full repository name</%text>
258 <%text>## including groups {repo_name} is replaced with just name of repo</%text>
230 <%text>## including groups {repo_name} is replaced with just name of repo</%text>
259
231
260 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
232 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
261
233
262 <%text>## prefix to add to link to indicate it's an url</%text>
234 <%text>## prefix to add to link to indicate it's an url</%text>
263 <%text>## #314 will be replaced by <issue_prefix><id></%text>
235 <%text>## #314 will be replaced by <issue_prefix><id></%text>
264
236
265 issue_prefix = #
237 issue_prefix = #
266
238
267 <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
239 <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
268 <%text>## multiple patterns, to other issues server, wiki or others</%text>
240 <%text>## multiple patterns, to other issues server, wiki or others</%text>
269 <%text>## below an example how to create a wiki pattern</%text>
241 <%text>## below an example how to create a wiki pattern</%text>
270 # wiki-some-id -> https://mywiki.com/some-id
242 # wiki-some-id -> https://mywiki.com/some-id
271
243
272 #issue_pat_wiki = (?:wiki-)(.+)
244 #issue_pat_wiki = (?:wiki-)(.+)
273 #issue_server_link_wiki = https://mywiki.com/{id}
245 #issue_server_link_wiki = https://mywiki.com/{id}
274 #issue_prefix_wiki = WIKI-
246 #issue_prefix_wiki = WIKI-
275
247
276
248
277 <%text>## instance-id prefix</%text>
249 <%text>## instance-id prefix</%text>
278 <%text>## a prefix key for this instance used for cache invalidation when running</%text>
250 <%text>## a prefix key for this instance used for cache invalidation when running</%text>
279 <%text>## multiple instances of kallithea, make sure it's globally unique for</%text>
251 <%text>## multiple instances of kallithea, make sure it's globally unique for</%text>
280 <%text>## all running kallithea instances. Leave empty if you don't use it</%text>
252 <%text>## all running kallithea instances. Leave empty if you don't use it</%text>
281 instance_id =
253 instance_id =
282
254
283 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
255 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
284 <%text>## response is 401 HTTPUnauthorized. Currently HG clients have troubles with</%text>
256 <%text>## response is 401 HTTPUnauthorized. Currently HG clients have troubles with</%text>
285 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
257 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
286 auth_ret_code =
258 auth_ret_code =
287
259
288 <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
260 <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
289 <%text>## codes don't break the transactions while 4XX codes do</%text>
261 <%text>## codes don't break the transactions while 4XX codes do</%text>
290 lock_ret_code = 423
262 lock_ret_code = 423
291
263
292 <%text>## allows to change the repository location in settings page</%text>
264 <%text>## allows to change the repository location in settings page</%text>
293 allow_repo_location_change = True
265 allow_repo_location_change = True
294
266
295 <%text>## allows to setup custom hooks in settings page</%text>
267 <%text>## allows to setup custom hooks in settings page</%text>
296 allow_custom_hooks_settings = True
268 allow_custom_hooks_settings = True
297
269
298 <%text>
270 <%text>
299 ####################################
271 ####################################
300 ### CELERY CONFIG ####
272 ### CELERY CONFIG ####
301 ####################################
273 ####################################
302 </%text>
274 </%text>
303 use_celery = false
275 use_celery = false
304 broker.host = localhost
276 broker.host = localhost
305 broker.vhost = rabbitmqhost
277 broker.vhost = rabbitmqhost
306 broker.port = 5672
278 broker.port = 5672
307 broker.user = rabbitmq
279 broker.user = rabbitmq
308 broker.password = qweqwe
280 broker.password = qweqwe
309
281
310 celery.imports = kallithea.lib.celerylib.tasks
282 celery.imports = kallithea.lib.celerylib.tasks
311
283
312 celery.result.backend = amqp
284 celery.result.backend = amqp
313 celery.result.dburi = amqp://
285 celery.result.dburi = amqp://
314 celery.result.serialier = json
286 celery.result.serialier = json
315
287
316 #celery.send.task.error.emails = true
288 #celery.send.task.error.emails = true
317 #celery.amqp.task.result.expires = 18000
289 #celery.amqp.task.result.expires = 18000
318
290
319 celeryd.concurrency = 2
291 celeryd.concurrency = 2
320 #celeryd.log.file = celeryd.log
292 #celeryd.log.file = celeryd.log
321 celeryd.log.level = debug
293 celeryd.log.level = debug
322 celeryd.max.tasks.per.child = 1
294 celeryd.max.tasks.per.child = 1
323
295
324 <%text>## tasks will never be sent to the queue, but executed locally instead.</%text>
296 <%text>## tasks will never be sent to the queue, but executed locally instead.</%text>
325 celery.always.eager = false
297 celery.always.eager = false
326 <%text>
298 <%text>
327 ####################################
299 ####################################
328 ### BEAKER CACHE ####
300 ### BEAKER CACHE ####
329 ####################################
301 ####################################
330 </%text>
302 </%text>
331 beaker.cache.data_dir=${here}/data/cache/data
303 beaker.cache.data_dir=${here}/data/cache/data
332 beaker.cache.lock_dir=${here}/data/cache/lock
304 beaker.cache.lock_dir=${here}/data/cache/lock
333
305
334 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
306 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
335
307
336 beaker.cache.super_short_term.type=memory
308 beaker.cache.super_short_term.type=memory
337 beaker.cache.super_short_term.expire=10
309 beaker.cache.super_short_term.expire=10
338 beaker.cache.super_short_term.key_length = 256
310 beaker.cache.super_short_term.key_length = 256
339
311
340 beaker.cache.short_term.type=memory
312 beaker.cache.short_term.type=memory
341 beaker.cache.short_term.expire=60
313 beaker.cache.short_term.expire=60
342 beaker.cache.short_term.key_length = 256
314 beaker.cache.short_term.key_length = 256
343
315
344 beaker.cache.long_term.type=memory
316 beaker.cache.long_term.type=memory
345 beaker.cache.long_term.expire=36000
317 beaker.cache.long_term.expire=36000
346 beaker.cache.long_term.key_length = 256
318 beaker.cache.long_term.key_length = 256
347
319
348 beaker.cache.sql_cache_short.type=memory
320 beaker.cache.sql_cache_short.type=memory
349 beaker.cache.sql_cache_short.expire=10
321 beaker.cache.sql_cache_short.expire=10
350 beaker.cache.sql_cache_short.key_length = 256
322 beaker.cache.sql_cache_short.key_length = 256
351
323
352 beaker.cache.sql_cache_med.type=memory
324 beaker.cache.sql_cache_med.type=memory
353 beaker.cache.sql_cache_med.expire=360
325 beaker.cache.sql_cache_med.expire=360
354 beaker.cache.sql_cache_med.key_length = 256
326 beaker.cache.sql_cache_med.key_length = 256
355
327
356 beaker.cache.sql_cache_long.type=file
328 beaker.cache.sql_cache_long.type=file
357 beaker.cache.sql_cache_long.expire=3600
329 beaker.cache.sql_cache_long.expire=3600
358 beaker.cache.sql_cache_long.key_length = 256
330 beaker.cache.sql_cache_long.key_length = 256
359 <%text>
331 <%text>
360 ####################################
332 ####################################
361 ### BEAKER SESSION ####
333 ### BEAKER SESSION ####
362 ####################################
334 ####################################
363 ## Type of storage used for the session, current types are
335 ## Type of storage used for the session, current types are
364 ## dbm, file, memcached, database, and memory.
336 ## dbm, file, memcached, database, and memory.
365 ## The storage uses the Container API
337 ## The storage uses the Container API
366 ## that is also used by the cache system.
338 ## that is also used by the cache system.
367 </%text>
339 </%text>
368 <%text>## db session ##</%text>
340 <%text>## db session ##</%text>
369 #beaker.session.type = ext:database
341 #beaker.session.type = ext:database
370 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
342 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
371 #beaker.session.table_name = db_session
343 #beaker.session.table_name = db_session
372
344
373 <%text>## encrypted cookie client side session, good for many instances ##</%text>
345 <%text>## encrypted cookie client side session, good for many instances ##</%text>
374 #beaker.session.type = cookie
346 #beaker.session.type = cookie
375
347
376 <%text>## file based cookies (default) ##</%text>
348 <%text>## file based cookies (default) ##</%text>
377 #beaker.session.type = file
349 #beaker.session.type = file
378
350
379 beaker.session.key = kallithea
351 beaker.session.key = kallithea
380 beaker.session.secret = ${uuid()}
352 beaker.session.secret = ${uuid()}
381
353
382 <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
354 <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
383 <%text>## you must disable beaker.session.secret to use this</%text>
355 <%text>## you must disable beaker.session.secret to use this</%text>
384 #beaker.session.encrypt_key = <key_for_encryption>
356 #beaker.session.encrypt_key = <key_for_encryption>
385 #beaker.session.validate_key = <validation_key>
357 #beaker.session.validate_key = <validation_key>
386
358
387 <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text>
359 <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text>
388 beaker.session.timeout = 2592000
360 beaker.session.timeout = 2592000
389 beaker.session.httponly = true
361 beaker.session.httponly = true
390 #beaker.session.cookie_path = /<your-prefix>
362 #beaker.session.cookie_path = /<your-prefix>
391
363
392 <%text>## uncomment for https secure cookie</%text>
364 <%text>## uncomment for https secure cookie</%text>
393 beaker.session.secure = false
365 beaker.session.secure = false
394
366
395 <%text>## auto save the session to not to use .save()</%text>
367 <%text>## auto save the session to not to use .save()</%text>
396 beaker.session.auto = False
368 beaker.session.auto = False
397
369
398 <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text>
370 <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text>
399 #beaker.session.cookie_expires = 3600
371 #beaker.session.cookie_expires = 3600
400
372
401 %if error_aggregation_service == 'errormator':
373 %if error_aggregation_service == 'errormator':
402 <%text>
374 <%text>
403 ############################
375 ############################
404 ## ERROR HANDLING SYSTEMS ##
376 ## ERROR HANDLING SYSTEMS ##
405 ############################
377 ############################
406
378
407 ####################
379 ####################
408 ### [errormator] ###
380 ### [errormator] ###
409 ####################
381 ####################
410
382
411 ## Errormator is tailored to work with Kallithea, see
383 ## Errormator is tailored to work with Kallithea, see
412 ## http://errormator.com for details how to obtain an account
384 ## http://errormator.com for details how to obtain an account
413 ## you must install python package `errormator_client` to make it work
385 ## you must install python package `errormator_client` to make it work
414 </%text>
386 </%text>
415 <%text>## errormator enabled</%text>
387 <%text>## errormator enabled</%text>
416 errormator = false
388 errormator = false
417
389
418 errormator.server_url = https://api.errormator.com
390 errormator.server_url = https://api.errormator.com
419 errormator.api_key = YOUR_API_KEY
391 errormator.api_key = YOUR_API_KEY
420
392
421 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
393 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
422
394
423 <%text>## enables 404 error logging (default False)</%text>
395 <%text>## enables 404 error logging (default False)</%text>
424 errormator.report_404 = false
396 errormator.report_404 = false
425
397
426 <%text>## time in seconds after request is considered being slow (default 1)</%text>
398 <%text>## time in seconds after request is considered being slow (default 1)</%text>
427 errormator.slow_request_time = 1
399 errormator.slow_request_time = 1
428
400
429 <%text>## record slow requests in application</%text>
401 <%text>## record slow requests in application</%text>
430 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
402 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
431 errormator.slow_requests = true
403 errormator.slow_requests = true
432
404
433 <%text>## enable hooking to application loggers</%text>
405 <%text>## enable hooking to application loggers</%text>
434 # errormator.logging = true
406 # errormator.logging = true
435
407
436 <%text>## minimum log level for log capture</%text>
408 <%text>## minimum log level for log capture</%text>
437 # errormator.logging.level = WARNING
409 # errormator.logging.level = WARNING
438
410
439 <%text>## send logs only from erroneous/slow requests</%text>
411 <%text>## send logs only from erroneous/slow requests</%text>
440 <%text>## (saves API quota for intensive logging)</%text>
412 <%text>## (saves API quota for intensive logging)</%text>
441 errormator.logging_on_error = false
413 errormator.logging_on_error = false
442
414
443 <%text>## list of additonal keywords that should be grabbed from environ object</%text>
415 <%text>## list of additonal keywords that should be grabbed from environ object</%text>
444 <%text>## can be string with comma separated list of words in lowercase</%text>
416 <%text>## can be string with comma separated list of words in lowercase</%text>
445 <%text>## (by default client will always send following info:</%text>
417 <%text>## (by default client will always send following info:</%text>
446 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
418 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
447 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
419 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
448 errormator.environ_keys_whitelist =
420 errormator.environ_keys_whitelist =
449
421
450
422
451 <%text>## list of keywords that should be blanked from request object</%text>
423 <%text>## list of keywords that should be blanked from request object</%text>
452 <%text>## can be string with comma separated list of words in lowercase</%text>
424 <%text>## can be string with comma separated list of words in lowercase</%text>
453 <%text>## (by default client will always blank keys that contain following words</%text>
425 <%text>## (by default client will always blank keys that contain following words</%text>
454 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
426 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
455 <%text>## this list be extended with additional keywords set here</%text>
427 <%text>## this list be extended with additional keywords set here</%text>
456 errormator.request_keys_blacklist =
428 errormator.request_keys_blacklist =
457
429
458
430
459 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
431 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
460 <%text>## can be string with comma separated list of namespaces</%text>
432 <%text>## can be string with comma separated list of namespaces</%text>
461 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
433 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
462 errormator.log_namespace_blacklist =
434 errormator.log_namespace_blacklist =
463 %elif error_aggregation_service == 'sentry':
435 %elif error_aggregation_service == 'sentry':
464 <%text>
436 <%text>
465 ################
437 ################
466 ### [sentry] ###
438 ### [sentry] ###
467 ################
439 ################
468
440
469 ## sentry is a alternative open source error aggregator
441 ## sentry is a alternative open source error aggregator
470 ## you must install python packages `sentry` and `raven` to enable
442 ## you must install python packages `sentry` and `raven` to enable
471 </%text>
443 </%text>
472 sentry.dsn = YOUR_DNS
444 sentry.dsn = YOUR_DNS
473 sentry.servers =
445 sentry.servers =
474 sentry.name =
446 sentry.name =
475 sentry.key =
447 sentry.key =
476 sentry.public_key =
448 sentry.public_key =
477 sentry.secret_key =
449 sentry.secret_key =
478 sentry.project =
450 sentry.project =
479 sentry.site =
451 sentry.site =
480 sentry.include_paths =
452 sentry.include_paths =
481 sentry.exclude_paths =
453 sentry.exclude_paths =
482 %endif
454 %endif
483 <%text>
455 <%text>
484 ################################################################################
456 ################################################################################
485 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
457 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
486 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
458 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
487 ## execute malicious code after an exception is raised. ##
459 ## execute malicious code after an exception is raised. ##
488 ################################################################################</%text>
460 ################################################################################</%text>
489 set debug = false
461 set debug = false
490 <%text>
462 <%text>
491 ##################################
463 ##################################
492 ### LOGVIEW CONFIG ###
464 ### LOGVIEW CONFIG ###
493 ##################################
465 ##################################
494 </%text>
466 </%text>
495 logview.sqlalchemy = #faa
467 logview.sqlalchemy = #faa
496 logview.pylons.templating = #bfb
468 logview.pylons.templating = #bfb
497 logview.pylons.util = #eee
469 logview.pylons.util = #eee
498 <%text>
470 <%text>
499 #########################################################
471 #########################################################
500 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
472 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
501 #########################################################
473 #########################################################
502 </%text>
474 </%text>
503 %if database_engine == 'sqlite':
475 %if database_engine == 'sqlite':
504 # SQLITE [default]
476 # SQLITE [default]
505 sqlalchemy.db1.url = sqlite:///${here}/kallithea.db?timeout=60
477 sqlalchemy.db1.url = sqlite:///${here}/kallithea.db?timeout=60
506 %elif database_engine == 'postgres':
478 %elif database_engine == 'postgres':
507 # POSTGRESQL
479 # POSTGRESQL
508 sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
480 sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
509 %elif database_engine == 'mysql':
481 %elif database_engine == 'mysql':
510 # MySQL
482 # MySQL
511 sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
483 sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
512 %endif
484 %endif
513 # see sqlalchemy docs for others
485 # see sqlalchemy docs for others
514
486
515 sqlalchemy.db1.echo = false
487 sqlalchemy.db1.echo = false
516 sqlalchemy.db1.pool_recycle = 3600
488 sqlalchemy.db1.pool_recycle = 3600
517 sqlalchemy.db1.convert_unicode = true
489 sqlalchemy.db1.convert_unicode = true
518 <%text>
490 <%text>
519 ################################
491 ################################
520 ### LOGGING CONFIGURATION ####
492 ### LOGGING CONFIGURATION ####
521 ################################
493 ################################
522 </%text>
494 </%text>
523 [loggers]
495 [loggers]
524 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
496 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
525
497
526 [handlers]
498 [handlers]
527 keys = console, console_sql
499 keys = console, console_sql
528
500
529 [formatters]
501 [formatters]
530 keys = generic, color_formatter, color_formatter_sql
502 keys = generic, color_formatter, color_formatter_sql
531 <%text>
503 <%text>
532 #############
504 #############
533 ## LOGGERS ##
505 ## LOGGERS ##
534 #############
506 #############
535 </%text>
507 </%text>
536 [logger_root]
508 [logger_root]
537 level = NOTSET
509 level = NOTSET
538 handlers = console
510 handlers = console
539
511
540 [logger_routes]
512 [logger_routes]
541 level = DEBUG
513 level = DEBUG
542 handlers =
514 handlers =
543 qualname = routes.middleware
515 qualname = routes.middleware
544 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
516 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
545 propagate = 1
517 propagate = 1
546
518
547 [logger_beaker]
519 [logger_beaker]
548 level = DEBUG
520 level = DEBUG
549 handlers =
521 handlers =
550 qualname = beaker.container
522 qualname = beaker.container
551 propagate = 1
523 propagate = 1
552
524
553 [logger_templates]
525 [logger_templates]
554 level = INFO
526 level = INFO
555 handlers =
527 handlers =
556 qualname = pylons.templating
528 qualname = pylons.templating
557 propagate = 1
529 propagate = 1
558
530
559 [logger_kallithea]
531 [logger_kallithea]
560 level = DEBUG
532 level = DEBUG
561 handlers =
533 handlers =
562 qualname = kallithea
534 qualname = kallithea
563 propagate = 1
535 propagate = 1
564
536
565 [logger_sqlalchemy]
537 [logger_sqlalchemy]
566 level = INFO
538 level = INFO
567 handlers = console_sql
539 handlers = console_sql
568 qualname = sqlalchemy.engine
540 qualname = sqlalchemy.engine
569 propagate = 0
541 propagate = 0
570
542
571 [logger_whoosh_indexer]
543 [logger_whoosh_indexer]
572 level = DEBUG
544 level = DEBUG
573 handlers =
545 handlers =
574 qualname = whoosh_indexer
546 qualname = whoosh_indexer
575 propagate = 1
547 propagate = 1
576 <%text>
548 <%text>
577 ##############
549 ##############
578 ## HANDLERS ##
550 ## HANDLERS ##
579 ##############
551 ##############
580 </%text>
552 </%text>
581 [handler_console]
553 [handler_console]
582 class = StreamHandler
554 class = StreamHandler
583 args = (sys.stderr,)
555 args = (sys.stderr,)
584 level = INFO
556 level = INFO
585 formatter = generic
557 formatter = generic
586
558
587 [handler_console_sql]
559 [handler_console_sql]
588 class = StreamHandler
560 class = StreamHandler
589 args = (sys.stderr,)
561 args = (sys.stderr,)
590 level = WARN
562 level = WARN
591 formatter = generic
563 formatter = generic
592 <%text>
564 <%text>
593 ################
565 ################
594 ## FORMATTERS ##
566 ## FORMATTERS ##
595 ################
567 ################
596 </%text>
568 </%text>
597 [formatter_generic]
569 [formatter_generic]
598 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
570 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
599 datefmt = %Y-%m-%d %H:%M:%S
571 datefmt = %Y-%m-%d %H:%M:%S
600
572
601 [formatter_color_formatter]
573 [formatter_color_formatter]
602 class=kallithea.lib.colored_formatter.ColorFormatter
574 class=kallithea.lib.colored_formatter.ColorFormatter
603 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
575 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
604 datefmt = %Y-%m-%d %H:%M:%S
576 datefmt = %Y-%m-%d %H:%M:%S
605
577
606 [formatter_color_formatter_sql]
578 [formatter_color_formatter_sql]
607 class=kallithea.lib.colored_formatter.ColorFormatterSql
579 class=kallithea.lib.colored_formatter.ColorFormatterSql
608 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
580 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
609 datefmt = %Y-%m-%d %H:%M:%S
581 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,604 +1,576 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # Kallithea - Example config #
3 # Kallithea - Example config #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7 ################################################################################
7 ################################################################################
8
8
9 [DEFAULT]
9 [DEFAULT]
10 debug = true
10 debug = true
11 pdebug = false
11 pdebug = false
12
12
13 ################################################################################
13 ################################################################################
14 ## Uncomment and replace with the address which should receive ##
14 ## Uncomment and replace with the address which should receive ##
15 ## any error reports after application crash ##
15 ## any error reports after application crash ##
16 ## Additionally those settings will be used by Kallithea mailing system ##
16 ## Additionally those settings will be used by Kallithea mailing system ##
17 ################################################################################
17 ################################################################################
18 #email_to = admin@localhost
18 #email_to = admin@localhost
19 #error_email_from = paste_error@localhost
19 #error_email_from = paste_error@localhost
20 #app_email_from = kallithea-noreply@localhost
20 #app_email_from = kallithea-noreply@localhost
21 #error_message =
21 #error_message =
22 #email_prefix = [Kallithea]
22 #email_prefix = [Kallithea]
23
23
24 #smtp_server = mail.server.com
24 #smtp_server = mail.server.com
25 #smtp_username =
25 #smtp_username =
26 #smtp_password =
26 #smtp_password =
27 #smtp_port =
27 #smtp_port =
28 #smtp_use_tls = false
28 #smtp_use_tls = false
29 #smtp_use_ssl = true
29 #smtp_use_ssl = true
30 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
30 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
31 #smtp_auth =
31 #smtp_auth =
32
32
33 [server:main]
33 [server:main]
34 ## PASTE ##
34 ## PASTE ##
35 #use = egg:Paste#http
35 #use = egg:Paste#http
36 ## nr of worker threads to spawn
36 ## nr of worker threads to spawn
37 #threadpool_workers = 5
37 #threadpool_workers = 5
38 ## max request before thread respawn
38 ## max request before thread respawn
39 #threadpool_max_requests = 10
39 #threadpool_max_requests = 10
40 ## option to use threads of process
40 ## option to use threads of process
41 #use_threadpool = true
41 #use_threadpool = true
42
42
43 ## WAITRESS ##
43 ## WAITRESS ##
44 use = egg:waitress#main
44 use = egg:waitress#main
45 ## number of worker threads
45 ## number of worker threads
46 threads = 5
46 threads = 5
47 ## MAX BODY SIZE 100GB
47 ## MAX BODY SIZE 100GB
48 max_request_body_size = 107374182400
48 max_request_body_size = 107374182400
49 ## use poll instead of select, fixes fd limits, may not work on old
49 ## use poll instead of select, fixes fd limits, may not work on old
50 ## windows systems.
50 ## windows systems.
51 #asyncore_use_poll = True
51 #asyncore_use_poll = True
52
52
53 ## GUNICORN ##
53 ## GUNICORN ##
54 #use = egg:gunicorn#main
54 #use = egg:gunicorn#main
55 ## number of process workers. You must set `instance_id = *` when this option
55 ## number of process workers. You must set `instance_id = *` when this option
56 ## is set to more than one worker
56 ## is set to more than one worker
57 #workers = 1
57 #workers = 1
58 ## process name
58 ## process name
59 #proc_name = kallithea
59 #proc_name = kallithea
60 ## type of worker class, one of sync, eventlet, gevent, tornado
60 ## type of worker class, one of sync, eventlet, gevent, tornado
61 ## recommended for bigger setup is using of of other than sync one
61 ## recommended for bigger setup is using of of other than sync one
62 #worker_class = sync
62 #worker_class = sync
63 #max_requests = 1000
63 #max_requests = 1000
64 ## ammount of time a worker can handle request before it gets killed and
64 ## ammount of time a worker can handle request before it gets killed and
65 ## restarted
65 ## restarted
66 #timeout = 3600
66 #timeout = 3600
67
67
68 ## UWSGI ##
68 ## UWSGI ##
69 ## run with uwsgi --ini-paste-logged <inifile.ini>
69 ## run with uwsgi --ini-paste-logged <inifile.ini>
70 #[uwsgi]
70 #[uwsgi]
71 #socket = /tmp/uwsgi.sock
71 #socket = /tmp/uwsgi.sock
72 #master = true
72 #master = true
73 #http = 127.0.0.1:5000
73 #http = 127.0.0.1:5000
74
74
75 ## set as deamon and redirect all output to file
75 ## set as deamon and redirect all output to file
76 #daemonize = ./uwsgi_kallithea.log
76 #daemonize = ./uwsgi_kallithea.log
77
77
78 ## master process PID
78 ## master process PID
79 #pidfile = ./uwsgi_kallithea.pid
79 #pidfile = ./uwsgi_kallithea.pid
80
80
81 ## stats server with workers statistics, use uwsgitop
81 ## stats server with workers statistics, use uwsgitop
82 ## for monitoring, `uwsgitop 127.0.0.1:1717`
82 ## for monitoring, `uwsgitop 127.0.0.1:1717`
83 #stats = 127.0.0.1:1717
83 #stats = 127.0.0.1:1717
84 #memory-report = true
84 #memory-report = true
85
85
86 ## log 5XX errors
86 ## log 5XX errors
87 #log-5xx = true
87 #log-5xx = true
88
88
89 ## Set the socket listen queue size.
89 ## Set the socket listen queue size.
90 #listen = 256
90 #listen = 256
91
91
92 ## Gracefully Reload workers after the specified amount of managed requests
92 ## Gracefully Reload workers after the specified amount of managed requests
93 ## (avoid memory leaks).
93 ## (avoid memory leaks).
94 #max-requests = 1000
94 #max-requests = 1000
95
95
96 ## enable large buffers
96 ## enable large buffers
97 #buffer-size=65535
97 #buffer-size=65535
98
98
99 ## socket and http timeouts ##
99 ## socket and http timeouts ##
100 #http-timeout=3600
100 #http-timeout=3600
101 #socket-timeout=3600
101 #socket-timeout=3600
102
102
103 ## Log requests slower than the specified number of milliseconds.
103 ## Log requests slower than the specified number of milliseconds.
104 #log-slow = 10
104 #log-slow = 10
105
105
106 ## Exit if no app can be loaded.
106 ## Exit if no app can be loaded.
107 #need-app = true
107 #need-app = true
108
108
109 ## Set lazy mode (load apps in workers instead of master).
109 ## Set lazy mode (load apps in workers instead of master).
110 #lazy = true
110 #lazy = true
111
111
112 ## scaling ##
112 ## scaling ##
113 ## set cheaper algorithm to use, if not set default will be used
113 ## set cheaper algorithm to use, if not set default will be used
114 #cheaper-algo = spare
114 #cheaper-algo = spare
115
115
116 ## minimum number of workers to keep at all times
116 ## minimum number of workers to keep at all times
117 #cheaper = 1
117 #cheaper = 1
118
118
119 ## number of workers to spawn at startup
119 ## number of workers to spawn at startup
120 #cheaper-initial = 1
120 #cheaper-initial = 1
121
121
122 ## maximum number of workers that can be spawned
122 ## maximum number of workers that can be spawned
123 #workers = 4
123 #workers = 4
124
124
125 ## how many workers should be spawned at a time
125 ## how many workers should be spawned at a time
126 #cheaper-step = 1
126 #cheaper-step = 1
127
127
128 ## COMMON ##
128 ## COMMON ##
129 host = 127.0.0.1
129 host = 127.0.0.1
130 port = 5000
130 port = 5000
131
131
132 ## prefix middleware for rc
132 ## prefix middleware for rc
133 #[filter:proxy-prefix]
133 #[filter:proxy-prefix]
134 #use = egg:PasteDeploy#prefix
134 #use = egg:PasteDeploy#prefix
135 #prefix = /<your-prefix>
135 #prefix = /<your-prefix>
136
136
137 [app:main]
137 [app:main]
138 use = egg:kallithea
138 use = egg:kallithea
139 ## enable proxy prefix middleware
139 ## enable proxy prefix middleware
140 #filter-with = proxy-prefix
140 #filter-with = proxy-prefix
141
141
142 full_stack = true
142 full_stack = true
143 static_files = true
143 static_files = true
144 ## Available Languages:
144 ## Available Languages:
145 ## de en fr ja pl pt_BR ru zh_CN zh_TW
145 ## de en fr ja pl pt_BR ru zh_CN zh_TW
146 lang = en
146 lang = en
147 cache_dir = %(here)s/data
147 cache_dir = %(here)s/data
148 index_dir = %(here)s/data/index
148 index_dir = %(here)s/data/index
149
149
150 ## perform a full repository scan on each server start, this should be
150 ## perform a full repository scan on each server start, this should be
151 ## set to false after first startup, to allow faster server restarts.
151 ## set to false after first startup, to allow faster server restarts.
152 initial_repo_scan = false
152 initial_repo_scan = false
153
153
154 ## uncomment and set this path to use archive download cache
154 ## uncomment and set this path to use archive download cache
155 archive_cache_dir = %(here)s/tarballcache
155 archive_cache_dir = %(here)s/tarballcache
156
156
157 ## change this to unique ID for security
157 ## change this to unique ID for security
158 app_instance_uuid = ${app_instance_uuid}
158 app_instance_uuid = ${app_instance_uuid}
159
159
160 ## cut off limit for large diffs (size in bytes)
160 ## cut off limit for large diffs (size in bytes)
161 cut_off_limit = 256000
161 cut_off_limit = 256000
162
162
163 ## use cache version of scm repo everywhere
163 ## use cache version of scm repo everywhere
164 vcs_full_cache = true
164 vcs_full_cache = true
165
165
166 ## force https in Kallithea, fixes https redirects, assumes it's always https
166 ## force https in Kallithea, fixes https redirects, assumes it's always https
167 force_https = false
167 force_https = false
168
168
169 ## use Strict-Transport-Security headers
169 ## use Strict-Transport-Security headers
170 use_htsts = false
170 use_htsts = false
171
171
172 ## number of commits stats will parse on each iteration
172 ## number of commits stats will parse on each iteration
173 commit_parse_limit = 25
173 commit_parse_limit = 25
174
174
175 ## use gravatar service to display avatars
176 use_gravatar = true
177
178 ## path to git executable
175 ## path to git executable
179 git_path = git
176 git_path = git
180
177
181 ## git rev filter option, --all is the default filter, if you need to
178 ## git rev filter option, --all is the default filter, if you need to
182 ## hide all refs in changelog switch this to --branches --tags
179 ## hide all refs in changelog switch this to --branches --tags
183 #git_rev_filter = --branches --tags
180 #git_rev_filter = --branches --tags
184
181
185 ## RSS feed options
182 ## RSS feed options
186 rss_cut_off_limit = 256000
183 rss_cut_off_limit = 256000
187 rss_items_per_page = 10
184 rss_items_per_page = 10
188 rss_include_diff = false
185 rss_include_diff = false
189
186
190 ## options for showing and identifying changesets
187 ## options for showing and identifying changesets
191 show_sha_length = 12
188 show_sha_length = 12
192 show_revision_number = true
189 show_revision_number = true
193
190
194 ## gist URL alias, used to create nicer urls for gist. This should be an
191 ## gist URL alias, used to create nicer urls for gist. This should be an
195 ## url that does rewrites to _admin/gists/<gistid>.
192 ## url that does rewrites to _admin/gists/<gistid>.
196 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
193 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
197 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
194 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
198 gist_alias_url =
195 gist_alias_url =
199
196
200 ## white list of API enabled controllers. This allows to add list of
197 ## white list of API enabled controllers. This allows to add list of
201 ## controllers to which access will be enabled by api_key. eg: to enable
198 ## controllers to which access will be enabled by api_key. eg: to enable
202 ## api access to raw_files put `FilesController:raw`, to enable access to patches
199 ## api access to raw_files put `FilesController:raw`, to enable access to patches
203 ## add `ChangesetController:changeset_patch`. This list should be "," separated
200 ## add `ChangesetController:changeset_patch`. This list should be "," separated
204 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
201 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
205 ## Recommended settings below are commented out:
202 ## Recommended settings below are commented out:
206 api_access_controllers_whitelist =
203 api_access_controllers_whitelist =
207 # ChangesetController:changeset_patch,
204 # ChangesetController:changeset_patch,
208 # ChangesetController:changeset_raw,
205 # ChangesetController:changeset_raw,
209 # FilesController:raw,
206 # FilesController:raw,
210 # FilesController:archivefile
207 # FilesController:archivefile
211
208
212 ## alternative_gravatar_url allows you to use your own avatar server application
213 ## the following parts of the URL will be replaced
214 ## {email} user email
215 ## {md5email} md5 hash of the user email (like at gravatar.com)
216 ## {size} size of the image that is expected from the server application
217 ## {scheme} http/https from Kallithea server
218 ## {netloc} network location from Kallithea server
219 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
220 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
221
222
223 ## container auth options
224 container_auth_enabled = false
225 proxypass_auth_enabled = false
226
227 ## default encoding used to convert from and to unicode
209 ## default encoding used to convert from and to unicode
228 ## can be also a comma seperated list of encoding in case of mixed encodings
210 ## can be also a comma seperated list of encoding in case of mixed encodings
229 default_encoding = utf8
211 default_encoding = utf8
230
212
231 ## overwrite schema of clone url
232 ## available vars:
233 ## scheme - http/https
234 ## user - current user
235 ## pass - password
236 ## netloc - network location
237 ## path - usually repo_name
238
239 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
240
241 ## issue tracker for Kallithea (leave blank to disable, absent for default)
213 ## issue tracker for Kallithea (leave blank to disable, absent for default)
242 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
214 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
243
215
244 ## issue tracking mapping for commits messages
216 ## issue tracking mapping for commits messages
245 ## comment out issue_pat, issue_server, issue_prefix to enable
217 ## comment out issue_pat, issue_server, issue_prefix to enable
246
218
247 ## pattern to get the issues from commit messages
219 ## pattern to get the issues from commit messages
248 ## default one used here is #<numbers> with a regex passive group for `#`
220 ## default one used here is #<numbers> with a regex passive group for `#`
249 ## {id} will be all groups matched from this pattern
221 ## {id} will be all groups matched from this pattern
250
222
251 issue_pat = (?:\s*#)(\d+)
223 issue_pat = (?:\s*#)(\d+)
252
224
253 ## server url to the issue, each {id} will be replaced with match
225 ## server url to the issue, each {id} will be replaced with match
254 ## fetched from the regex and {repo} is replaced with full repository name
226 ## fetched from the regex and {repo} is replaced with full repository name
255 ## including groups {repo_name} is replaced with just name of repo
227 ## including groups {repo_name} is replaced with just name of repo
256
228
257 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
229 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
258
230
259 ## prefix to add to link to indicate it's an url
231 ## prefix to add to link to indicate it's an url
260 ## #314 will be replaced by <issue_prefix><id>
232 ## #314 will be replaced by <issue_prefix><id>
261
233
262 issue_prefix = #
234 issue_prefix = #
263
235
264 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
236 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
265 ## multiple patterns, to other issues server, wiki or others
237 ## multiple patterns, to other issues server, wiki or others
266 ## below an example how to create a wiki pattern
238 ## below an example how to create a wiki pattern
267 # wiki-some-id -> https://mywiki.com/some-id
239 # wiki-some-id -> https://mywiki.com/some-id
268
240
269 #issue_pat_wiki = (?:wiki-)(.+)
241 #issue_pat_wiki = (?:wiki-)(.+)
270 #issue_server_link_wiki = https://mywiki.com/{id}
242 #issue_server_link_wiki = https://mywiki.com/{id}
271 #issue_prefix_wiki = WIKI-
243 #issue_prefix_wiki = WIKI-
272
244
273
245
274 ## instance-id prefix
246 ## instance-id prefix
275 ## a prefix key for this instance used for cache invalidation when running
247 ## a prefix key for this instance used for cache invalidation when running
276 ## multiple instances of kallithea, make sure it's globally unique for
248 ## multiple instances of kallithea, make sure it's globally unique for
277 ## all running kallithea instances. Leave empty if you don't use it
249 ## all running kallithea instances. Leave empty if you don't use it
278 instance_id =
250 instance_id =
279
251
280 ## alternative return HTTP header for failed authentication. Default HTTP
252 ## alternative return HTTP header for failed authentication. Default HTTP
281 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
253 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
282 ## handling that. Set this variable to 403 to return HTTPForbidden
254 ## handling that. Set this variable to 403 to return HTTPForbidden
283 auth_ret_code =
255 auth_ret_code =
284
256
285 ## locking return code. When repository is locked return this HTTP code. 2XX
257 ## locking return code. When repository is locked return this HTTP code. 2XX
286 ## codes don't break the transactions while 4XX codes do
258 ## codes don't break the transactions while 4XX codes do
287 lock_ret_code = 423
259 lock_ret_code = 423
288
260
289 ## allows to change the repository location in settings page
261 ## allows to change the repository location in settings page
290 allow_repo_location_change = True
262 allow_repo_location_change = True
291
263
292 ## allows to setup custom hooks in settings page
264 ## allows to setup custom hooks in settings page
293 allow_custom_hooks_settings = True
265 allow_custom_hooks_settings = True
294
266
295
267
296 ####################################
268 ####################################
297 ### CELERY CONFIG ####
269 ### CELERY CONFIG ####
298 ####################################
270 ####################################
299
271
300 use_celery = false
272 use_celery = false
301 broker.host = localhost
273 broker.host = localhost
302 broker.vhost = rabbitmqhost
274 broker.vhost = rabbitmqhost
303 broker.port = 5672
275 broker.port = 5672
304 broker.user = rabbitmq
276 broker.user = rabbitmq
305 broker.password = qweqwe
277 broker.password = qweqwe
306
278
307 celery.imports = kallithea.lib.celerylib.tasks
279 celery.imports = kallithea.lib.celerylib.tasks
308
280
309 celery.result.backend = amqp
281 celery.result.backend = amqp
310 celery.result.dburi = amqp://
282 celery.result.dburi = amqp://
311 celery.result.serialier = json
283 celery.result.serialier = json
312
284
313 #celery.send.task.error.emails = true
285 #celery.send.task.error.emails = true
314 #celery.amqp.task.result.expires = 18000
286 #celery.amqp.task.result.expires = 18000
315
287
316 celeryd.concurrency = 2
288 celeryd.concurrency = 2
317 #celeryd.log.file = celeryd.log
289 #celeryd.log.file = celeryd.log
318 celeryd.log.level = debug
290 celeryd.log.level = debug
319 celeryd.max.tasks.per.child = 1
291 celeryd.max.tasks.per.child = 1
320
292
321 ## tasks will never be sent to the queue, but executed locally instead.
293 ## tasks will never be sent to the queue, but executed locally instead.
322 celery.always.eager = false
294 celery.always.eager = false
323
295
324 ####################################
296 ####################################
325 ### BEAKER CACHE ####
297 ### BEAKER CACHE ####
326 ####################################
298 ####################################
327
299
328 beaker.cache.data_dir=%(here)s/data/cache/data
300 beaker.cache.data_dir=%(here)s/data/cache/data
329 beaker.cache.lock_dir=%(here)s/data/cache/lock
301 beaker.cache.lock_dir=%(here)s/data/cache/lock
330
302
331 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
303 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
332
304
333 beaker.cache.super_short_term.type=memory
305 beaker.cache.super_short_term.type=memory
334 beaker.cache.super_short_term.expire=10
306 beaker.cache.super_short_term.expire=10
335 beaker.cache.super_short_term.key_length = 256
307 beaker.cache.super_short_term.key_length = 256
336
308
337 beaker.cache.short_term.type=memory
309 beaker.cache.short_term.type=memory
338 beaker.cache.short_term.expire=60
310 beaker.cache.short_term.expire=60
339 beaker.cache.short_term.key_length = 256
311 beaker.cache.short_term.key_length = 256
340
312
341 beaker.cache.long_term.type=memory
313 beaker.cache.long_term.type=memory
342 beaker.cache.long_term.expire=36000
314 beaker.cache.long_term.expire=36000
343 beaker.cache.long_term.key_length = 256
315 beaker.cache.long_term.key_length = 256
344
316
345 beaker.cache.sql_cache_short.type=memory
317 beaker.cache.sql_cache_short.type=memory
346 beaker.cache.sql_cache_short.expire=10
318 beaker.cache.sql_cache_short.expire=10
347 beaker.cache.sql_cache_short.key_length = 256
319 beaker.cache.sql_cache_short.key_length = 256
348
320
349 beaker.cache.sql_cache_med.type=memory
321 beaker.cache.sql_cache_med.type=memory
350 beaker.cache.sql_cache_med.expire=360
322 beaker.cache.sql_cache_med.expire=360
351 beaker.cache.sql_cache_med.key_length = 256
323 beaker.cache.sql_cache_med.key_length = 256
352
324
353 beaker.cache.sql_cache_long.type=file
325 beaker.cache.sql_cache_long.type=file
354 beaker.cache.sql_cache_long.expire=3600
326 beaker.cache.sql_cache_long.expire=3600
355 beaker.cache.sql_cache_long.key_length = 256
327 beaker.cache.sql_cache_long.key_length = 256
356
328
357 ####################################
329 ####################################
358 ### BEAKER SESSION ####
330 ### BEAKER SESSION ####
359 ####################################
331 ####################################
360 ## Type of storage used for the session, current types are
332 ## Type of storage used for the session, current types are
361 ## dbm, file, memcached, database, and memory.
333 ## dbm, file, memcached, database, and memory.
362 ## The storage uses the Container API
334 ## The storage uses the Container API
363 ## that is also used by the cache system.
335 ## that is also used by the cache system.
364
336
365 ## db session ##
337 ## db session ##
366 #beaker.session.type = ext:database
338 #beaker.session.type = ext:database
367 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
339 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
368 #beaker.session.table_name = db_session
340 #beaker.session.table_name = db_session
369
341
370 ## encrypted cookie client side session, good for many instances ##
342 ## encrypted cookie client side session, good for many instances ##
371 #beaker.session.type = cookie
343 #beaker.session.type = cookie
372
344
373 ## file based cookies (default) ##
345 ## file based cookies (default) ##
374 #beaker.session.type = file
346 #beaker.session.type = file
375
347
376 beaker.session.key = kallithea
348 beaker.session.key = kallithea
377 beaker.session.secret = ${app_instance_uuid}
349 beaker.session.secret = ${app_instance_uuid}
378
350
379 ## Secure encrypted cookie. Requires AES and AES python libraries
351 ## Secure encrypted cookie. Requires AES and AES python libraries
380 ## you must disable beaker.session.secret to use this
352 ## you must disable beaker.session.secret to use this
381 #beaker.session.encrypt_key = <key_for_encryption>
353 #beaker.session.encrypt_key = <key_for_encryption>
382 #beaker.session.validate_key = <validation_key>
354 #beaker.session.validate_key = <validation_key>
383
355
384 ## sets session as invalid if it haven't been accessed for given amount of time
356 ## sets session as invalid if it haven't been accessed for given amount of time
385 beaker.session.timeout = 2592000
357 beaker.session.timeout = 2592000
386 beaker.session.httponly = true
358 beaker.session.httponly = true
387 #beaker.session.cookie_path = /<your-prefix>
359 #beaker.session.cookie_path = /<your-prefix>
388
360
389 ## uncomment for https secure cookie
361 ## uncomment for https secure cookie
390 beaker.session.secure = false
362 beaker.session.secure = false
391
363
392 ## auto save the session to not to use .save()
364 ## auto save the session to not to use .save()
393 beaker.session.auto = False
365 beaker.session.auto = False
394
366
395 ## default cookie expiration time in seconds `true` expire at browser close ##
367 ## default cookie expiration time in seconds `true` expire at browser close ##
396 #beaker.session.cookie_expires = 3600
368 #beaker.session.cookie_expires = 3600
397
369
398
370
399 ############################
371 ############################
400 ## ERROR HANDLING SYSTEMS ##
372 ## ERROR HANDLING SYSTEMS ##
401 ############################
373 ############################
402
374
403 ####################
375 ####################
404 ### [errormator] ###
376 ### [errormator] ###
405 ####################
377 ####################
406
378
407 ## Errormator is tailored to work with Kallithea, see
379 ## Errormator is tailored to work with Kallithea, see
408 ## http://errormator.com for details how to obtain an account
380 ## http://errormator.com for details how to obtain an account
409 ## you must install python package `errormator_client` to make it work
381 ## you must install python package `errormator_client` to make it work
410
382
411 ## errormator enabled
383 ## errormator enabled
412 errormator = false
384 errormator = false
413
385
414 errormator.server_url = https://api.errormator.com
386 errormator.server_url = https://api.errormator.com
415 errormator.api_key = YOUR_API_KEY
387 errormator.api_key = YOUR_API_KEY
416
388
417 ## TWEAK AMOUNT OF INFO SENT HERE
389 ## TWEAK AMOUNT OF INFO SENT HERE
418
390
419 ## enables 404 error logging (default False)
391 ## enables 404 error logging (default False)
420 errormator.report_404 = false
392 errormator.report_404 = false
421
393
422 ## time in seconds after request is considered being slow (default 1)
394 ## time in seconds after request is considered being slow (default 1)
423 errormator.slow_request_time = 1
395 errormator.slow_request_time = 1
424
396
425 ## record slow requests in application
397 ## record slow requests in application
426 ## (needs to be enabled for slow datastore recording and time tracking)
398 ## (needs to be enabled for slow datastore recording and time tracking)
427 errormator.slow_requests = true
399 errormator.slow_requests = true
428
400
429 ## enable hooking to application loggers
401 ## enable hooking to application loggers
430 # errormator.logging = true
402 # errormator.logging = true
431
403
432 ## minimum log level for log capture
404 ## minimum log level for log capture
433 # errormator.logging.level = WARNING
405 # errormator.logging.level = WARNING
434
406
435 ## send logs only from erroneous/slow requests
407 ## send logs only from erroneous/slow requests
436 ## (saves API quota for intensive logging)
408 ## (saves API quota for intensive logging)
437 errormator.logging_on_error = false
409 errormator.logging_on_error = false
438
410
439 ## list of additonal keywords that should be grabbed from environ object
411 ## list of additonal keywords that should be grabbed from environ object
440 ## can be string with comma separated list of words in lowercase
412 ## can be string with comma separated list of words in lowercase
441 ## (by default client will always send following info:
413 ## (by default client will always send following info:
442 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
414 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
443 ## start with HTTP* this list be extended with additional keywords here
415 ## start with HTTP* this list be extended with additional keywords here
444 errormator.environ_keys_whitelist =
416 errormator.environ_keys_whitelist =
445
417
446
418
447 ## list of keywords that should be blanked from request object
419 ## list of keywords that should be blanked from request object
448 ## can be string with comma separated list of words in lowercase
420 ## can be string with comma separated list of words in lowercase
449 ## (by default client will always blank keys that contain following words
421 ## (by default client will always blank keys that contain following words
450 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
422 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
451 ## this list be extended with additional keywords set here
423 ## this list be extended with additional keywords set here
452 errormator.request_keys_blacklist =
424 errormator.request_keys_blacklist =
453
425
454
426
455 ## list of namespaces that should be ignores when gathering log entries
427 ## list of namespaces that should be ignores when gathering log entries
456 ## can be string with comma separated list of namespaces
428 ## can be string with comma separated list of namespaces
457 ## (by default the client ignores own entries: errormator_client.client)
429 ## (by default the client ignores own entries: errormator_client.client)
458 errormator.log_namespace_blacklist =
430 errormator.log_namespace_blacklist =
459
431
460
432
461 ################
433 ################
462 ### [sentry] ###
434 ### [sentry] ###
463 ################
435 ################
464
436
465 ## sentry is a alternative open source error aggregator
437 ## sentry is a alternative open source error aggregator
466 ## you must install python packages `sentry` and `raven` to enable
438 ## you must install python packages `sentry` and `raven` to enable
467
439
468 sentry.dsn = YOUR_DNS
440 sentry.dsn = YOUR_DNS
469 sentry.servers =
441 sentry.servers =
470 sentry.name =
442 sentry.name =
471 sentry.key =
443 sentry.key =
472 sentry.public_key =
444 sentry.public_key =
473 sentry.secret_key =
445 sentry.secret_key =
474 sentry.project =
446 sentry.project =
475 sentry.site =
447 sentry.site =
476 sentry.include_paths =
448 sentry.include_paths =
477 sentry.exclude_paths =
449 sentry.exclude_paths =
478
450
479
451
480 ################################################################################
452 ################################################################################
481 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
453 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
482 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
454 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
483 ## execute malicious code after an exception is raised. ##
455 ## execute malicious code after an exception is raised. ##
484 ################################################################################
456 ################################################################################
485 set debug = false
457 set debug = false
486
458
487 ##################################
459 ##################################
488 ### LOGVIEW CONFIG ###
460 ### LOGVIEW CONFIG ###
489 ##################################
461 ##################################
490
462
491 logview.sqlalchemy = #faa
463 logview.sqlalchemy = #faa
492 logview.pylons.templating = #bfb
464 logview.pylons.templating = #bfb
493 logview.pylons.util = #eee
465 logview.pylons.util = #eee
494
466
495 #########################################################
467 #########################################################
496 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
468 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
497 #########################################################
469 #########################################################
498
470
499 # SQLITE [default]
471 # SQLITE [default]
500 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
472 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
501
473
502 # POSTGRESQL
474 # POSTGRESQL
503 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
475 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
504
476
505 # MySQL
477 # MySQL
506 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
478 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
507
479
508 # see sqlalchemy docs for others
480 # see sqlalchemy docs for others
509
481
510 sqlalchemy.db1.echo = false
482 sqlalchemy.db1.echo = false
511 sqlalchemy.db1.pool_recycle = 3600
483 sqlalchemy.db1.pool_recycle = 3600
512 sqlalchemy.db1.convert_unicode = true
484 sqlalchemy.db1.convert_unicode = true
513
485
514 ################################
486 ################################
515 ### LOGGING CONFIGURATION ####
487 ### LOGGING CONFIGURATION ####
516 ################################
488 ################################
517
489
518 [loggers]
490 [loggers]
519 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
491 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
520
492
521 [handlers]
493 [handlers]
522 keys = console, console_sql
494 keys = console, console_sql
523
495
524 [formatters]
496 [formatters]
525 keys = generic, color_formatter, color_formatter_sql
497 keys = generic, color_formatter, color_formatter_sql
526
498
527 #############
499 #############
528 ## LOGGERS ##
500 ## LOGGERS ##
529 #############
501 #############
530
502
531 [logger_root]
503 [logger_root]
532 level = NOTSET
504 level = NOTSET
533 handlers = console
505 handlers = console
534
506
535 [logger_routes]
507 [logger_routes]
536 level = DEBUG
508 level = DEBUG
537 handlers =
509 handlers =
538 qualname = routes.middleware
510 qualname = routes.middleware
539 ## "level = DEBUG" logs the route matched and routing variables.
511 ## "level = DEBUG" logs the route matched and routing variables.
540 propagate = 1
512 propagate = 1
541
513
542 [logger_beaker]
514 [logger_beaker]
543 level = DEBUG
515 level = DEBUG
544 handlers =
516 handlers =
545 qualname = beaker.container
517 qualname = beaker.container
546 propagate = 1
518 propagate = 1
547
519
548 [logger_templates]
520 [logger_templates]
549 level = INFO
521 level = INFO
550 handlers =
522 handlers =
551 qualname = pylons.templating
523 qualname = pylons.templating
552 propagate = 1
524 propagate = 1
553
525
554 [logger_kallithea]
526 [logger_kallithea]
555 level = DEBUG
527 level = DEBUG
556 handlers =
528 handlers =
557 qualname = kallithea
529 qualname = kallithea
558 propagate = 1
530 propagate = 1
559
531
560 [logger_sqlalchemy]
532 [logger_sqlalchemy]
561 level = INFO
533 level = INFO
562 handlers = console_sql
534 handlers = console_sql
563 qualname = sqlalchemy.engine
535 qualname = sqlalchemy.engine
564 propagate = 0
536 propagate = 0
565
537
566 [logger_whoosh_indexer]
538 [logger_whoosh_indexer]
567 level = DEBUG
539 level = DEBUG
568 handlers =
540 handlers =
569 qualname = whoosh_indexer
541 qualname = whoosh_indexer
570 propagate = 1
542 propagate = 1
571
543
572 ##############
544 ##############
573 ## HANDLERS ##
545 ## HANDLERS ##
574 ##############
546 ##############
575
547
576 [handler_console]
548 [handler_console]
577 class = StreamHandler
549 class = StreamHandler
578 args = (sys.stderr,)
550 args = (sys.stderr,)
579 level = INFO
551 level = INFO
580 formatter = generic
552 formatter = generic
581
553
582 [handler_console_sql]
554 [handler_console_sql]
583 class = StreamHandler
555 class = StreamHandler
584 args = (sys.stderr,)
556 args = (sys.stderr,)
585 level = WARN
557 level = WARN
586 formatter = generic
558 formatter = generic
587
559
588 ################
560 ################
589 ## FORMATTERS ##
561 ## FORMATTERS ##
590 ################
562 ################
591
563
592 [formatter_generic]
564 [formatter_generic]
593 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
565 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
594 datefmt = %Y-%m-%d %H:%M:%S
566 datefmt = %Y-%m-%d %H:%M:%S
595
567
596 [formatter_color_formatter]
568 [formatter_color_formatter]
597 class=kallithea.lib.colored_formatter.ColorFormatter
569 class=kallithea.lib.colored_formatter.ColorFormatter
598 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
570 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
599 datefmt = %Y-%m-%d %H:%M:%S
571 datefmt = %Y-%m-%d %H:%M:%S
600
572
601 [formatter_color_formatter_sql]
573 [formatter_color_formatter_sql]
602 class=kallithea.lib.colored_formatter.ColorFormatterSql
574 class=kallithea.lib.colored_formatter.ColorFormatterSql
603 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
575 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
604 datefmt = %Y-%m-%d %H:%M:%S
576 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,608 +1,580 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # Kallithea - Example config #
3 # Kallithea - Example config #
4 # Exactly as generated with "paster make-config Kallithea production.ini" #
4 # Exactly as generated with "paster make-config Kallithea production.ini" #
5 # using sqlite and kallithea.db .
5 # using sqlite and kallithea.db .
6 # Note: you should generate your own config with your own UUIDs for security #
6 # Note: you should generate your own config with your own UUIDs for security #
7 # and consider not using sqlite for production. #
7 # and consider not using sqlite for production. #
8 # #
8 # #
9 # The %(here)s variable will be replaced with the parent directory of this file#
9 # The %(here)s variable will be replaced with the parent directory of this file#
10 ################################################################################
10 ################################################################################
11 ################################################################################
11 ################################################################################
12
12
13 [DEFAULT]
13 [DEFAULT]
14 debug = true
14 debug = true
15 pdebug = false
15 pdebug = false
16
16
17 ################################################################################
17 ################################################################################
18 ## Uncomment and replace with the address which should receive ##
18 ## Uncomment and replace with the address which should receive ##
19 ## any error reports after application crash ##
19 ## any error reports after application crash ##
20 ## Additionally those settings will be used by Kallithea mailing system ##
20 ## Additionally those settings will be used by Kallithea mailing system ##
21 ################################################################################
21 ################################################################################
22 #email_to = admin@localhost
22 #email_to = admin@localhost
23 #error_email_from = paste_error@localhost
23 #error_email_from = paste_error@localhost
24 #app_email_from = kallithea-noreply@localhost
24 #app_email_from = kallithea-noreply@localhost
25 #error_message =
25 #error_message =
26 #email_prefix = [Kallithea]
26 #email_prefix = [Kallithea]
27
27
28 #smtp_server = mail.server.com
28 #smtp_server = mail.server.com
29 #smtp_username =
29 #smtp_username =
30 #smtp_password =
30 #smtp_password =
31 #smtp_port =
31 #smtp_port =
32 #smtp_use_tls = false
32 #smtp_use_tls = false
33 #smtp_use_ssl = true
33 #smtp_use_ssl = true
34 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
34 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
35 #smtp_auth =
35 #smtp_auth =
36
36
37 [server:main]
37 [server:main]
38 ## PASTE ##
38 ## PASTE ##
39 #use = egg:Paste#http
39 #use = egg:Paste#http
40 ## nr of worker threads to spawn
40 ## nr of worker threads to spawn
41 #threadpool_workers = 5
41 #threadpool_workers = 5
42 ## max request before thread respawn
42 ## max request before thread respawn
43 #threadpool_max_requests = 10
43 #threadpool_max_requests = 10
44 ## option to use threads of process
44 ## option to use threads of process
45 #use_threadpool = true
45 #use_threadpool = true
46
46
47 ## WAITRESS ##
47 ## WAITRESS ##
48 use = egg:waitress#main
48 use = egg:waitress#main
49 ## number of worker threads
49 ## number of worker threads
50 threads = 5
50 threads = 5
51 ## MAX BODY SIZE 100GB
51 ## MAX BODY SIZE 100GB
52 max_request_body_size = 107374182400
52 max_request_body_size = 107374182400
53 ## use poll instead of select, fixes fd limits, may not work on old
53 ## use poll instead of select, fixes fd limits, may not work on old
54 ## windows systems.
54 ## windows systems.
55 #asyncore_use_poll = True
55 #asyncore_use_poll = True
56
56
57 ## GUNICORN ##
57 ## GUNICORN ##
58 #use = egg:gunicorn#main
58 #use = egg:gunicorn#main
59 ## number of process workers. You must set `instance_id = *` when this option
59 ## number of process workers. You must set `instance_id = *` when this option
60 ## is set to more than one worker
60 ## is set to more than one worker
61 #workers = 1
61 #workers = 1
62 ## process name
62 ## process name
63 #proc_name = kallithea
63 #proc_name = kallithea
64 ## type of worker class, one of sync, eventlet, gevent, tornado
64 ## type of worker class, one of sync, eventlet, gevent, tornado
65 ## recommended for bigger setup is using of of other than sync one
65 ## recommended for bigger setup is using of of other than sync one
66 #worker_class = sync
66 #worker_class = sync
67 #max_requests = 1000
67 #max_requests = 1000
68 ## ammount of time a worker can handle request before it gets killed and
68 ## ammount of time a worker can handle request before it gets killed and
69 ## restarted
69 ## restarted
70 #timeout = 3600
70 #timeout = 3600
71
71
72 ## UWSGI ##
72 ## UWSGI ##
73 ## run with uwsgi --ini-paste-logged <inifile.ini>
73 ## run with uwsgi --ini-paste-logged <inifile.ini>
74 #[uwsgi]
74 #[uwsgi]
75 #socket = /tmp/uwsgi.sock
75 #socket = /tmp/uwsgi.sock
76 #master = true
76 #master = true
77 #http = 127.0.0.1:5000
77 #http = 127.0.0.1:5000
78
78
79 ## set as deamon and redirect all output to file
79 ## set as deamon and redirect all output to file
80 #daemonize = ./uwsgi_kallithea.log
80 #daemonize = ./uwsgi_kallithea.log
81
81
82 ## master process PID
82 ## master process PID
83 #pidfile = ./uwsgi_kallithea.pid
83 #pidfile = ./uwsgi_kallithea.pid
84
84
85 ## stats server with workers statistics, use uwsgitop
85 ## stats server with workers statistics, use uwsgitop
86 ## for monitoring, `uwsgitop 127.0.0.1:1717`
86 ## for monitoring, `uwsgitop 127.0.0.1:1717`
87 #stats = 127.0.0.1:1717
87 #stats = 127.0.0.1:1717
88 #memory-report = true
88 #memory-report = true
89
89
90 ## log 5XX errors
90 ## log 5XX errors
91 #log-5xx = true
91 #log-5xx = true
92
92
93 ## Set the socket listen queue size.
93 ## Set the socket listen queue size.
94 #listen = 256
94 #listen = 256
95
95
96 ## Gracefully Reload workers after the specified amount of managed requests
96 ## Gracefully Reload workers after the specified amount of managed requests
97 ## (avoid memory leaks).
97 ## (avoid memory leaks).
98 #max-requests = 1000
98 #max-requests = 1000
99
99
100 ## enable large buffers
100 ## enable large buffers
101 #buffer-size=65535
101 #buffer-size=65535
102
102
103 ## socket and http timeouts ##
103 ## socket and http timeouts ##
104 #http-timeout=3600
104 #http-timeout=3600
105 #socket-timeout=3600
105 #socket-timeout=3600
106
106
107 ## Log requests slower than the specified number of milliseconds.
107 ## Log requests slower than the specified number of milliseconds.
108 #log-slow = 10
108 #log-slow = 10
109
109
110 ## Exit if no app can be loaded.
110 ## Exit if no app can be loaded.
111 #need-app = true
111 #need-app = true
112
112
113 ## Set lazy mode (load apps in workers instead of master).
113 ## Set lazy mode (load apps in workers instead of master).
114 #lazy = true
114 #lazy = true
115
115
116 ## scaling ##
116 ## scaling ##
117 ## set cheaper algorithm to use, if not set default will be used
117 ## set cheaper algorithm to use, if not set default will be used
118 #cheaper-algo = spare
118 #cheaper-algo = spare
119
119
120 ## minimum number of workers to keep at all times
120 ## minimum number of workers to keep at all times
121 #cheaper = 1
121 #cheaper = 1
122
122
123 ## number of workers to spawn at startup
123 ## number of workers to spawn at startup
124 #cheaper-initial = 1
124 #cheaper-initial = 1
125
125
126 ## maximum number of workers that can be spawned
126 ## maximum number of workers that can be spawned
127 #workers = 4
127 #workers = 4
128
128
129 ## how many workers should be spawned at a time
129 ## how many workers should be spawned at a time
130 #cheaper-step = 1
130 #cheaper-step = 1
131
131
132 ## COMMON ##
132 ## COMMON ##
133 host = 127.0.0.1
133 host = 127.0.0.1
134 port = 5000
134 port = 5000
135
135
136 ## prefix middleware for rc
136 ## prefix middleware for rc
137 #[filter:proxy-prefix]
137 #[filter:proxy-prefix]
138 #use = egg:PasteDeploy#prefix
138 #use = egg:PasteDeploy#prefix
139 #prefix = /<your-prefix>
139 #prefix = /<your-prefix>
140
140
141 [app:main]
141 [app:main]
142 use = egg:kallithea
142 use = egg:kallithea
143 ## enable proxy prefix middleware
143 ## enable proxy prefix middleware
144 #filter-with = proxy-prefix
144 #filter-with = proxy-prefix
145
145
146 full_stack = true
146 full_stack = true
147 static_files = true
147 static_files = true
148 ## Available Languages:
148 ## Available Languages:
149 ## de en fr ja pl pt_BR ru zh_CN zh_TW
149 ## de en fr ja pl pt_BR ru zh_CN zh_TW
150 lang = en
150 lang = en
151 cache_dir = %(here)s/data
151 cache_dir = %(here)s/data
152 index_dir = %(here)s/data/index
152 index_dir = %(here)s/data/index
153
153
154 ## perform a full repository scan on each server start, this should be
154 ## perform a full repository scan on each server start, this should be
155 ## set to false after first startup, to allow faster server restarts.
155 ## set to false after first startup, to allow faster server restarts.
156 initial_repo_scan = false
156 initial_repo_scan = false
157
157
158 ## uncomment and set this path to use archive download cache
158 ## uncomment and set this path to use archive download cache
159 archive_cache_dir = %(here)s/tarballcache
159 archive_cache_dir = %(here)s/tarballcache
160
160
161 ## change this to unique ID for security
161 ## change this to unique ID for security
162 app_instance_uuid = change-me
162 app_instance_uuid = change-me
163
163
164 ## cut off limit for large diffs (size in bytes)
164 ## cut off limit for large diffs (size in bytes)
165 cut_off_limit = 256000
165 cut_off_limit = 256000
166
166
167 ## use cache version of scm repo everywhere
167 ## use cache version of scm repo everywhere
168 vcs_full_cache = true
168 vcs_full_cache = true
169
169
170 ## force https in Kallithea, fixes https redirects, assumes it's always https
170 ## force https in Kallithea, fixes https redirects, assumes it's always https
171 force_https = false
171 force_https = false
172
172
173 ## use Strict-Transport-Security headers
173 ## use Strict-Transport-Security headers
174 use_htsts = false
174 use_htsts = false
175
175
176 ## number of commits stats will parse on each iteration
176 ## number of commits stats will parse on each iteration
177 commit_parse_limit = 25
177 commit_parse_limit = 25
178
178
179 ## use gravatar service to display avatars
180 use_gravatar = true
181
182 ## path to git executable
179 ## path to git executable
183 git_path = git
180 git_path = git
184
181
185 ## git rev filter option, --all is the default filter, if you need to
182 ## git rev filter option, --all is the default filter, if you need to
186 ## hide all refs in changelog switch this to --branches --tags
183 ## hide all refs in changelog switch this to --branches --tags
187 #git_rev_filter = --branches --tags
184 #git_rev_filter = --branches --tags
188
185
189 ## RSS feed options
186 ## RSS feed options
190 rss_cut_off_limit = 256000
187 rss_cut_off_limit = 256000
191 rss_items_per_page = 10
188 rss_items_per_page = 10
192 rss_include_diff = false
189 rss_include_diff = false
193
190
194 ## options for showing and identifying changesets
191 ## options for showing and identifying changesets
195 show_sha_length = 12
192 show_sha_length = 12
196 show_revision_number = true
193 show_revision_number = true
197
194
198 ## gist URL alias, used to create nicer urls for gist. This should be an
195 ## gist URL alias, used to create nicer urls for gist. This should be an
199 ## url that does rewrites to _admin/gists/<gistid>.
196 ## url that does rewrites to _admin/gists/<gistid>.
200 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
197 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
201 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
198 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
202 gist_alias_url =
199 gist_alias_url =
203
200
204 ## white list of API enabled controllers. This allows to add list of
201 ## white list of API enabled controllers. This allows to add list of
205 ## controllers to which access will be enabled by api_key. eg: to enable
202 ## controllers to which access will be enabled by api_key. eg: to enable
206 ## api access to raw_files put `FilesController:raw`, to enable access to patches
203 ## api access to raw_files put `FilesController:raw`, to enable access to patches
207 ## add `ChangesetController:changeset_patch`. This list should be "," separated
204 ## add `ChangesetController:changeset_patch`. This list should be "," separated
208 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
205 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
209 ## Recommended settings below are commented out:
206 ## Recommended settings below are commented out:
210 api_access_controllers_whitelist =
207 api_access_controllers_whitelist =
211 # ChangesetController:changeset_patch,
208 # ChangesetController:changeset_patch,
212 # ChangesetController:changeset_raw,
209 # ChangesetController:changeset_raw,
213 # FilesController:raw,
210 # FilesController:raw,
214 # FilesController:archivefile
211 # FilesController:archivefile
215
212
216 ## alternative_gravatar_url allows you to use your own avatar server application
217 ## the following parts of the URL will be replaced
218 ## {email} user email
219 ## {md5email} md5 hash of the user email (like at gravatar.com)
220 ## {size} size of the image that is expected from the server application
221 ## {scheme} http/https from Kallithea server
222 ## {netloc} network location from Kallithea server
223 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
224 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
225
226
227 ## container auth options
228 container_auth_enabled = false
229 proxypass_auth_enabled = false
230
231 ## default encoding used to convert from and to unicode
213 ## default encoding used to convert from and to unicode
232 ## can be also a comma seperated list of encoding in case of mixed encodings
214 ## can be also a comma seperated list of encoding in case of mixed encodings
233 default_encoding = utf8
215 default_encoding = utf8
234
216
235 ## overwrite schema of clone url
236 ## available vars:
237 ## scheme - http/https
238 ## user - current user
239 ## pass - password
240 ## netloc - network location
241 ## path - usually repo_name
242
243 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
244
245 ## issue tracker for Kallithea (leave blank to disable, absent for default)
217 ## issue tracker for Kallithea (leave blank to disable, absent for default)
246 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
218 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
247
219
248 ## issue tracking mapping for commits messages
220 ## issue tracking mapping for commits messages
249 ## comment out issue_pat, issue_server, issue_prefix to enable
221 ## comment out issue_pat, issue_server, issue_prefix to enable
250
222
251 ## pattern to get the issues from commit messages
223 ## pattern to get the issues from commit messages
252 ## default one used here is #<numbers> with a regex passive group for `#`
224 ## default one used here is #<numbers> with a regex passive group for `#`
253 ## {id} will be all groups matched from this pattern
225 ## {id} will be all groups matched from this pattern
254
226
255 issue_pat = (?:\s*#)(\d+)
227 issue_pat = (?:\s*#)(\d+)
256
228
257 ## server url to the issue, each {id} will be replaced with match
229 ## server url to the issue, each {id} will be replaced with match
258 ## fetched from the regex and {repo} is replaced with full repository name
230 ## fetched from the regex and {repo} is replaced with full repository name
259 ## including groups {repo_name} is replaced with just name of repo
231 ## including groups {repo_name} is replaced with just name of repo
260
232
261 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
233 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
262
234
263 ## prefix to add to link to indicate it's an url
235 ## prefix to add to link to indicate it's an url
264 ## #314 will be replaced by <issue_prefix><id>
236 ## #314 will be replaced by <issue_prefix><id>
265
237
266 issue_prefix = #
238 issue_prefix = #
267
239
268 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
240 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
269 ## multiple patterns, to other issues server, wiki or others
241 ## multiple patterns, to other issues server, wiki or others
270 ## below an example how to create a wiki pattern
242 ## below an example how to create a wiki pattern
271 # wiki-some-id -> https://mywiki.com/some-id
243 # wiki-some-id -> https://mywiki.com/some-id
272
244
273 #issue_pat_wiki = (?:wiki-)(.+)
245 #issue_pat_wiki = (?:wiki-)(.+)
274 #issue_server_link_wiki = https://mywiki.com/{id}
246 #issue_server_link_wiki = https://mywiki.com/{id}
275 #issue_prefix_wiki = WIKI-
247 #issue_prefix_wiki = WIKI-
276
248
277
249
278 ## instance-id prefix
250 ## instance-id prefix
279 ## a prefix key for this instance used for cache invalidation when running
251 ## a prefix key for this instance used for cache invalidation when running
280 ## multiple instances of kallithea, make sure it's globally unique for
252 ## multiple instances of kallithea, make sure it's globally unique for
281 ## all running kallithea instances. Leave empty if you don't use it
253 ## all running kallithea instances. Leave empty if you don't use it
282 instance_id =
254 instance_id =
283
255
284 ## alternative return HTTP header for failed authentication. Default HTTP
256 ## alternative return HTTP header for failed authentication. Default HTTP
285 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
257 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
286 ## handling that. Set this variable to 403 to return HTTPForbidden
258 ## handling that. Set this variable to 403 to return HTTPForbidden
287 auth_ret_code =
259 auth_ret_code =
288
260
289 ## locking return code. When repository is locked return this HTTP code. 2XX
261 ## locking return code. When repository is locked return this HTTP code. 2XX
290 ## codes don't break the transactions while 4XX codes do
262 ## codes don't break the transactions while 4XX codes do
291 lock_ret_code = 423
263 lock_ret_code = 423
292
264
293 ## allows to change the repository location in settings page
265 ## allows to change the repository location in settings page
294 allow_repo_location_change = True
266 allow_repo_location_change = True
295
267
296 ## allows to setup custom hooks in settings page
268 ## allows to setup custom hooks in settings page
297 allow_custom_hooks_settings = True
269 allow_custom_hooks_settings = True
298
270
299
271
300 ####################################
272 ####################################
301 ### CELERY CONFIG ####
273 ### CELERY CONFIG ####
302 ####################################
274 ####################################
303
275
304 use_celery = false
276 use_celery = false
305 broker.host = localhost
277 broker.host = localhost
306 broker.vhost = rabbitmqhost
278 broker.vhost = rabbitmqhost
307 broker.port = 5672
279 broker.port = 5672
308 broker.user = rabbitmq
280 broker.user = rabbitmq
309 broker.password = qweqwe
281 broker.password = qweqwe
310
282
311 celery.imports = kallithea.lib.celerylib.tasks
283 celery.imports = kallithea.lib.celerylib.tasks
312
284
313 celery.result.backend = amqp
285 celery.result.backend = amqp
314 celery.result.dburi = amqp://
286 celery.result.dburi = amqp://
315 celery.result.serialier = json
287 celery.result.serialier = json
316
288
317 #celery.send.task.error.emails = true
289 #celery.send.task.error.emails = true
318 #celery.amqp.task.result.expires = 18000
290 #celery.amqp.task.result.expires = 18000
319
291
320 celeryd.concurrency = 2
292 celeryd.concurrency = 2
321 #celeryd.log.file = celeryd.log
293 #celeryd.log.file = celeryd.log
322 celeryd.log.level = debug
294 celeryd.log.level = debug
323 celeryd.max.tasks.per.child = 1
295 celeryd.max.tasks.per.child = 1
324
296
325 ## tasks will never be sent to the queue, but executed locally instead.
297 ## tasks will never be sent to the queue, but executed locally instead.
326 celery.always.eager = false
298 celery.always.eager = false
327
299
328 ####################################
300 ####################################
329 ### BEAKER CACHE ####
301 ### BEAKER CACHE ####
330 ####################################
302 ####################################
331
303
332 beaker.cache.data_dir=%(here)s/data/cache/data
304 beaker.cache.data_dir=%(here)s/data/cache/data
333 beaker.cache.lock_dir=%(here)s/data/cache/lock
305 beaker.cache.lock_dir=%(here)s/data/cache/lock
334
306
335 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
307 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
336
308
337 beaker.cache.super_short_term.type=memory
309 beaker.cache.super_short_term.type=memory
338 beaker.cache.super_short_term.expire=10
310 beaker.cache.super_short_term.expire=10
339 beaker.cache.super_short_term.key_length = 256
311 beaker.cache.super_short_term.key_length = 256
340
312
341 beaker.cache.short_term.type=memory
313 beaker.cache.short_term.type=memory
342 beaker.cache.short_term.expire=60
314 beaker.cache.short_term.expire=60
343 beaker.cache.short_term.key_length = 256
315 beaker.cache.short_term.key_length = 256
344
316
345 beaker.cache.long_term.type=memory
317 beaker.cache.long_term.type=memory
346 beaker.cache.long_term.expire=36000
318 beaker.cache.long_term.expire=36000
347 beaker.cache.long_term.key_length = 256
319 beaker.cache.long_term.key_length = 256
348
320
349 beaker.cache.sql_cache_short.type=memory
321 beaker.cache.sql_cache_short.type=memory
350 beaker.cache.sql_cache_short.expire=10
322 beaker.cache.sql_cache_short.expire=10
351 beaker.cache.sql_cache_short.key_length = 256
323 beaker.cache.sql_cache_short.key_length = 256
352
324
353 beaker.cache.sql_cache_med.type=memory
325 beaker.cache.sql_cache_med.type=memory
354 beaker.cache.sql_cache_med.expire=360
326 beaker.cache.sql_cache_med.expire=360
355 beaker.cache.sql_cache_med.key_length = 256
327 beaker.cache.sql_cache_med.key_length = 256
356
328
357 beaker.cache.sql_cache_long.type=file
329 beaker.cache.sql_cache_long.type=file
358 beaker.cache.sql_cache_long.expire=3600
330 beaker.cache.sql_cache_long.expire=3600
359 beaker.cache.sql_cache_long.key_length = 256
331 beaker.cache.sql_cache_long.key_length = 256
360
332
361 ####################################
333 ####################################
362 ### BEAKER SESSION ####
334 ### BEAKER SESSION ####
363 ####################################
335 ####################################
364 ## Type of storage used for the session, current types are
336 ## Type of storage used for the session, current types are
365 ## dbm, file, memcached, database, and memory.
337 ## dbm, file, memcached, database, and memory.
366 ## The storage uses the Container API
338 ## The storage uses the Container API
367 ## that is also used by the cache system.
339 ## that is also used by the cache system.
368
340
369 ## db session ##
341 ## db session ##
370 #beaker.session.type = ext:database
342 #beaker.session.type = ext:database
371 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
343 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
372 #beaker.session.table_name = db_session
344 #beaker.session.table_name = db_session
373
345
374 ## encrypted cookie client side session, good for many instances ##
346 ## encrypted cookie client side session, good for many instances ##
375 #beaker.session.type = cookie
347 #beaker.session.type = cookie
376
348
377 ## file based cookies (default) ##
349 ## file based cookies (default) ##
378 #beaker.session.type = file
350 #beaker.session.type = file
379
351
380 beaker.session.key = kallithea
352 beaker.session.key = kallithea
381 beaker.session.secret = change-me
353 beaker.session.secret = change-me
382
354
383 ## Secure encrypted cookie. Requires AES and AES python libraries
355 ## Secure encrypted cookie. Requires AES and AES python libraries
384 ## you must disable beaker.session.secret to use this
356 ## you must disable beaker.session.secret to use this
385 #beaker.session.encrypt_key = <key_for_encryption>
357 #beaker.session.encrypt_key = <key_for_encryption>
386 #beaker.session.validate_key = <validation_key>
358 #beaker.session.validate_key = <validation_key>
387
359
388 ## sets session as invalid if it haven't been accessed for given amount of time
360 ## sets session as invalid if it haven't been accessed for given amount of time
389 beaker.session.timeout = 2592000
361 beaker.session.timeout = 2592000
390 beaker.session.httponly = true
362 beaker.session.httponly = true
391 #beaker.session.cookie_path = /<your-prefix>
363 #beaker.session.cookie_path = /<your-prefix>
392
364
393 ## uncomment for https secure cookie
365 ## uncomment for https secure cookie
394 beaker.session.secure = false
366 beaker.session.secure = false
395
367
396 ## auto save the session to not to use .save()
368 ## auto save the session to not to use .save()
397 beaker.session.auto = False
369 beaker.session.auto = False
398
370
399 ## default cookie expiration time in seconds `true` expire at browser close ##
371 ## default cookie expiration time in seconds `true` expire at browser close ##
400 #beaker.session.cookie_expires = 3600
372 #beaker.session.cookie_expires = 3600
401
373
402
374
403 ############################
375 ############################
404 ## ERROR HANDLING SYSTEMS ##
376 ## ERROR HANDLING SYSTEMS ##
405 ############################
377 ############################
406
378
407 ####################
379 ####################
408 ### [errormator] ###
380 ### [errormator] ###
409 ####################
381 ####################
410
382
411 ## Errormator is tailored to work with Kallithea, see
383 ## Errormator is tailored to work with Kallithea, see
412 ## http://errormator.com for details how to obtain an account
384 ## http://errormator.com for details how to obtain an account
413 ## you must install python package `errormator_client` to make it work
385 ## you must install python package `errormator_client` to make it work
414
386
415 ## errormator enabled
387 ## errormator enabled
416 errormator = false
388 errormator = false
417
389
418 errormator.server_url = https://api.errormator.com
390 errormator.server_url = https://api.errormator.com
419 errormator.api_key = YOUR_API_KEY
391 errormator.api_key = YOUR_API_KEY
420
392
421 ## TWEAK AMOUNT OF INFO SENT HERE
393 ## TWEAK AMOUNT OF INFO SENT HERE
422
394
423 ## enables 404 error logging (default False)
395 ## enables 404 error logging (default False)
424 errormator.report_404 = false
396 errormator.report_404 = false
425
397
426 ## time in seconds after request is considered being slow (default 1)
398 ## time in seconds after request is considered being slow (default 1)
427 errormator.slow_request_time = 1
399 errormator.slow_request_time = 1
428
400
429 ## record slow requests in application
401 ## record slow requests in application
430 ## (needs to be enabled for slow datastore recording and time tracking)
402 ## (needs to be enabled for slow datastore recording and time tracking)
431 errormator.slow_requests = true
403 errormator.slow_requests = true
432
404
433 ## enable hooking to application loggers
405 ## enable hooking to application loggers
434 # errormator.logging = true
406 # errormator.logging = true
435
407
436 ## minimum log level for log capture
408 ## minimum log level for log capture
437 # errormator.logging.level = WARNING
409 # errormator.logging.level = WARNING
438
410
439 ## send logs only from erroneous/slow requests
411 ## send logs only from erroneous/slow requests
440 ## (saves API quota for intensive logging)
412 ## (saves API quota for intensive logging)
441 errormator.logging_on_error = false
413 errormator.logging_on_error = false
442
414
443 ## list of additonal keywords that should be grabbed from environ object
415 ## list of additonal keywords that should be grabbed from environ object
444 ## can be string with comma separated list of words in lowercase
416 ## can be string with comma separated list of words in lowercase
445 ## (by default client will always send following info:
417 ## (by default client will always send following info:
446 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
418 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
447 ## start with HTTP* this list be extended with additional keywords here
419 ## start with HTTP* this list be extended with additional keywords here
448 errormator.environ_keys_whitelist =
420 errormator.environ_keys_whitelist =
449
421
450
422
451 ## list of keywords that should be blanked from request object
423 ## list of keywords that should be blanked from request object
452 ## can be string with comma separated list of words in lowercase
424 ## can be string with comma separated list of words in lowercase
453 ## (by default client will always blank keys that contain following words
425 ## (by default client will always blank keys that contain following words
454 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
426 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
455 ## this list be extended with additional keywords set here
427 ## this list be extended with additional keywords set here
456 errormator.request_keys_blacklist =
428 errormator.request_keys_blacklist =
457
429
458
430
459 ## list of namespaces that should be ignores when gathering log entries
431 ## list of namespaces that should be ignores when gathering log entries
460 ## can be string with comma separated list of namespaces
432 ## can be string with comma separated list of namespaces
461 ## (by default the client ignores own entries: errormator_client.client)
433 ## (by default the client ignores own entries: errormator_client.client)
462 errormator.log_namespace_blacklist =
434 errormator.log_namespace_blacklist =
463
435
464
436
465 ################
437 ################
466 ### [sentry] ###
438 ### [sentry] ###
467 ################
439 ################
468
440
469 ## sentry is a alternative open source error aggregator
441 ## sentry is a alternative open source error aggregator
470 ## you must install python packages `sentry` and `raven` to enable
442 ## you must install python packages `sentry` and `raven` to enable
471
443
472 sentry.dsn = YOUR_DNS
444 sentry.dsn = YOUR_DNS
473 sentry.servers =
445 sentry.servers =
474 sentry.name =
446 sentry.name =
475 sentry.key =
447 sentry.key =
476 sentry.public_key =
448 sentry.public_key =
477 sentry.secret_key =
449 sentry.secret_key =
478 sentry.project =
450 sentry.project =
479 sentry.site =
451 sentry.site =
480 sentry.include_paths =
452 sentry.include_paths =
481 sentry.exclude_paths =
453 sentry.exclude_paths =
482
454
483
455
484 ################################################################################
456 ################################################################################
485 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
457 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
486 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
458 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
487 ## execute malicious code after an exception is raised. ##
459 ## execute malicious code after an exception is raised. ##
488 ################################################################################
460 ################################################################################
489 set debug = false
461 set debug = false
490
462
491 ##################################
463 ##################################
492 ### LOGVIEW CONFIG ###
464 ### LOGVIEW CONFIG ###
493 ##################################
465 ##################################
494
466
495 logview.sqlalchemy = #faa
467 logview.sqlalchemy = #faa
496 logview.pylons.templating = #bfb
468 logview.pylons.templating = #bfb
497 logview.pylons.util = #eee
469 logview.pylons.util = #eee
498
470
499 #########################################################
471 #########################################################
500 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
472 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
501 #########################################################
473 #########################################################
502
474
503 # SQLITE [default]
475 # SQLITE [default]
504 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
476 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
505
477
506 # POSTGRESQL
478 # POSTGRESQL
507 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
479 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
508
480
509 # MySQL
481 # MySQL
510 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
482 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
511
483
512 # see sqlalchemy docs for others
484 # see sqlalchemy docs for others
513
485
514 sqlalchemy.db1.echo = false
486 sqlalchemy.db1.echo = false
515 sqlalchemy.db1.pool_recycle = 3600
487 sqlalchemy.db1.pool_recycle = 3600
516 sqlalchemy.db1.convert_unicode = true
488 sqlalchemy.db1.convert_unicode = true
517
489
518 ################################
490 ################################
519 ### LOGGING CONFIGURATION ####
491 ### LOGGING CONFIGURATION ####
520 ################################
492 ################################
521
493
522 [loggers]
494 [loggers]
523 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
495 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
524
496
525 [handlers]
497 [handlers]
526 keys = console, console_sql
498 keys = console, console_sql
527
499
528 [formatters]
500 [formatters]
529 keys = generic, color_formatter, color_formatter_sql
501 keys = generic, color_formatter, color_formatter_sql
530
502
531 #############
503 #############
532 ## LOGGERS ##
504 ## LOGGERS ##
533 #############
505 #############
534
506
535 [logger_root]
507 [logger_root]
536 level = NOTSET
508 level = NOTSET
537 handlers = console
509 handlers = console
538
510
539 [logger_routes]
511 [logger_routes]
540 level = DEBUG
512 level = DEBUG
541 handlers =
513 handlers =
542 qualname = routes.middleware
514 qualname = routes.middleware
543 ## "level = DEBUG" logs the route matched and routing variables.
515 ## "level = DEBUG" logs the route matched and routing variables.
544 propagate = 1
516 propagate = 1
545
517
546 [logger_beaker]
518 [logger_beaker]
547 level = DEBUG
519 level = DEBUG
548 handlers =
520 handlers =
549 qualname = beaker.container
521 qualname = beaker.container
550 propagate = 1
522 propagate = 1
551
523
552 [logger_templates]
524 [logger_templates]
553 level = INFO
525 level = INFO
554 handlers =
526 handlers =
555 qualname = pylons.templating
527 qualname = pylons.templating
556 propagate = 1
528 propagate = 1
557
529
558 [logger_kallithea]
530 [logger_kallithea]
559 level = DEBUG
531 level = DEBUG
560 handlers =
532 handlers =
561 qualname = kallithea
533 qualname = kallithea
562 propagate = 1
534 propagate = 1
563
535
564 [logger_sqlalchemy]
536 [logger_sqlalchemy]
565 level = INFO
537 level = INFO
566 handlers = console_sql
538 handlers = console_sql
567 qualname = sqlalchemy.engine
539 qualname = sqlalchemy.engine
568 propagate = 0
540 propagate = 0
569
541
570 [logger_whoosh_indexer]
542 [logger_whoosh_indexer]
571 level = DEBUG
543 level = DEBUG
572 handlers =
544 handlers =
573 qualname = whoosh_indexer
545 qualname = whoosh_indexer
574 propagate = 1
546 propagate = 1
575
547
576 ##############
548 ##############
577 ## HANDLERS ##
549 ## HANDLERS ##
578 ##############
550 ##############
579
551
580 [handler_console]
552 [handler_console]
581 class = StreamHandler
553 class = StreamHandler
582 args = (sys.stderr,)
554 args = (sys.stderr,)
583 level = INFO
555 level = INFO
584 formatter = generic
556 formatter = generic
585
557
586 [handler_console_sql]
558 [handler_console_sql]
587 class = StreamHandler
559 class = StreamHandler
588 args = (sys.stderr,)
560 args = (sys.stderr,)
589 level = WARN
561 level = WARN
590 formatter = generic
562 formatter = generic
591
563
592 ################
564 ################
593 ## FORMATTERS ##
565 ## FORMATTERS ##
594 ################
566 ################
595
567
596 [formatter_generic]
568 [formatter_generic]
597 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
569 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
598 datefmt = %Y-%m-%d %H:%M:%S
570 datefmt = %Y-%m-%d %H:%M:%S
599
571
600 [formatter_color_formatter]
572 [formatter_color_formatter]
601 class=kallithea.lib.colored_formatter.ColorFormatter
573 class=kallithea.lib.colored_formatter.ColorFormatter
602 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
574 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
603 datefmt = %Y-%m-%d %H:%M:%S
575 datefmt = %Y-%m-%d %H:%M:%S
604
576
605 [formatter_color_formatter_sql]
577 [formatter_color_formatter_sql]
606 class=kallithea.lib.colored_formatter.ColorFormatterSql
578 class=kallithea.lib.colored_formatter.ColorFormatterSql
607 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
579 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
608 datefmt = %Y-%m-%d %H:%M:%S
580 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,615 +1,587 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 # vcs_full_cache = false #
5 # vcs_full_cache = false #
6 # sqlalchemy and kallithea_test.sqlite #
6 # sqlalchemy and kallithea_test.sqlite #
7 # custom logging #
7 # custom logging #
8 # #
8 # #
9 # The %(here)s variable will be replaced with the parent directory of this file#
9 # The %(here)s variable will be replaced with the parent directory of this file#
10 ################################################################################
10 ################################################################################
11 ################################################################################
11 ################################################################################
12
12
13 [DEFAULT]
13 [DEFAULT]
14 debug = true
14 debug = true
15 pdebug = false
15 pdebug = false
16
16
17 ################################################################################
17 ################################################################################
18 ## Uncomment and replace with the address which should receive ##
18 ## Uncomment and replace with the address which should receive ##
19 ## any error reports after application crash ##
19 ## any error reports after application crash ##
20 ## Additionally those settings will be used by Kallithea mailing system ##
20 ## Additionally those settings will be used by Kallithea mailing system ##
21 ################################################################################
21 ################################################################################
22 #email_to = admin@localhost
22 #email_to = admin@localhost
23 #error_email_from = paste_error@localhost
23 #error_email_from = paste_error@localhost
24 #app_email_from = kallithea-noreply@localhost
24 #app_email_from = kallithea-noreply@localhost
25 #error_message =
25 #error_message =
26 #email_prefix = [Kallithea]
26 #email_prefix = [Kallithea]
27
27
28 #smtp_server = mail.server.com
28 #smtp_server = mail.server.com
29 #smtp_username =
29 #smtp_username =
30 #smtp_password =
30 #smtp_password =
31 #smtp_port =
31 #smtp_port =
32 #smtp_use_tls = false
32 #smtp_use_tls = false
33 #smtp_use_ssl = true
33 #smtp_use_ssl = true
34 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
34 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
35 #smtp_auth =
35 #smtp_auth =
36
36
37 [server:main]
37 [server:main]
38 ## PASTE ##
38 ## PASTE ##
39 #use = egg:Paste#http
39 #use = egg:Paste#http
40 ## nr of worker threads to spawn
40 ## nr of worker threads to spawn
41 #threadpool_workers = 5
41 #threadpool_workers = 5
42 ## max request before thread respawn
42 ## max request before thread respawn
43 #threadpool_max_requests = 10
43 #threadpool_max_requests = 10
44 ## option to use threads of process
44 ## option to use threads of process
45 #use_threadpool = true
45 #use_threadpool = true
46
46
47 ## WAITRESS ##
47 ## WAITRESS ##
48 use = egg:waitress#main
48 use = egg:waitress#main
49 ## number of worker threads
49 ## number of worker threads
50 threads = 5
50 threads = 5
51 ## MAX BODY SIZE 100GB
51 ## MAX BODY SIZE 100GB
52 max_request_body_size = 107374182400
52 max_request_body_size = 107374182400
53 ## use poll instead of select, fixes fd limits, may not work on old
53 ## use poll instead of select, fixes fd limits, may not work on old
54 ## windows systems.
54 ## windows systems.
55 #asyncore_use_poll = True
55 #asyncore_use_poll = True
56
56
57 ## GUNICORN ##
57 ## GUNICORN ##
58 #use = egg:gunicorn#main
58 #use = egg:gunicorn#main
59 ## number of process workers. You must set `instance_id = *` when this option
59 ## number of process workers. You must set `instance_id = *` when this option
60 ## is set to more than one worker
60 ## is set to more than one worker
61 #workers = 1
61 #workers = 1
62 ## process name
62 ## process name
63 #proc_name = kallithea
63 #proc_name = kallithea
64 ## type of worker class, one of sync, eventlet, gevent, tornado
64 ## type of worker class, one of sync, eventlet, gevent, tornado
65 ## recommended for bigger setup is using of of other than sync one
65 ## recommended for bigger setup is using of of other than sync one
66 #worker_class = sync
66 #worker_class = sync
67 #max_requests = 1000
67 #max_requests = 1000
68 ## ammount of time a worker can handle request before it gets killed and
68 ## ammount of time a worker can handle request before it gets killed and
69 ## restarted
69 ## restarted
70 #timeout = 3600
70 #timeout = 3600
71
71
72 ## UWSGI ##
72 ## UWSGI ##
73 ## run with uwsgi --ini-paste-logged <inifile.ini>
73 ## run with uwsgi --ini-paste-logged <inifile.ini>
74 #[uwsgi]
74 #[uwsgi]
75 #socket = /tmp/uwsgi.sock
75 #socket = /tmp/uwsgi.sock
76 #master = true
76 #master = true
77 #http = 127.0.0.1:5000
77 #http = 127.0.0.1:5000
78
78
79 ## set as deamon and redirect all output to file
79 ## set as deamon and redirect all output to file
80 #daemonize = ./uwsgi_kallithea.log
80 #daemonize = ./uwsgi_kallithea.log
81
81
82 ## master process PID
82 ## master process PID
83 #pidfile = ./uwsgi_kallithea.pid
83 #pidfile = ./uwsgi_kallithea.pid
84
84
85 ## stats server with workers statistics, use uwsgitop
85 ## stats server with workers statistics, use uwsgitop
86 ## for monitoring, `uwsgitop 127.0.0.1:1717`
86 ## for monitoring, `uwsgitop 127.0.0.1:1717`
87 #stats = 127.0.0.1:1717
87 #stats = 127.0.0.1:1717
88 #memory-report = true
88 #memory-report = true
89
89
90 ## log 5XX errors
90 ## log 5XX errors
91 #log-5xx = true
91 #log-5xx = true
92
92
93 ## Set the socket listen queue size.
93 ## Set the socket listen queue size.
94 #listen = 256
94 #listen = 256
95
95
96 ## Gracefully Reload workers after the specified amount of managed requests
96 ## Gracefully Reload workers after the specified amount of managed requests
97 ## (avoid memory leaks).
97 ## (avoid memory leaks).
98 #max-requests = 1000
98 #max-requests = 1000
99
99
100 ## enable large buffers
100 ## enable large buffers
101 #buffer-size=65535
101 #buffer-size=65535
102
102
103 ## socket and http timeouts ##
103 ## socket and http timeouts ##
104 #http-timeout=3600
104 #http-timeout=3600
105 #socket-timeout=3600
105 #socket-timeout=3600
106
106
107 ## Log requests slower than the specified number of milliseconds.
107 ## Log requests slower than the specified number of milliseconds.
108 #log-slow = 10
108 #log-slow = 10
109
109
110 ## Exit if no app can be loaded.
110 ## Exit if no app can be loaded.
111 #need-app = true
111 #need-app = true
112
112
113 ## Set lazy mode (load apps in workers instead of master).
113 ## Set lazy mode (load apps in workers instead of master).
114 #lazy = true
114 #lazy = true
115
115
116 ## scaling ##
116 ## scaling ##
117 ## set cheaper algorithm to use, if not set default will be used
117 ## set cheaper algorithm to use, if not set default will be used
118 #cheaper-algo = spare
118 #cheaper-algo = spare
119
119
120 ## minimum number of workers to keep at all times
120 ## minimum number of workers to keep at all times
121 #cheaper = 1
121 #cheaper = 1
122
122
123 ## number of workers to spawn at startup
123 ## number of workers to spawn at startup
124 #cheaper-initial = 1
124 #cheaper-initial = 1
125
125
126 ## maximum number of workers that can be spawned
126 ## maximum number of workers that can be spawned
127 #workers = 4
127 #workers = 4
128
128
129 ## how many workers should be spawned at a time
129 ## how many workers should be spawned at a time
130 #cheaper-step = 1
130 #cheaper-step = 1
131
131
132 ## COMMON ##
132 ## COMMON ##
133 host = 127.0.0.1
133 host = 127.0.0.1
134 port = 5000
134 port = 5000
135
135
136 ## prefix middleware for rc
136 ## prefix middleware for rc
137 #[filter:proxy-prefix]
137 #[filter:proxy-prefix]
138 #use = egg:PasteDeploy#prefix
138 #use = egg:PasteDeploy#prefix
139 #prefix = /<your-prefix>
139 #prefix = /<your-prefix>
140
140
141 [app:main]
141 [app:main]
142 use = egg:kallithea
142 use = egg:kallithea
143 ## enable proxy prefix middleware
143 ## enable proxy prefix middleware
144 #filter-with = proxy-prefix
144 #filter-with = proxy-prefix
145
145
146 full_stack = true
146 full_stack = true
147 static_files = true
147 static_files = true
148 ## Available Languages:
148 ## Available Languages:
149 ## de en fr ja pl pt_BR ru zh_CN zh_TW
149 ## de en fr ja pl pt_BR ru zh_CN zh_TW
150 lang = en
150 lang = en
151 cache_dir = %(here)s/data
151 cache_dir = %(here)s/data
152 index_dir = %(here)s/data/index
152 index_dir = %(here)s/data/index
153
153
154 ## perform a full repository scan on each server start, this should be
154 ## perform a full repository scan on each server start, this should be
155 ## set to false after first startup, to allow faster server restarts.
155 ## set to false after first startup, to allow faster server restarts.
156 #initial_repo_scan = false
156 #initial_repo_scan = false
157 initial_repo_scan = true
157 initial_repo_scan = true
158
158
159 ## uncomment and set this path to use archive download cache
159 ## uncomment and set this path to use archive download cache
160 archive_cache_dir = %(here)s/tarballcache
160 archive_cache_dir = %(here)s/tarballcache
161
161
162 ## change this to unique ID for security
162 ## change this to unique ID for security
163 app_instance_uuid = test
163 app_instance_uuid = test
164
164
165 ## cut off limit for large diffs (size in bytes)
165 ## cut off limit for large diffs (size in bytes)
166 cut_off_limit = 256000
166 cut_off_limit = 256000
167
167
168 ## use cache version of scm repo everywhere
168 ## use cache version of scm repo everywhere
169 #vcs_full_cache = true
169 #vcs_full_cache = true
170 vcs_full_cache = false
170 vcs_full_cache = false
171
171
172 ## force https in Kallithea, fixes https redirects, assumes it's always https
172 ## force https in Kallithea, fixes https redirects, assumes it's always https
173 force_https = false
173 force_https = false
174
174
175 ## use Strict-Transport-Security headers
175 ## use Strict-Transport-Security headers
176 use_htsts = false
176 use_htsts = false
177
177
178 ## number of commits stats will parse on each iteration
178 ## number of commits stats will parse on each iteration
179 commit_parse_limit = 25
179 commit_parse_limit = 25
180
180
181 ## use gravatar service to display avatars
182 use_gravatar = true
183
184 ## path to git executable
181 ## path to git executable
185 git_path = git
182 git_path = git
186
183
187 ## git rev filter option, --all is the default filter, if you need to
184 ## git rev filter option, --all is the default filter, if you need to
188 ## hide all refs in changelog switch this to --branches --tags
185 ## hide all refs in changelog switch this to --branches --tags
189 #git_rev_filter = --branches --tags
186 #git_rev_filter = --branches --tags
190
187
191 ## RSS feed options
188 ## RSS feed options
192 rss_cut_off_limit = 256000
189 rss_cut_off_limit = 256000
193 rss_items_per_page = 10
190 rss_items_per_page = 10
194 rss_include_diff = false
191 rss_include_diff = false
195
192
196 ## options for showing and identifying changesets
193 ## options for showing and identifying changesets
197 show_sha_length = 12
194 show_sha_length = 12
198 show_revision_number = true
195 show_revision_number = true
199
196
200 ## gist URL alias, used to create nicer urls for gist. This should be an
197 ## gist URL alias, used to create nicer urls for gist. This should be an
201 ## url that does rewrites to _admin/gists/<gistid>.
198 ## url that does rewrites to _admin/gists/<gistid>.
202 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
199 ## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
203 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
200 ## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
204 gist_alias_url =
201 gist_alias_url =
205
202
206 ## white list of API enabled controllers. This allows to add list of
203 ## white list of API enabled controllers. This allows to add list of
207 ## controllers to which access will be enabled by api_key. eg: to enable
204 ## controllers to which access will be enabled by api_key. eg: to enable
208 ## api access to raw_files put `FilesController:raw`, to enable access to patches
205 ## api access to raw_files put `FilesController:raw`, to enable access to patches
209 ## add `ChangesetController:changeset_patch`. This list should be "," separated
206 ## add `ChangesetController:changeset_patch`. This list should be "," separated
210 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
207 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
211 ## Recommended settings below are commented out:
208 ## Recommended settings below are commented out:
212 api_access_controllers_whitelist =
209 api_access_controllers_whitelist =
213 # ChangesetController:changeset_patch,
210 # ChangesetController:changeset_patch,
214 # ChangesetController:changeset_raw,
211 # ChangesetController:changeset_raw,
215 # FilesController:raw,
212 # FilesController:raw,
216 # FilesController:archivefile
213 # FilesController:archivefile
217
214
218 ## alternative_gravatar_url allows you to use your own avatar server application
219 ## the following parts of the URL will be replaced
220 ## {email} user email
221 ## {md5email} md5 hash of the user email (like at gravatar.com)
222 ## {size} size of the image that is expected from the server application
223 ## {scheme} http/https from Kallithea server
224 ## {netloc} network location from Kallithea server
225 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
226 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
227
228
229 ## container auth options
230 container_auth_enabled = false
231 proxypass_auth_enabled = false
232
233 ## default encoding used to convert from and to unicode
215 ## default encoding used to convert from and to unicode
234 ## can be also a comma seperated list of encoding in case of mixed encodings
216 ## can be also a comma seperated list of encoding in case of mixed encodings
235 default_encoding = utf8
217 default_encoding = utf8
236
218
237 ## overwrite schema of clone url
238 ## available vars:
239 ## scheme - http/https
240 ## user - current user
241 ## pass - password
242 ## netloc - network location
243 ## path - usually repo_name
244
245 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
246
247 ## issue tracker for Kallithea (leave blank to disable, absent for default)
219 ## issue tracker for Kallithea (leave blank to disable, absent for default)
248 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
220 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
249
221
250 ## issue tracking mapping for commits messages
222 ## issue tracking mapping for commits messages
251 ## comment out issue_pat, issue_server, issue_prefix to enable
223 ## comment out issue_pat, issue_server, issue_prefix to enable
252
224
253 ## pattern to get the issues from commit messages
225 ## pattern to get the issues from commit messages
254 ## default one used here is #<numbers> with a regex passive group for `#`
226 ## default one used here is #<numbers> with a regex passive group for `#`
255 ## {id} will be all groups matched from this pattern
227 ## {id} will be all groups matched from this pattern
256
228
257 issue_pat = (?:\s*#)(\d+)
229 issue_pat = (?:\s*#)(\d+)
258
230
259 ## server url to the issue, each {id} will be replaced with match
231 ## server url to the issue, each {id} will be replaced with match
260 ## fetched from the regex and {repo} is replaced with full repository name
232 ## fetched from the regex and {repo} is replaced with full repository name
261 ## including groups {repo_name} is replaced with just name of repo
233 ## including groups {repo_name} is replaced with just name of repo
262
234
263 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
235 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
264
236
265 ## prefix to add to link to indicate it's an url
237 ## prefix to add to link to indicate it's an url
266 ## #314 will be replaced by <issue_prefix><id>
238 ## #314 will be replaced by <issue_prefix><id>
267
239
268 issue_prefix = #
240 issue_prefix = #
269
241
270 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
242 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
271 ## multiple patterns, to other issues server, wiki or others
243 ## multiple patterns, to other issues server, wiki or others
272 ## below an example how to create a wiki pattern
244 ## below an example how to create a wiki pattern
273 # wiki-some-id -> https://mywiki.com/some-id
245 # wiki-some-id -> https://mywiki.com/some-id
274
246
275 #issue_pat_wiki = (?:wiki-)(.+)
247 #issue_pat_wiki = (?:wiki-)(.+)
276 #issue_server_link_wiki = https://mywiki.com/{id}
248 #issue_server_link_wiki = https://mywiki.com/{id}
277 #issue_prefix_wiki = WIKI-
249 #issue_prefix_wiki = WIKI-
278
250
279
251
280 ## instance-id prefix
252 ## instance-id prefix
281 ## a prefix key for this instance used for cache invalidation when running
253 ## a prefix key for this instance used for cache invalidation when running
282 ## multiple instances of kallithea, make sure it's globally unique for
254 ## multiple instances of kallithea, make sure it's globally unique for
283 ## all running kallithea instances. Leave empty if you don't use it
255 ## all running kallithea instances. Leave empty if you don't use it
284 instance_id =
256 instance_id =
285
257
286 ## alternative return HTTP header for failed authentication. Default HTTP
258 ## alternative return HTTP header for failed authentication. Default HTTP
287 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
259 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
288 ## handling that. Set this variable to 403 to return HTTPForbidden
260 ## handling that. Set this variable to 403 to return HTTPForbidden
289 auth_ret_code =
261 auth_ret_code =
290
262
291 ## locking return code. When repository is locked return this HTTP code. 2XX
263 ## locking return code. When repository is locked return this HTTP code. 2XX
292 ## codes don't break the transactions while 4XX codes do
264 ## codes don't break the transactions while 4XX codes do
293 lock_ret_code = 423
265 lock_ret_code = 423
294
266
295 ## allows to change the repository location in settings page
267 ## allows to change the repository location in settings page
296 allow_repo_location_change = True
268 allow_repo_location_change = True
297
269
298 ## allows to setup custom hooks in settings page
270 ## allows to setup custom hooks in settings page
299 allow_custom_hooks_settings = True
271 allow_custom_hooks_settings = True
300
272
301
273
302 ####################################
274 ####################################
303 ### CELERY CONFIG ####
275 ### CELERY CONFIG ####
304 ####################################
276 ####################################
305
277
306 use_celery = false
278 use_celery = false
307 broker.host = localhost
279 broker.host = localhost
308 broker.vhost = rabbitmqhost
280 broker.vhost = rabbitmqhost
309 broker.port = 5672
281 broker.port = 5672
310 broker.user = rabbitmq
282 broker.user = rabbitmq
311 broker.password = qweqwe
283 broker.password = qweqwe
312
284
313 celery.imports = kallithea.lib.celerylib.tasks
285 celery.imports = kallithea.lib.celerylib.tasks
314
286
315 celery.result.backend = amqp
287 celery.result.backend = amqp
316 celery.result.dburi = amqp://
288 celery.result.dburi = amqp://
317 celery.result.serialier = json
289 celery.result.serialier = json
318
290
319 #celery.send.task.error.emails = true
291 #celery.send.task.error.emails = true
320 #celery.amqp.task.result.expires = 18000
292 #celery.amqp.task.result.expires = 18000
321
293
322 celeryd.concurrency = 2
294 celeryd.concurrency = 2
323 #celeryd.log.file = celeryd.log
295 #celeryd.log.file = celeryd.log
324 celeryd.log.level = debug
296 celeryd.log.level = debug
325 celeryd.max.tasks.per.child = 1
297 celeryd.max.tasks.per.child = 1
326
298
327 ## tasks will never be sent to the queue, but executed locally instead.
299 ## tasks will never be sent to the queue, but executed locally instead.
328 celery.always.eager = false
300 celery.always.eager = false
329
301
330 ####################################
302 ####################################
331 ### BEAKER CACHE ####
303 ### BEAKER CACHE ####
332 ####################################
304 ####################################
333
305
334 beaker.cache.data_dir=%(here)s/data/cache/data
306 beaker.cache.data_dir=%(here)s/data/cache/data
335 beaker.cache.lock_dir=%(here)s/data/cache/lock
307 beaker.cache.lock_dir=%(here)s/data/cache/lock
336
308
337 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
309 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
338
310
339 beaker.cache.super_short_term.type=memory
311 beaker.cache.super_short_term.type=memory
340 beaker.cache.super_short_term.expire=10
312 beaker.cache.super_short_term.expire=10
341 beaker.cache.super_short_term.key_length = 256
313 beaker.cache.super_short_term.key_length = 256
342
314
343 beaker.cache.short_term.type=memory
315 beaker.cache.short_term.type=memory
344 beaker.cache.short_term.expire=60
316 beaker.cache.short_term.expire=60
345 beaker.cache.short_term.key_length = 256
317 beaker.cache.short_term.key_length = 256
346
318
347 beaker.cache.long_term.type=memory
319 beaker.cache.long_term.type=memory
348 beaker.cache.long_term.expire=36000
320 beaker.cache.long_term.expire=36000
349 beaker.cache.long_term.key_length = 256
321 beaker.cache.long_term.key_length = 256
350
322
351 beaker.cache.sql_cache_short.type=memory
323 beaker.cache.sql_cache_short.type=memory
352 beaker.cache.sql_cache_short.expire=10
324 beaker.cache.sql_cache_short.expire=10
353 beaker.cache.sql_cache_short.key_length = 256
325 beaker.cache.sql_cache_short.key_length = 256
354
326
355 beaker.cache.sql_cache_med.type=memory
327 beaker.cache.sql_cache_med.type=memory
356 beaker.cache.sql_cache_med.expire=360
328 beaker.cache.sql_cache_med.expire=360
357 beaker.cache.sql_cache_med.key_length = 256
329 beaker.cache.sql_cache_med.key_length = 256
358
330
359 beaker.cache.sql_cache_long.type=file
331 beaker.cache.sql_cache_long.type=file
360 beaker.cache.sql_cache_long.expire=3600
332 beaker.cache.sql_cache_long.expire=3600
361 beaker.cache.sql_cache_long.key_length = 256
333 beaker.cache.sql_cache_long.key_length = 256
362
334
363 ####################################
335 ####################################
364 ### BEAKER SESSION ####
336 ### BEAKER SESSION ####
365 ####################################
337 ####################################
366 ## Type of storage used for the session, current types are
338 ## Type of storage used for the session, current types are
367 ## dbm, file, memcached, database, and memory.
339 ## dbm, file, memcached, database, and memory.
368 ## The storage uses the Container API
340 ## The storage uses the Container API
369 ## that is also used by the cache system.
341 ## that is also used by the cache system.
370
342
371 ## db session ##
343 ## db session ##
372 #beaker.session.type = ext:database
344 #beaker.session.type = ext:database
373 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
345 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
374 #beaker.session.table_name = db_session
346 #beaker.session.table_name = db_session
375
347
376 ## encrypted cookie client side session, good for many instances ##
348 ## encrypted cookie client side session, good for many instances ##
377 #beaker.session.type = cookie
349 #beaker.session.type = cookie
378
350
379 ## file based cookies (default) ##
351 ## file based cookies (default) ##
380 #beaker.session.type = file
352 #beaker.session.type = file
381
353
382 beaker.session.key = kallithea
354 beaker.session.key = kallithea
383 beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f}
355 beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f}
384
356
385 ## Secure encrypted cookie. Requires AES and AES python libraries
357 ## Secure encrypted cookie. Requires AES and AES python libraries
386 ## you must disable beaker.session.secret to use this
358 ## you must disable beaker.session.secret to use this
387 #beaker.session.encrypt_key = <key_for_encryption>
359 #beaker.session.encrypt_key = <key_for_encryption>
388 #beaker.session.validate_key = <validation_key>
360 #beaker.session.validate_key = <validation_key>
389
361
390 ## sets session as invalid if it haven't been accessed for given amount of time
362 ## sets session as invalid if it haven't been accessed for given amount of time
391 beaker.session.timeout = 2592000
363 beaker.session.timeout = 2592000
392 beaker.session.httponly = true
364 beaker.session.httponly = true
393 #beaker.session.cookie_path = /<your-prefix>
365 #beaker.session.cookie_path = /<your-prefix>
394
366
395 ## uncomment for https secure cookie
367 ## uncomment for https secure cookie
396 beaker.session.secure = false
368 beaker.session.secure = false
397
369
398 ## auto save the session to not to use .save()
370 ## auto save the session to not to use .save()
399 beaker.session.auto = False
371 beaker.session.auto = False
400
372
401 ## default cookie expiration time in seconds `true` expire at browser close ##
373 ## default cookie expiration time in seconds `true` expire at browser close ##
402 #beaker.session.cookie_expires = 3600
374 #beaker.session.cookie_expires = 3600
403
375
404
376
405 ############################
377 ############################
406 ## ERROR HANDLING SYSTEMS ##
378 ## ERROR HANDLING SYSTEMS ##
407 ############################
379 ############################
408
380
409 ####################
381 ####################
410 ### [errormator] ###
382 ### [errormator] ###
411 ####################
383 ####################
412
384
413 ## Errormator is tailored to work with Kallithea, see
385 ## Errormator is tailored to work with Kallithea, see
414 ## http://errormator.com for details how to obtain an account
386 ## http://errormator.com for details how to obtain an account
415 ## you must install python package `errormator_client` to make it work
387 ## you must install python package `errormator_client` to make it work
416
388
417 ## errormator enabled
389 ## errormator enabled
418 errormator = false
390 errormator = false
419
391
420 errormator.server_url = https://api.errormator.com
392 errormator.server_url = https://api.errormator.com
421 errormator.api_key = YOUR_API_KEY
393 errormator.api_key = YOUR_API_KEY
422
394
423 ## TWEAK AMOUNT OF INFO SENT HERE
395 ## TWEAK AMOUNT OF INFO SENT HERE
424
396
425 ## enables 404 error logging (default False)
397 ## enables 404 error logging (default False)
426 errormator.report_404 = false
398 errormator.report_404 = false
427
399
428 ## time in seconds after request is considered being slow (default 1)
400 ## time in seconds after request is considered being slow (default 1)
429 errormator.slow_request_time = 1
401 errormator.slow_request_time = 1
430
402
431 ## record slow requests in application
403 ## record slow requests in application
432 ## (needs to be enabled for slow datastore recording and time tracking)
404 ## (needs to be enabled for slow datastore recording and time tracking)
433 errormator.slow_requests = true
405 errormator.slow_requests = true
434
406
435 ## enable hooking to application loggers
407 ## enable hooking to application loggers
436 # errormator.logging = true
408 # errormator.logging = true
437
409
438 ## minimum log level for log capture
410 ## minimum log level for log capture
439 # errormator.logging.level = WARNING
411 # errormator.logging.level = WARNING
440
412
441 ## send logs only from erroneous/slow requests
413 ## send logs only from erroneous/slow requests
442 ## (saves API quota for intensive logging)
414 ## (saves API quota for intensive logging)
443 errormator.logging_on_error = false
415 errormator.logging_on_error = false
444
416
445 ## list of additonal keywords that should be grabbed from environ object
417 ## list of additonal keywords that should be grabbed from environ object
446 ## can be string with comma separated list of words in lowercase
418 ## can be string with comma separated list of words in lowercase
447 ## (by default client will always send following info:
419 ## (by default client will always send following info:
448 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
420 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
449 ## start with HTTP* this list be extended with additional keywords here
421 ## start with HTTP* this list be extended with additional keywords here
450 errormator.environ_keys_whitelist =
422 errormator.environ_keys_whitelist =
451
423
452
424
453 ## list of keywords that should be blanked from request object
425 ## list of keywords that should be blanked from request object
454 ## can be string with comma separated list of words in lowercase
426 ## can be string with comma separated list of words in lowercase
455 ## (by default client will always blank keys that contain following words
427 ## (by default client will always blank keys that contain following words
456 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
428 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
457 ## this list be extended with additional keywords set here
429 ## this list be extended with additional keywords set here
458 errormator.request_keys_blacklist =
430 errormator.request_keys_blacklist =
459
431
460
432
461 ## list of namespaces that should be ignores when gathering log entries
433 ## list of namespaces that should be ignores when gathering log entries
462 ## can be string with comma separated list of namespaces
434 ## can be string with comma separated list of namespaces
463 ## (by default the client ignores own entries: errormator_client.client)
435 ## (by default the client ignores own entries: errormator_client.client)
464 errormator.log_namespace_blacklist =
436 errormator.log_namespace_blacklist =
465
437
466
438
467 ################
439 ################
468 ### [sentry] ###
440 ### [sentry] ###
469 ################
441 ################
470
442
471 ## sentry is a alternative open source error aggregator
443 ## sentry is a alternative open source error aggregator
472 ## you must install python packages `sentry` and `raven` to enable
444 ## you must install python packages `sentry` and `raven` to enable
473
445
474 sentry.dsn = YOUR_DNS
446 sentry.dsn = YOUR_DNS
475 sentry.servers =
447 sentry.servers =
476 sentry.name =
448 sentry.name =
477 sentry.key =
449 sentry.key =
478 sentry.public_key =
450 sentry.public_key =
479 sentry.secret_key =
451 sentry.secret_key =
480 sentry.project =
452 sentry.project =
481 sentry.site =
453 sentry.site =
482 sentry.include_paths =
454 sentry.include_paths =
483 sentry.exclude_paths =
455 sentry.exclude_paths =
484
456
485
457
486 ################################################################################
458 ################################################################################
487 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
459 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
488 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
460 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
489 ## execute malicious code after an exception is raised. ##
461 ## execute malicious code after an exception is raised. ##
490 ################################################################################
462 ################################################################################
491 set debug = false
463 set debug = false
492
464
493 ##################################
465 ##################################
494 ### LOGVIEW CONFIG ###
466 ### LOGVIEW CONFIG ###
495 ##################################
467 ##################################
496
468
497 logview.sqlalchemy = #faa
469 logview.sqlalchemy = #faa
498 logview.pylons.templating = #bfb
470 logview.pylons.templating = #bfb
499 logview.pylons.util = #eee
471 logview.pylons.util = #eee
500
472
501 #########################################################
473 #########################################################
502 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
474 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
503 #########################################################
475 #########################################################
504
476
505 # SQLITE [default]
477 # SQLITE [default]
506 #sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
478 #sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
507 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite
479 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite
508
480
509 # POSTGRESQL
481 # POSTGRESQL
510 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
482 # sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
511
483
512 # MySQL
484 # MySQL
513 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
485 # sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
514
486
515 # see sqlalchemy docs for others
487 # see sqlalchemy docs for others
516
488
517 sqlalchemy.db1.echo = false
489 sqlalchemy.db1.echo = false
518 sqlalchemy.db1.pool_recycle = 3600
490 sqlalchemy.db1.pool_recycle = 3600
519 sqlalchemy.db1.convert_unicode = true
491 sqlalchemy.db1.convert_unicode = true
520
492
521 ################################
493 ################################
522 ### LOGGING CONFIGURATION ####
494 ### LOGGING CONFIGURATION ####
523 ################################
495 ################################
524
496
525 [loggers]
497 [loggers]
526 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
498 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
527
499
528 [handlers]
500 [handlers]
529 keys = console, console_sql
501 keys = console, console_sql
530
502
531 [formatters]
503 [formatters]
532 keys = generic, color_formatter, color_formatter_sql
504 keys = generic, color_formatter, color_formatter_sql
533
505
534 #############
506 #############
535 ## LOGGERS ##
507 ## LOGGERS ##
536 #############
508 #############
537
509
538 [logger_root]
510 [logger_root]
539 #level = NOTSET
511 #level = NOTSET
540 level = DEBUG
512 level = DEBUG
541 handlers = console
513 handlers = console
542
514
543 [logger_routes]
515 [logger_routes]
544 level = DEBUG
516 level = DEBUG
545 handlers =
517 handlers =
546 qualname = routes.middleware
518 qualname = routes.middleware
547 ## "level = DEBUG" logs the route matched and routing variables.
519 ## "level = DEBUG" logs the route matched and routing variables.
548 propagate = 1
520 propagate = 1
549
521
550 [logger_beaker]
522 [logger_beaker]
551 level = DEBUG
523 level = DEBUG
552 handlers =
524 handlers =
553 qualname = beaker.container
525 qualname = beaker.container
554 propagate = 1
526 propagate = 1
555
527
556 [logger_templates]
528 [logger_templates]
557 level = INFO
529 level = INFO
558 handlers =
530 handlers =
559 qualname = pylons.templating
531 qualname = pylons.templating
560 propagate = 1
532 propagate = 1
561
533
562 [logger_kallithea]
534 [logger_kallithea]
563 level = DEBUG
535 level = DEBUG
564 handlers =
536 handlers =
565 qualname = kallithea
537 qualname = kallithea
566 propagate = 1
538 propagate = 1
567
539
568 [logger_sqlalchemy]
540 [logger_sqlalchemy]
569 #level = INFO
541 #level = INFO
570 #handlers = console_sql
542 #handlers = console_sql
571 level = ERROR
543 level = ERROR
572 handlers = console
544 handlers = console
573 qualname = sqlalchemy.engine
545 qualname = sqlalchemy.engine
574 propagate = 0
546 propagate = 0
575
547
576 [logger_whoosh_indexer]
548 [logger_whoosh_indexer]
577 level = DEBUG
549 level = DEBUG
578 handlers =
550 handlers =
579 qualname = whoosh_indexer
551 qualname = whoosh_indexer
580 propagate = 1
552 propagate = 1
581
553
582 ##############
554 ##############
583 ## HANDLERS ##
555 ## HANDLERS ##
584 ##############
556 ##############
585
557
586 [handler_console]
558 [handler_console]
587 class = StreamHandler
559 class = StreamHandler
588 args = (sys.stderr,)
560 args = (sys.stderr,)
589 #level = INFO
561 #level = INFO
590 level = NOTSET
562 level = NOTSET
591 formatter = generic
563 formatter = generic
592
564
593 [handler_console_sql]
565 [handler_console_sql]
594 class = StreamHandler
566 class = StreamHandler
595 args = (sys.stderr,)
567 args = (sys.stderr,)
596 level = WARN
568 level = WARN
597 formatter = generic
569 formatter = generic
598
570
599 ################
571 ################
600 ## FORMATTERS ##
572 ## FORMATTERS ##
601 ################
573 ################
602
574
603 [formatter_generic]
575 [formatter_generic]
604 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
576 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
605 datefmt = %Y-%m-%d %H:%M:%S
577 datefmt = %Y-%m-%d %H:%M:%S
606
578
607 [formatter_color_formatter]
579 [formatter_color_formatter]
608 class=kallithea.lib.colored_formatter.ColorFormatter
580 class=kallithea.lib.colored_formatter.ColorFormatter
609 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
581 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
610 datefmt = %Y-%m-%d %H:%M:%S
582 datefmt = %Y-%m-%d %H:%M:%S
611
583
612 [formatter_color_formatter_sql]
584 [formatter_color_formatter_sql]
613 class=kallithea.lib.colored_formatter.ColorFormatterSql
585 class=kallithea.lib.colored_formatter.ColorFormatterSql
614 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
586 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
615 datefmt = %Y-%m-%d %H:%M:%S
587 datefmt = %Y-%m-%d %H:%M:%S
General Comments 0
You need to be logged in to leave comments. Login now