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