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