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