Show More
@@ -1,309 +1,310 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
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 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
|
42 | use = egg:waitress#main | |||
42 | host = 0.0.0.0 |
|
43 | host = 0.0.0.0 | |
43 | port = 5000 |
|
44 | port = 5000 | |
44 |
|
45 | |||
45 | [app:main] |
|
46 | [app:main] | |
46 | use = egg:rhodecode |
|
47 | use = egg:rhodecode | |
47 | full_stack = true |
|
48 | full_stack = true | |
48 | static_files = true |
|
49 | static_files = true | |
49 | # Optional Languages |
|
50 | # Optional Languages | |
50 | # en, fr, pt_BR, zh_CN, zh_TW |
|
51 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
51 | lang = en |
|
52 | lang = en | |
52 | cache_dir = %(here)s/data |
|
53 | cache_dir = %(here)s/data | |
53 | index_dir = %(here)s/data/index |
|
54 | index_dir = %(here)s/data/index | |
54 | app_instance_uuid = rc-develop |
|
55 | app_instance_uuid = rc-develop | |
55 | cut_off_limit = 256000 |
|
56 | cut_off_limit = 256000 | |
56 | force_https = false |
|
57 | force_https = false | |
57 | commit_parse_limit = 25 |
|
58 | commit_parse_limit = 25 | |
58 | use_gravatar = true |
|
59 | use_gravatar = true | |
59 | container_auth_enabled = false |
|
60 | container_auth_enabled = false | |
60 | proxypass_auth_enabled = false |
|
61 | proxypass_auth_enabled = false | |
61 | default_encoding = utf8 |
|
62 | default_encoding = utf8 | |
62 |
|
63 | |||
63 | ## overwrite schema of clone url |
|
64 | ## overwrite schema of clone url | |
64 | ## available vars: |
|
65 | ## available vars: | |
65 | ## scheme - http/https |
|
66 | ## scheme - http/https | |
66 | ## user - current user |
|
67 | ## user - current user | |
67 | ## pass - password |
|
68 | ## pass - password | |
68 | ## netloc - network location |
|
69 | ## netloc - network location | |
69 | ## path - usually repo_name |
|
70 | ## path - usually repo_name | |
70 |
|
71 | |||
71 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
72 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
72 |
|
73 | |||
73 | ## issue tracking mapping for commits messages |
|
74 | ## issue tracking mapping for commits messages | |
74 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
75 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
75 |
|
76 | |||
76 | ## pattern to get the issues from commit messages |
|
77 | ## pattern to get the issues from commit messages | |
77 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
78 | ## default one used here is #<numbers> with a regex passive group for `#` | |
78 | ## {id} will be all groups matched from this pattern |
|
79 | ## {id} will be all groups matched from this pattern | |
79 |
|
80 | |||
80 | issue_pat = (?:\s*#)(\d+) |
|
81 | issue_pat = (?:\s*#)(\d+) | |
81 |
|
82 | |||
82 | ## server url to the issue, each {id} will be replaced with match |
|
83 | ## server url to the issue, each {id} will be replaced with match | |
83 | ## fetched from the regex and {repo} is replaced with full repository name |
|
84 | ## fetched from the regex and {repo} is replaced with full repository name | |
84 | ## including groups {repo_name} is replaced with just name of repo |
|
85 | ## including groups {repo_name} is replaced with just name of repo | |
85 |
|
86 | |||
86 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
87 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
87 |
|
88 | |||
88 | ## prefix to add to link to indicate it's an url |
|
89 | ## prefix to add to link to indicate it's an url | |
89 | ## #314 will be replaced by <issue_prefix><id> |
|
90 | ## #314 will be replaced by <issue_prefix><id> | |
90 |
|
91 | |||
91 | issue_prefix = # |
|
92 | issue_prefix = # | |
92 |
|
93 | |||
93 | ## instance-id prefix |
|
94 | ## instance-id prefix | |
94 | ## a prefix key for this instance used for cache invalidation when running |
|
95 | ## a prefix key for this instance used for cache invalidation when running | |
95 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
96 | ## multiple instances of rhodecode, make sure it's globally unique for | |
96 | ## all running rhodecode instances. Leave empty if you don't use it |
|
97 | ## all running rhodecode instances. Leave empty if you don't use it | |
97 | instance_id = |
|
98 | instance_id = | |
98 |
|
99 | |||
99 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
100 | ## alternative return HTTP header for failed authentication. Default HTTP | |
100 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
101 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
101 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
102 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
102 | auth_ret_code = |
|
103 | auth_ret_code = | |
103 |
|
104 | |||
104 | #################################### |
|
105 | #################################### | |
105 | ### CELERY CONFIG #### |
|
106 | ### CELERY CONFIG #### | |
106 | #################################### |
|
107 | #################################### | |
107 | use_celery = false |
|
108 | use_celery = false | |
108 | broker.host = localhost |
|
109 | broker.host = localhost | |
109 | broker.vhost = rabbitmqhost |
|
110 | broker.vhost = rabbitmqhost | |
110 | broker.port = 5672 |
|
111 | broker.port = 5672 | |
111 | broker.user = rabbitmq |
|
112 | broker.user = rabbitmq | |
112 | broker.password = qweqwe |
|
113 | broker.password = qweqwe | |
113 |
|
114 | |||
114 | celery.imports = rhodecode.lib.celerylib.tasks |
|
115 | celery.imports = rhodecode.lib.celerylib.tasks | |
115 |
|
116 | |||
116 | celery.result.backend = amqp |
|
117 | celery.result.backend = amqp | |
117 | celery.result.dburi = amqp:// |
|
118 | celery.result.dburi = amqp:// | |
118 | celery.result.serialier = json |
|
119 | celery.result.serialier = json | |
119 |
|
120 | |||
120 | #celery.send.task.error.emails = true |
|
121 | #celery.send.task.error.emails = true | |
121 | #celery.amqp.task.result.expires = 18000 |
|
122 | #celery.amqp.task.result.expires = 18000 | |
122 |
|
123 | |||
123 | celeryd.concurrency = 2 |
|
124 | celeryd.concurrency = 2 | |
124 | #celeryd.log.file = celeryd.log |
|
125 | #celeryd.log.file = celeryd.log | |
125 | celeryd.log.level = debug |
|
126 | celeryd.log.level = debug | |
126 | celeryd.max.tasks.per.child = 1 |
|
127 | celeryd.max.tasks.per.child = 1 | |
127 |
|
128 | |||
128 | #tasks will never be sent to the queue, but executed locally instead. |
|
129 | #tasks will never be sent to the queue, but executed locally instead. | |
129 | celery.always.eager = false |
|
130 | celery.always.eager = false | |
130 |
|
131 | |||
131 | #################################### |
|
132 | #################################### | |
132 | ### BEAKER CACHE #### |
|
133 | ### BEAKER CACHE #### | |
133 | #################################### |
|
134 | #################################### | |
134 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
135 | beaker.cache.data_dir=%(here)s/data/cache/data | |
135 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
136 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
136 |
|
137 | |||
137 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
138 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
138 |
|
139 | |||
139 | beaker.cache.super_short_term.type=memory |
|
140 | beaker.cache.super_short_term.type=memory | |
140 | beaker.cache.super_short_term.expire=10 |
|
141 | beaker.cache.super_short_term.expire=10 | |
141 | beaker.cache.super_short_term.key_length = 256 |
|
142 | beaker.cache.super_short_term.key_length = 256 | |
142 |
|
143 | |||
143 | beaker.cache.short_term.type=memory |
|
144 | beaker.cache.short_term.type=memory | |
144 | beaker.cache.short_term.expire=60 |
|
145 | beaker.cache.short_term.expire=60 | |
145 | beaker.cache.short_term.key_length = 256 |
|
146 | beaker.cache.short_term.key_length = 256 | |
146 |
|
147 | |||
147 | beaker.cache.long_term.type=memory |
|
148 | beaker.cache.long_term.type=memory | |
148 | beaker.cache.long_term.expire=36000 |
|
149 | beaker.cache.long_term.expire=36000 | |
149 | beaker.cache.long_term.key_length = 256 |
|
150 | beaker.cache.long_term.key_length = 256 | |
150 |
|
151 | |||
151 | beaker.cache.sql_cache_short.type=memory |
|
152 | beaker.cache.sql_cache_short.type=memory | |
152 | beaker.cache.sql_cache_short.expire=10 |
|
153 | beaker.cache.sql_cache_short.expire=10 | |
153 | beaker.cache.sql_cache_short.key_length = 256 |
|
154 | beaker.cache.sql_cache_short.key_length = 256 | |
154 |
|
155 | |||
155 | beaker.cache.sql_cache_med.type=memory |
|
156 | beaker.cache.sql_cache_med.type=memory | |
156 | beaker.cache.sql_cache_med.expire=360 |
|
157 | beaker.cache.sql_cache_med.expire=360 | |
157 | beaker.cache.sql_cache_med.key_length = 256 |
|
158 | beaker.cache.sql_cache_med.key_length = 256 | |
158 |
|
159 | |||
159 | beaker.cache.sql_cache_long.type=file |
|
160 | beaker.cache.sql_cache_long.type=file | |
160 | beaker.cache.sql_cache_long.expire=3600 |
|
161 | beaker.cache.sql_cache_long.expire=3600 | |
161 | beaker.cache.sql_cache_long.key_length = 256 |
|
162 | beaker.cache.sql_cache_long.key_length = 256 | |
162 |
|
163 | |||
163 | #################################### |
|
164 | #################################### | |
164 | ### BEAKER SESSION #### |
|
165 | ### BEAKER SESSION #### | |
165 | #################################### |
|
166 | #################################### | |
166 | ## Type of storage used for the session, current types are |
|
167 | ## Type of storage used for the session, current types are | |
167 | ## dbm, file, memcached, database, and memory. |
|
168 | ## dbm, file, memcached, database, and memory. | |
168 | ## The storage uses the Container API |
|
169 | ## The storage uses the Container API | |
169 | ## that is also used by the cache system. |
|
170 | ## that is also used by the cache system. | |
170 |
|
171 | |||
171 | ## db session example |
|
172 | ## db session example | |
172 |
|
173 | |||
173 | #beaker.session.type = ext:database |
|
174 | #beaker.session.type = ext:database | |
174 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
175 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
175 | #beaker.session.table_name = db_session |
|
176 | #beaker.session.table_name = db_session | |
176 |
|
177 | |||
177 | ## encrypted cookie session, good for many instances |
|
178 | ## encrypted cookie session, good for many instances | |
178 | #beaker.session.type = cookie |
|
179 | #beaker.session.type = cookie | |
179 |
|
180 | |||
180 | beaker.session.type = file |
|
181 | beaker.session.type = file | |
181 | beaker.session.key = rhodecode |
|
182 | beaker.session.key = rhodecode | |
182 | # secure cookie requires AES python libraries |
|
183 | # secure cookie requires AES python libraries | |
183 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
184 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
184 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
185 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
185 | beaker.session.timeout = 36000 |
|
186 | beaker.session.timeout = 36000 | |
186 | beaker.session.httponly = true |
|
187 | beaker.session.httponly = true | |
187 |
|
188 | |||
188 | ## uncomment for https secure cookie |
|
189 | ## uncomment for https secure cookie | |
189 | beaker.session.secure = false |
|
190 | beaker.session.secure = false | |
190 |
|
191 | |||
191 | ##auto save the session to not to use .save() |
|
192 | ##auto save the session to not to use .save() | |
192 | beaker.session.auto = False |
|
193 | beaker.session.auto = False | |
193 |
|
194 | |||
194 | ##true exire at browser close |
|
195 | ##true exire at browser close | |
195 | #beaker.session.cookie_expires = 3600 |
|
196 | #beaker.session.cookie_expires = 3600 | |
196 |
|
197 | |||
197 |
|
198 | |||
198 | ################################################################################ |
|
199 | ################################################################################ | |
199 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
200 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
200 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
201 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
201 | ## execute malicious code after an exception is raised. ## |
|
202 | ## execute malicious code after an exception is raised. ## | |
202 | ################################################################################ |
|
203 | ################################################################################ | |
203 | #set debug = false |
|
204 | #set debug = false | |
204 |
|
205 | |||
205 | ################################## |
|
206 | ################################## | |
206 | ### LOGVIEW CONFIG ### |
|
207 | ### LOGVIEW CONFIG ### | |
207 | ################################## |
|
208 | ################################## | |
208 | logview.sqlalchemy = #faa |
|
209 | logview.sqlalchemy = #faa | |
209 | logview.pylons.templating = #bfb |
|
210 | logview.pylons.templating = #bfb | |
210 | logview.pylons.util = #eee |
|
211 | logview.pylons.util = #eee | |
211 |
|
212 | |||
212 | ######################################################### |
|
213 | ######################################################### | |
213 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
214 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
214 | ######################################################### |
|
215 | ######################################################### | |
215 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
216 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
216 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode |
|
217 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode | |
217 | sqlalchemy.db1.echo = false |
|
218 | sqlalchemy.db1.echo = false | |
218 | sqlalchemy.db1.pool_recycle = 3600 |
|
219 | sqlalchemy.db1.pool_recycle = 3600 | |
219 | sqlalchemy.db1.convert_unicode = true |
|
220 | sqlalchemy.db1.convert_unicode = true | |
220 |
|
221 | |||
221 | ################################ |
|
222 | ################################ | |
222 | ### LOGGING CONFIGURATION #### |
|
223 | ### LOGGING CONFIGURATION #### | |
223 | ################################ |
|
224 | ################################ | |
224 | [loggers] |
|
225 | [loggers] | |
225 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
226 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
226 |
|
227 | |||
227 | [handlers] |
|
228 | [handlers] | |
228 | keys = console, console_sql |
|
229 | keys = console, console_sql | |
229 |
|
230 | |||
230 | [formatters] |
|
231 | [formatters] | |
231 | keys = generic, color_formatter, color_formatter_sql |
|
232 | keys = generic, color_formatter, color_formatter_sql | |
232 |
|
233 | |||
233 | ############# |
|
234 | ############# | |
234 | ## LOGGERS ## |
|
235 | ## LOGGERS ## | |
235 | ############# |
|
236 | ############# | |
236 | [logger_root] |
|
237 | [logger_root] | |
237 | level = NOTSET |
|
238 | level = NOTSET | |
238 | handlers = console |
|
239 | handlers = console | |
239 |
|
240 | |||
240 | [logger_routes] |
|
241 | [logger_routes] | |
241 | level = DEBUG |
|
242 | level = DEBUG | |
242 | handlers = |
|
243 | handlers = | |
243 | qualname = routes.middleware |
|
244 | qualname = routes.middleware | |
244 | # "level = DEBUG" logs the route matched and routing variables. |
|
245 | # "level = DEBUG" logs the route matched and routing variables. | |
245 | propagate = 1 |
|
246 | propagate = 1 | |
246 |
|
247 | |||
247 | [logger_beaker] |
|
248 | [logger_beaker] | |
248 | level = DEBUG |
|
249 | level = DEBUG | |
249 | handlers = |
|
250 | handlers = | |
250 | qualname = beaker.container |
|
251 | qualname = beaker.container | |
251 | propagate = 1 |
|
252 | propagate = 1 | |
252 |
|
253 | |||
253 | [logger_templates] |
|
254 | [logger_templates] | |
254 | level = INFO |
|
255 | level = INFO | |
255 | handlers = |
|
256 | handlers = | |
256 | qualname = pylons.templating |
|
257 | qualname = pylons.templating | |
257 | propagate = 1 |
|
258 | propagate = 1 | |
258 |
|
259 | |||
259 | [logger_rhodecode] |
|
260 | [logger_rhodecode] | |
260 | level = DEBUG |
|
261 | level = DEBUG | |
261 | handlers = |
|
262 | handlers = | |
262 | qualname = rhodecode |
|
263 | qualname = rhodecode | |
263 | propagate = 1 |
|
264 | propagate = 1 | |
264 |
|
265 | |||
265 | [logger_sqlalchemy] |
|
266 | [logger_sqlalchemy] | |
266 | level = INFO |
|
267 | level = INFO | |
267 | handlers = console_sql |
|
268 | handlers = console_sql | |
268 | qualname = sqlalchemy.engine |
|
269 | qualname = sqlalchemy.engine | |
269 | propagate = 0 |
|
270 | propagate = 0 | |
270 |
|
271 | |||
271 | [logger_whoosh_indexer] |
|
272 | [logger_whoosh_indexer] | |
272 | level = DEBUG |
|
273 | level = DEBUG | |
273 | handlers = |
|
274 | handlers = | |
274 | qualname = whoosh_indexer |
|
275 | qualname = whoosh_indexer | |
275 | propagate = 1 |
|
276 | propagate = 1 | |
276 |
|
277 | |||
277 | ############## |
|
278 | ############## | |
278 | ## HANDLERS ## |
|
279 | ## HANDLERS ## | |
279 | ############## |
|
280 | ############## | |
280 |
|
281 | |||
281 | [handler_console] |
|
282 | [handler_console] | |
282 | class = StreamHandler |
|
283 | class = StreamHandler | |
283 | args = (sys.stderr,) |
|
284 | args = (sys.stderr,) | |
284 | level = DEBUG |
|
285 | level = DEBUG | |
285 | formatter = color_formatter |
|
286 | formatter = color_formatter | |
286 |
|
287 | |||
287 | [handler_console_sql] |
|
288 | [handler_console_sql] | |
288 | class = StreamHandler |
|
289 | class = StreamHandler | |
289 | args = (sys.stderr,) |
|
290 | args = (sys.stderr,) | |
290 | level = DEBUG |
|
291 | level = DEBUG | |
291 | formatter = color_formatter_sql |
|
292 | formatter = color_formatter_sql | |
292 |
|
293 | |||
293 | ################ |
|
294 | ################ | |
294 | ## FORMATTERS ## |
|
295 | ## FORMATTERS ## | |
295 | ################ |
|
296 | ################ | |
296 |
|
297 | |||
297 | [formatter_generic] |
|
298 | [formatter_generic] | |
298 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
299 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
299 | datefmt = %Y-%m-%d %H:%M:%S |
|
300 | datefmt = %Y-%m-%d %H:%M:%S | |
300 |
|
301 | |||
301 | [formatter_color_formatter] |
|
302 | [formatter_color_formatter] | |
302 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
303 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
303 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
304 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
304 | datefmt = %Y-%m-%d %H:%M:%S |
|
305 | datefmt = %Y-%m-%d %H:%M:%S | |
305 |
|
306 | |||
306 | [formatter_color_formatter_sql] |
|
307 | [formatter_color_formatter_sql] | |
307 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
308 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
308 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
309 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
309 | datefmt = %Y-%m-%d %H:%M:%S |
|
310 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,309 +1,310 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
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 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
|
42 | use = egg:waitress#main | |||
42 | host = 127.0.0.1 |
|
43 | host = 127.0.0.1 | |
43 | port = 8001 |
|
44 | port = 8001 | |
44 |
|
45 | |||
45 | [app:main] |
|
46 | [app:main] | |
46 | use = egg:rhodecode |
|
47 | use = egg:rhodecode | |
47 | full_stack = true |
|
48 | full_stack = true | |
48 | static_files = true |
|
49 | static_files = true | |
49 | # Optional Languages |
|
50 | # Optional Languages | |
50 | # en, fr, pt_BR, zh_CN, zh_TW |
|
51 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
51 | lang = en |
|
52 | lang = en | |
52 | cache_dir = %(here)s/data |
|
53 | cache_dir = %(here)s/data | |
53 | index_dir = %(here)s/data/index |
|
54 | index_dir = %(here)s/data/index | |
54 | app_instance_uuid = rc-production |
|
55 | app_instance_uuid = rc-production | |
55 | cut_off_limit = 256000 |
|
56 | cut_off_limit = 256000 | |
56 | force_https = false |
|
57 | force_https = false | |
57 | commit_parse_limit = 50 |
|
58 | commit_parse_limit = 50 | |
58 | use_gravatar = true |
|
59 | use_gravatar = true | |
59 | container_auth_enabled = false |
|
60 | container_auth_enabled = false | |
60 | proxypass_auth_enabled = false |
|
61 | proxypass_auth_enabled = false | |
61 | default_encoding = utf8 |
|
62 | default_encoding = utf8 | |
62 |
|
63 | |||
63 | ## overwrite schema of clone url |
|
64 | ## overwrite schema of clone url | |
64 | ## available vars: |
|
65 | ## available vars: | |
65 | ## scheme - http/https |
|
66 | ## scheme - http/https | |
66 | ## user - current user |
|
67 | ## user - current user | |
67 | ## pass - password |
|
68 | ## pass - password | |
68 | ## netloc - network location |
|
69 | ## netloc - network location | |
69 | ## path - usually repo_name |
|
70 | ## path - usually repo_name | |
70 |
|
71 | |||
71 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
72 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
72 |
|
73 | |||
73 | ## issue tracking mapping for commits messages |
|
74 | ## issue tracking mapping for commits messages | |
74 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
75 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
75 |
|
76 | |||
76 | ## pattern to get the issues from commit messages |
|
77 | ## pattern to get the issues from commit messages | |
77 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
78 | ## default one used here is #<numbers> with a regex passive group for `#` | |
78 | ## {id} will be all groups matched from this pattern |
|
79 | ## {id} will be all groups matched from this pattern | |
79 |
|
80 | |||
80 | issue_pat = (?:\s*#)(\d+) |
|
81 | issue_pat = (?:\s*#)(\d+) | |
81 |
|
82 | |||
82 | ## server url to the issue, each {id} will be replaced with match |
|
83 | ## server url to the issue, each {id} will be replaced with match | |
83 | ## fetched from the regex and {repo} is replaced with full repository name |
|
84 | ## fetched from the regex and {repo} is replaced with full repository name | |
84 | ## including groups {repo_name} is replaced with just name of repo |
|
85 | ## including groups {repo_name} is replaced with just name of repo | |
85 |
|
86 | |||
86 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
87 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
87 |
|
88 | |||
88 | ## prefix to add to link to indicate it's an url |
|
89 | ## prefix to add to link to indicate it's an url | |
89 | ## #314 will be replaced by <issue_prefix><id> |
|
90 | ## #314 will be replaced by <issue_prefix><id> | |
90 |
|
91 | |||
91 | issue_prefix = # |
|
92 | issue_prefix = # | |
92 |
|
93 | |||
93 | ## instance-id prefix |
|
94 | ## instance-id prefix | |
94 | ## a prefix key for this instance used for cache invalidation when running |
|
95 | ## a prefix key for this instance used for cache invalidation when running | |
95 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
96 | ## multiple instances of rhodecode, make sure it's globally unique for | |
96 | ## all running rhodecode instances. Leave empty if you don't use it |
|
97 | ## all running rhodecode instances. Leave empty if you don't use it | |
97 | instance_id = |
|
98 | instance_id = | |
98 |
|
99 | |||
99 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
100 | ## alternative return HTTP header for failed authentication. Default HTTP | |
100 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
101 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
101 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
102 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
102 | auth_ret_code = |
|
103 | auth_ret_code = | |
103 |
|
104 | |||
104 | #################################### |
|
105 | #################################### | |
105 | ### CELERY CONFIG #### |
|
106 | ### CELERY CONFIG #### | |
106 | #################################### |
|
107 | #################################### | |
107 | use_celery = false |
|
108 | use_celery = false | |
108 | broker.host = localhost |
|
109 | broker.host = localhost | |
109 | broker.vhost = rabbitmqhost |
|
110 | broker.vhost = rabbitmqhost | |
110 | broker.port = 5672 |
|
111 | broker.port = 5672 | |
111 | broker.user = rabbitmq |
|
112 | broker.user = rabbitmq | |
112 | broker.password = qweqwe |
|
113 | broker.password = qweqwe | |
113 |
|
114 | |||
114 | celery.imports = rhodecode.lib.celerylib.tasks |
|
115 | celery.imports = rhodecode.lib.celerylib.tasks | |
115 |
|
116 | |||
116 | celery.result.backend = amqp |
|
117 | celery.result.backend = amqp | |
117 | celery.result.dburi = amqp:// |
|
118 | celery.result.dburi = amqp:// | |
118 | celery.result.serialier = json |
|
119 | celery.result.serialier = json | |
119 |
|
120 | |||
120 | #celery.send.task.error.emails = true |
|
121 | #celery.send.task.error.emails = true | |
121 | #celery.amqp.task.result.expires = 18000 |
|
122 | #celery.amqp.task.result.expires = 18000 | |
122 |
|
123 | |||
123 | celeryd.concurrency = 2 |
|
124 | celeryd.concurrency = 2 | |
124 | #celeryd.log.file = celeryd.log |
|
125 | #celeryd.log.file = celeryd.log | |
125 | celeryd.log.level = debug |
|
126 | celeryd.log.level = debug | |
126 | celeryd.max.tasks.per.child = 1 |
|
127 | celeryd.max.tasks.per.child = 1 | |
127 |
|
128 | |||
128 | #tasks will never be sent to the queue, but executed locally instead. |
|
129 | #tasks will never be sent to the queue, but executed locally instead. | |
129 | celery.always.eager = false |
|
130 | celery.always.eager = false | |
130 |
|
131 | |||
131 | #################################### |
|
132 | #################################### | |
132 | ### BEAKER CACHE #### |
|
133 | ### BEAKER CACHE #### | |
133 | #################################### |
|
134 | #################################### | |
134 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
135 | beaker.cache.data_dir=%(here)s/data/cache/data | |
135 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
136 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
136 |
|
137 | |||
137 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
138 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
138 |
|
139 | |||
139 | beaker.cache.super_short_term.type=memory |
|
140 | beaker.cache.super_short_term.type=memory | |
140 | beaker.cache.super_short_term.expire=10 |
|
141 | beaker.cache.super_short_term.expire=10 | |
141 | beaker.cache.super_short_term.key_length = 256 |
|
142 | beaker.cache.super_short_term.key_length = 256 | |
142 |
|
143 | |||
143 | beaker.cache.short_term.type=memory |
|
144 | beaker.cache.short_term.type=memory | |
144 | beaker.cache.short_term.expire=60 |
|
145 | beaker.cache.short_term.expire=60 | |
145 | beaker.cache.short_term.key_length = 256 |
|
146 | beaker.cache.short_term.key_length = 256 | |
146 |
|
147 | |||
147 | beaker.cache.long_term.type=memory |
|
148 | beaker.cache.long_term.type=memory | |
148 | beaker.cache.long_term.expire=36000 |
|
149 | beaker.cache.long_term.expire=36000 | |
149 | beaker.cache.long_term.key_length = 256 |
|
150 | beaker.cache.long_term.key_length = 256 | |
150 |
|
151 | |||
151 | beaker.cache.sql_cache_short.type=memory |
|
152 | beaker.cache.sql_cache_short.type=memory | |
152 | beaker.cache.sql_cache_short.expire=10 |
|
153 | beaker.cache.sql_cache_short.expire=10 | |
153 | beaker.cache.sql_cache_short.key_length = 256 |
|
154 | beaker.cache.sql_cache_short.key_length = 256 | |
154 |
|
155 | |||
155 | beaker.cache.sql_cache_med.type=memory |
|
156 | beaker.cache.sql_cache_med.type=memory | |
156 | beaker.cache.sql_cache_med.expire=360 |
|
157 | beaker.cache.sql_cache_med.expire=360 | |
157 | beaker.cache.sql_cache_med.key_length = 256 |
|
158 | beaker.cache.sql_cache_med.key_length = 256 | |
158 |
|
159 | |||
159 | beaker.cache.sql_cache_long.type=file |
|
160 | beaker.cache.sql_cache_long.type=file | |
160 | beaker.cache.sql_cache_long.expire=3600 |
|
161 | beaker.cache.sql_cache_long.expire=3600 | |
161 | beaker.cache.sql_cache_long.key_length = 256 |
|
162 | beaker.cache.sql_cache_long.key_length = 256 | |
162 |
|
163 | |||
163 | #################################### |
|
164 | #################################### | |
164 | ### BEAKER SESSION #### |
|
165 | ### BEAKER SESSION #### | |
165 | #################################### |
|
166 | #################################### | |
166 | ## Type of storage used for the session, current types are |
|
167 | ## Type of storage used for the session, current types are | |
167 | ## dbm, file, memcached, database, and memory. |
|
168 | ## dbm, file, memcached, database, and memory. | |
168 | ## The storage uses the Container API |
|
169 | ## The storage uses the Container API | |
169 | ## that is also used by the cache system. |
|
170 | ## that is also used by the cache system. | |
170 |
|
171 | |||
171 | ## db session example |
|
172 | ## db session example | |
172 |
|
173 | |||
173 | #beaker.session.type = ext:database |
|
174 | #beaker.session.type = ext:database | |
174 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
175 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
175 | #beaker.session.table_name = db_session |
|
176 | #beaker.session.table_name = db_session | |
176 |
|
177 | |||
177 | ## encrypted cookie session, good for many instances |
|
178 | ## encrypted cookie session, good for many instances | |
178 | #beaker.session.type = cookie |
|
179 | #beaker.session.type = cookie | |
179 |
|
180 | |||
180 | beaker.session.type = file |
|
181 | beaker.session.type = file | |
181 | beaker.session.key = rhodecode |
|
182 | beaker.session.key = rhodecode | |
182 | # secure cookie requires AES python libraries |
|
183 | # secure cookie requires AES python libraries | |
183 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
184 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
184 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
185 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
185 | beaker.session.timeout = 36000 |
|
186 | beaker.session.timeout = 36000 | |
186 | beaker.session.httponly = true |
|
187 | beaker.session.httponly = true | |
187 |
|
188 | |||
188 | ## uncomment for https secure cookie |
|
189 | ## uncomment for https secure cookie | |
189 | beaker.session.secure = false |
|
190 | beaker.session.secure = false | |
190 |
|
191 | |||
191 | ##auto save the session to not to use .save() |
|
192 | ##auto save the session to not to use .save() | |
192 | beaker.session.auto = False |
|
193 | beaker.session.auto = False | |
193 |
|
194 | |||
194 | ##true exire at browser close |
|
195 | ##true exire at browser close | |
195 | #beaker.session.cookie_expires = 3600 |
|
196 | #beaker.session.cookie_expires = 3600 | |
196 |
|
197 | |||
197 |
|
198 | |||
198 | ################################################################################ |
|
199 | ################################################################################ | |
199 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
200 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
200 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
201 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
201 | ## execute malicious code after an exception is raised. ## |
|
202 | ## execute malicious code after an exception is raised. ## | |
202 | ################################################################################ |
|
203 | ################################################################################ | |
203 | set debug = false |
|
204 | set debug = false | |
204 |
|
205 | |||
205 | ################################## |
|
206 | ################################## | |
206 | ### LOGVIEW CONFIG ### |
|
207 | ### LOGVIEW CONFIG ### | |
207 | ################################## |
|
208 | ################################## | |
208 | logview.sqlalchemy = #faa |
|
209 | logview.sqlalchemy = #faa | |
209 | logview.pylons.templating = #bfb |
|
210 | logview.pylons.templating = #bfb | |
210 | logview.pylons.util = #eee |
|
211 | logview.pylons.util = #eee | |
211 |
|
212 | |||
212 | ######################################################### |
|
213 | ######################################################### | |
213 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
214 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
214 | ######################################################### |
|
215 | ######################################################### | |
215 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
216 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
216 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode |
|
217 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode | |
217 | sqlalchemy.db1.echo = false |
|
218 | sqlalchemy.db1.echo = false | |
218 | sqlalchemy.db1.pool_recycle = 3600 |
|
219 | sqlalchemy.db1.pool_recycle = 3600 | |
219 | sqlalchemy.db1.convert_unicode = true |
|
220 | sqlalchemy.db1.convert_unicode = true | |
220 |
|
221 | |||
221 | ################################ |
|
222 | ################################ | |
222 | ### LOGGING CONFIGURATION #### |
|
223 | ### LOGGING CONFIGURATION #### | |
223 | ################################ |
|
224 | ################################ | |
224 | [loggers] |
|
225 | [loggers] | |
225 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
226 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
226 |
|
227 | |||
227 | [handlers] |
|
228 | [handlers] | |
228 | keys = console, console_sql |
|
229 | keys = console, console_sql | |
229 |
|
230 | |||
230 | [formatters] |
|
231 | [formatters] | |
231 | keys = generic, color_formatter, color_formatter_sql |
|
232 | keys = generic, color_formatter, color_formatter_sql | |
232 |
|
233 | |||
233 | ############# |
|
234 | ############# | |
234 | ## LOGGERS ## |
|
235 | ## LOGGERS ## | |
235 | ############# |
|
236 | ############# | |
236 | [logger_root] |
|
237 | [logger_root] | |
237 | level = NOTSET |
|
238 | level = NOTSET | |
238 | handlers = console |
|
239 | handlers = console | |
239 |
|
240 | |||
240 | [logger_routes] |
|
241 | [logger_routes] | |
241 | level = DEBUG |
|
242 | level = DEBUG | |
242 | handlers = |
|
243 | handlers = | |
243 | qualname = routes.middleware |
|
244 | qualname = routes.middleware | |
244 | # "level = DEBUG" logs the route matched and routing variables. |
|
245 | # "level = DEBUG" logs the route matched and routing variables. | |
245 | propagate = 1 |
|
246 | propagate = 1 | |
246 |
|
247 | |||
247 | [logger_beaker] |
|
248 | [logger_beaker] | |
248 | level = DEBUG |
|
249 | level = DEBUG | |
249 | handlers = |
|
250 | handlers = | |
250 | qualname = beaker.container |
|
251 | qualname = beaker.container | |
251 | propagate = 1 |
|
252 | propagate = 1 | |
252 |
|
253 | |||
253 | [logger_templates] |
|
254 | [logger_templates] | |
254 | level = INFO |
|
255 | level = INFO | |
255 | handlers = |
|
256 | handlers = | |
256 | qualname = pylons.templating |
|
257 | qualname = pylons.templating | |
257 | propagate = 1 |
|
258 | propagate = 1 | |
258 |
|
259 | |||
259 | [logger_rhodecode] |
|
260 | [logger_rhodecode] | |
260 | level = DEBUG |
|
261 | level = DEBUG | |
261 | handlers = |
|
262 | handlers = | |
262 | qualname = rhodecode |
|
263 | qualname = rhodecode | |
263 | propagate = 1 |
|
264 | propagate = 1 | |
264 |
|
265 | |||
265 | [logger_sqlalchemy] |
|
266 | [logger_sqlalchemy] | |
266 | level = INFO |
|
267 | level = INFO | |
267 | handlers = console_sql |
|
268 | handlers = console_sql | |
268 | qualname = sqlalchemy.engine |
|
269 | qualname = sqlalchemy.engine | |
269 | propagate = 0 |
|
270 | propagate = 0 | |
270 |
|
271 | |||
271 | [logger_whoosh_indexer] |
|
272 | [logger_whoosh_indexer] | |
272 | level = DEBUG |
|
273 | level = DEBUG | |
273 | handlers = |
|
274 | handlers = | |
274 | qualname = whoosh_indexer |
|
275 | qualname = whoosh_indexer | |
275 | propagate = 1 |
|
276 | propagate = 1 | |
276 |
|
277 | |||
277 | ############## |
|
278 | ############## | |
278 | ## HANDLERS ## |
|
279 | ## HANDLERS ## | |
279 | ############## |
|
280 | ############## | |
280 |
|
281 | |||
281 | [handler_console] |
|
282 | [handler_console] | |
282 | class = StreamHandler |
|
283 | class = StreamHandler | |
283 | args = (sys.stderr,) |
|
284 | args = (sys.stderr,) | |
284 | level = INFO |
|
285 | level = INFO | |
285 | formatter = generic |
|
286 | formatter = generic | |
286 |
|
287 | |||
287 | [handler_console_sql] |
|
288 | [handler_console_sql] | |
288 | class = StreamHandler |
|
289 | class = StreamHandler | |
289 | args = (sys.stderr,) |
|
290 | args = (sys.stderr,) | |
290 | level = WARN |
|
291 | level = WARN | |
291 | formatter = generic |
|
292 | formatter = generic | |
292 |
|
293 | |||
293 | ################ |
|
294 | ################ | |
294 | ## FORMATTERS ## |
|
295 | ## FORMATTERS ## | |
295 | ################ |
|
296 | ################ | |
296 |
|
297 | |||
297 | [formatter_generic] |
|
298 | [formatter_generic] | |
298 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
299 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
299 | datefmt = %Y-%m-%d %H:%M:%S |
|
300 | datefmt = %Y-%m-%d %H:%M:%S | |
300 |
|
301 | |||
301 | [formatter_color_formatter] |
|
302 | [formatter_color_formatter] | |
302 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
303 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
303 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
304 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
304 | datefmt = %Y-%m-%d %H:%M:%S |
|
305 | datefmt = %Y-%m-%d %H:%M:%S | |
305 |
|
306 | |||
306 | [formatter_color_formatter_sql] |
|
307 | [formatter_color_formatter_sql] | |
307 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
308 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
308 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
309 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
309 | datefmt = %Y-%m-%d %H:%M:%S |
|
310 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,319 +1,320 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
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 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
|
42 | use = egg:waitress#main | |||
42 | host = 127.0.0.1 |
|
43 | host = 127.0.0.1 | |
43 | port = 5000 |
|
44 | port = 5000 | |
44 |
|
45 | |||
45 | [app:main] |
|
46 | [app:main] | |
46 | use = egg:rhodecode |
|
47 | use = egg:rhodecode | |
47 | full_stack = true |
|
48 | full_stack = true | |
48 | static_files = true |
|
49 | static_files = true | |
49 | # Optional Languages |
|
50 | # Optional Languages | |
50 | # en, fr, ja, pt_BR, zh_CN, zh_TW |
|
51 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
51 | lang = en |
|
52 | lang = en | |
52 | cache_dir = %(here)s/data |
|
53 | cache_dir = %(here)s/data | |
53 | index_dir = %(here)s/data/index |
|
54 | index_dir = %(here)s/data/index | |
54 | app_instance_uuid = ${app_instance_uuid} |
|
55 | app_instance_uuid = ${app_instance_uuid} | |
55 | cut_off_limit = 256000 |
|
56 | cut_off_limit = 256000 | |
56 | force_https = false |
|
57 | force_https = false | |
57 | commit_parse_limit = 50 |
|
58 | commit_parse_limit = 50 | |
58 | use_gravatar = true |
|
59 | use_gravatar = true | |
59 | container_auth_enabled = false |
|
60 | container_auth_enabled = false | |
60 | proxypass_auth_enabled = false |
|
61 | proxypass_auth_enabled = false | |
61 | default_encoding = utf8 |
|
62 | default_encoding = utf8 | |
62 |
|
63 | |||
63 | ## overwrite schema of clone url |
|
64 | ## overwrite schema of clone url | |
64 | ## available vars: |
|
65 | ## available vars: | |
65 | ## scheme - http/https |
|
66 | ## scheme - http/https | |
66 | ## user - current user |
|
67 | ## user - current user | |
67 | ## pass - password |
|
68 | ## pass - password | |
68 | ## netloc - network location |
|
69 | ## netloc - network location | |
69 | ## path - usually repo_name |
|
70 | ## path - usually repo_name | |
70 |
|
71 | |||
71 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
72 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
72 |
|
73 | |||
73 | ## issue tracking mapping for commits messages |
|
74 | ## issue tracking mapping for commits messages | |
74 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
75 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
75 |
|
76 | |||
76 | ## pattern to get the issues from commit messages |
|
77 | ## pattern to get the issues from commit messages | |
77 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
78 | ## default one used here is #<numbers> with a regex passive group for `#` | |
78 | ## {id} will be all groups matched from this pattern |
|
79 | ## {id} will be all groups matched from this pattern | |
79 |
|
80 | |||
80 | issue_pat = (?:\s*#)(\d+) |
|
81 | issue_pat = (?:\s*#)(\d+) | |
81 |
|
82 | |||
82 | ## server url to the issue, each {id} will be replaced with match |
|
83 | ## server url to the issue, each {id} will be replaced with match | |
83 | ## fetched from the regex and {repo} is replaced with full repository name |
|
84 | ## fetched from the regex and {repo} is replaced with full repository name | |
84 | ## including groups {repo_name} is replaced with just name of repo |
|
85 | ## including groups {repo_name} is replaced with just name of repo | |
85 |
|
86 | |||
86 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
87 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
87 |
|
88 | |||
88 | ## prefix to add to link to indicate it's an url |
|
89 | ## prefix to add to link to indicate it's an url | |
89 | ## #314 will be replaced by <issue_prefix><id> |
|
90 | ## #314 will be replaced by <issue_prefix><id> | |
90 |
|
91 | |||
91 | issue_prefix = # |
|
92 | issue_prefix = # | |
92 |
|
93 | |||
93 | ## instance-id prefix |
|
94 | ## instance-id prefix | |
94 | ## a prefix key for this instance used for cache invalidation when running |
|
95 | ## a prefix key for this instance used for cache invalidation when running | |
95 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
96 | ## multiple instances of rhodecode, make sure it's globally unique for | |
96 | ## all running rhodecode instances. Leave empty if you don't use it |
|
97 | ## all running rhodecode instances. Leave empty if you don't use it | |
97 | instance_id = |
|
98 | instance_id = | |
98 |
|
99 | |||
99 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
100 | ## alternative return HTTP header for failed authentication. Default HTTP | |
100 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
101 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
101 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
102 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
102 | auth_ret_code = |
|
103 | auth_ret_code = | |
103 |
|
104 | |||
104 | #################################### |
|
105 | #################################### | |
105 | ### CELERY CONFIG #### |
|
106 | ### CELERY CONFIG #### | |
106 | #################################### |
|
107 | #################################### | |
107 | use_celery = false |
|
108 | use_celery = false | |
108 | broker.host = localhost |
|
109 | broker.host = localhost | |
109 | broker.vhost = rabbitmqhost |
|
110 | broker.vhost = rabbitmqhost | |
110 | broker.port = 5672 |
|
111 | broker.port = 5672 | |
111 | broker.user = rabbitmq |
|
112 | broker.user = rabbitmq | |
112 | broker.password = qweqwe |
|
113 | broker.password = qweqwe | |
113 |
|
114 | |||
114 | celery.imports = rhodecode.lib.celerylib.tasks |
|
115 | celery.imports = rhodecode.lib.celerylib.tasks | |
115 |
|
116 | |||
116 | celery.result.backend = amqp |
|
117 | celery.result.backend = amqp | |
117 | celery.result.dburi = amqp:// |
|
118 | celery.result.dburi = amqp:// | |
118 | celery.result.serialier = json |
|
119 | celery.result.serialier = json | |
119 |
|
120 | |||
120 | #celery.send.task.error.emails = true |
|
121 | #celery.send.task.error.emails = true | |
121 | #celery.amqp.task.result.expires = 18000 |
|
122 | #celery.amqp.task.result.expires = 18000 | |
122 |
|
123 | |||
123 | celeryd.concurrency = 2 |
|
124 | celeryd.concurrency = 2 | |
124 | #celeryd.log.file = celeryd.log |
|
125 | #celeryd.log.file = celeryd.log | |
125 | celeryd.log.level = debug |
|
126 | celeryd.log.level = debug | |
126 | celeryd.max.tasks.per.child = 1 |
|
127 | celeryd.max.tasks.per.child = 1 | |
127 |
|
128 | |||
128 | #tasks will never be sent to the queue, but executed locally instead. |
|
129 | #tasks will never be sent to the queue, but executed locally instead. | |
129 | celery.always.eager = false |
|
130 | celery.always.eager = false | |
130 |
|
131 | |||
131 | #################################### |
|
132 | #################################### | |
132 | ### BEAKER CACHE #### |
|
133 | ### BEAKER CACHE #### | |
133 | #################################### |
|
134 | #################################### | |
134 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
135 | beaker.cache.data_dir=%(here)s/data/cache/data | |
135 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
136 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
136 |
|
137 | |||
137 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
138 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
138 |
|
139 | |||
139 | beaker.cache.super_short_term.type=memory |
|
140 | beaker.cache.super_short_term.type=memory | |
140 | beaker.cache.super_short_term.expire=10 |
|
141 | beaker.cache.super_short_term.expire=10 | |
141 | beaker.cache.super_short_term.key_length = 256 |
|
142 | beaker.cache.super_short_term.key_length = 256 | |
142 |
|
143 | |||
143 | beaker.cache.short_term.type=memory |
|
144 | beaker.cache.short_term.type=memory | |
144 | beaker.cache.short_term.expire=60 |
|
145 | beaker.cache.short_term.expire=60 | |
145 | beaker.cache.short_term.key_length = 256 |
|
146 | beaker.cache.short_term.key_length = 256 | |
146 |
|
147 | |||
147 | beaker.cache.long_term.type=memory |
|
148 | beaker.cache.long_term.type=memory | |
148 | beaker.cache.long_term.expire=36000 |
|
149 | beaker.cache.long_term.expire=36000 | |
149 | beaker.cache.long_term.key_length = 256 |
|
150 | beaker.cache.long_term.key_length = 256 | |
150 |
|
151 | |||
151 | beaker.cache.sql_cache_short.type=memory |
|
152 | beaker.cache.sql_cache_short.type=memory | |
152 | beaker.cache.sql_cache_short.expire=10 |
|
153 | beaker.cache.sql_cache_short.expire=10 | |
153 | beaker.cache.sql_cache_short.key_length = 256 |
|
154 | beaker.cache.sql_cache_short.key_length = 256 | |
154 |
|
155 | |||
155 | beaker.cache.sql_cache_med.type=memory |
|
156 | beaker.cache.sql_cache_med.type=memory | |
156 | beaker.cache.sql_cache_med.expire=360 |
|
157 | beaker.cache.sql_cache_med.expire=360 | |
157 | beaker.cache.sql_cache_med.key_length = 256 |
|
158 | beaker.cache.sql_cache_med.key_length = 256 | |
158 |
|
159 | |||
159 | beaker.cache.sql_cache_long.type=file |
|
160 | beaker.cache.sql_cache_long.type=file | |
160 | beaker.cache.sql_cache_long.expire=3600 |
|
161 | beaker.cache.sql_cache_long.expire=3600 | |
161 | beaker.cache.sql_cache_long.key_length = 256 |
|
162 | beaker.cache.sql_cache_long.key_length = 256 | |
162 |
|
163 | |||
163 | #################################### |
|
164 | #################################### | |
164 | ### BEAKER SESSION #### |
|
165 | ### BEAKER SESSION #### | |
165 | #################################### |
|
166 | #################################### | |
166 | ## Type of storage used for the session, current types are |
|
167 | ## Type of storage used for the session, current types are | |
167 | ## dbm, file, memcached, database, and memory. |
|
168 | ## dbm, file, memcached, database, and memory. | |
168 | ## The storage uses the Container API |
|
169 | ## The storage uses the Container API | |
169 | ## that is also used by the cache system. |
|
170 | ## that is also used by the cache system. | |
170 |
|
171 | |||
171 | ## db session example |
|
172 | ## db session example | |
172 |
|
173 | |||
173 | #beaker.session.type = ext:database |
|
174 | #beaker.session.type = ext:database | |
174 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
175 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
175 | #beaker.session.table_name = db_session |
|
176 | #beaker.session.table_name = db_session | |
176 |
|
177 | |||
177 | ## encrypted cookie session, good for many instances |
|
178 | ## encrypted cookie session, good for many instances | |
178 | #beaker.session.type = cookie |
|
179 | #beaker.session.type = cookie | |
179 |
|
180 | |||
180 | beaker.session.type = file |
|
181 | beaker.session.type = file | |
181 | beaker.session.key = rhodecode |
|
182 | beaker.session.key = rhodecode | |
182 | # secure cookie requires AES python libraries |
|
183 | # secure cookie requires AES python libraries | |
183 | #beaker.session.encrypt_key = ${app_instance_secret} |
|
184 | #beaker.session.encrypt_key = ${app_instance_secret} | |
184 | #beaker.session.validate_key = ${app_instance_secret} |
|
185 | #beaker.session.validate_key = ${app_instance_secret} | |
185 | beaker.session.timeout = 36000 |
|
186 | beaker.session.timeout = 36000 | |
186 | beaker.session.httponly = true |
|
187 | beaker.session.httponly = true | |
187 |
|
188 | |||
188 | ## uncomment for https secure cookie |
|
189 | ## uncomment for https secure cookie | |
189 | beaker.session.secure = false |
|
190 | beaker.session.secure = false | |
190 |
|
191 | |||
191 | ##auto save the session to not to use .save() |
|
192 | ##auto save the session to not to use .save() | |
192 | beaker.session.auto = False |
|
193 | beaker.session.auto = False | |
193 |
|
194 | |||
194 | ##true exire at browser close |
|
195 | ##true exire at browser close | |
195 | #beaker.session.cookie_expires = 3600 |
|
196 | #beaker.session.cookie_expires = 3600 | |
196 |
|
197 | |||
197 |
|
198 | |||
198 | ################################################################################ |
|
199 | ################################################################################ | |
199 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
200 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
200 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
201 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
201 | ## execute malicious code after an exception is raised. ## |
|
202 | ## execute malicious code after an exception is raised. ## | |
202 | ################################################################################ |
|
203 | ################################################################################ | |
203 | set debug = false |
|
204 | set debug = false | |
204 |
|
205 | |||
205 | ################################## |
|
206 | ################################## | |
206 | ### LOGVIEW CONFIG ### |
|
207 | ### LOGVIEW CONFIG ### | |
207 | ################################## |
|
208 | ################################## | |
208 | logview.sqlalchemy = #faa |
|
209 | logview.sqlalchemy = #faa | |
209 | logview.pylons.templating = #bfb |
|
210 | logview.pylons.templating = #bfb | |
210 | logview.pylons.util = #eee |
|
211 | logview.pylons.util = #eee | |
211 |
|
212 | |||
212 | ######################################################### |
|
213 | ######################################################### | |
213 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
214 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
214 | ######################################################### |
|
215 | ######################################################### | |
215 |
|
216 | |||
216 | # SQLITE [default] |
|
217 | # SQLITE [default] | |
217 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
218 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
218 |
|
219 | |||
219 | # POSTGRESQL |
|
220 | # POSTGRESQL | |
220 | # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode |
|
221 | # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode | |
221 |
|
222 | |||
222 | # MySQL |
|
223 | # MySQL | |
223 | # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode |
|
224 | # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode | |
224 |
|
225 | |||
225 | # see sqlalchemy docs for others |
|
226 | # see sqlalchemy docs for others | |
226 |
|
227 | |||
227 | sqlalchemy.db1.echo = false |
|
228 | sqlalchemy.db1.echo = false | |
228 | sqlalchemy.db1.pool_recycle = 3600 |
|
229 | sqlalchemy.db1.pool_recycle = 3600 | |
229 | sqlalchemy.db1.convert_unicode = true |
|
230 | sqlalchemy.db1.convert_unicode = true | |
230 |
|
231 | |||
231 | ################################ |
|
232 | ################################ | |
232 | ### LOGGING CONFIGURATION #### |
|
233 | ### LOGGING CONFIGURATION #### | |
233 | ################################ |
|
234 | ################################ | |
234 | [loggers] |
|
235 | [loggers] | |
235 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
236 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
236 |
|
237 | |||
237 | [handlers] |
|
238 | [handlers] | |
238 | keys = console, console_sql |
|
239 | keys = console, console_sql | |
239 |
|
240 | |||
240 | [formatters] |
|
241 | [formatters] | |
241 | keys = generic, color_formatter, color_formatter_sql |
|
242 | keys = generic, color_formatter, color_formatter_sql | |
242 |
|
243 | |||
243 | ############# |
|
244 | ############# | |
244 | ## LOGGERS ## |
|
245 | ## LOGGERS ## | |
245 | ############# |
|
246 | ############# | |
246 | [logger_root] |
|
247 | [logger_root] | |
247 | level = NOTSET |
|
248 | level = NOTSET | |
248 | handlers = console |
|
249 | handlers = console | |
249 |
|
250 | |||
250 | [logger_routes] |
|
251 | [logger_routes] | |
251 | level = DEBUG |
|
252 | level = DEBUG | |
252 | handlers = |
|
253 | handlers = | |
253 | qualname = routes.middleware |
|
254 | qualname = routes.middleware | |
254 | # "level = DEBUG" logs the route matched and routing variables. |
|
255 | # "level = DEBUG" logs the route matched and routing variables. | |
255 | propagate = 1 |
|
256 | propagate = 1 | |
256 |
|
257 | |||
257 | [logger_beaker] |
|
258 | [logger_beaker] | |
258 | level = DEBUG |
|
259 | level = DEBUG | |
259 | handlers = |
|
260 | handlers = | |
260 | qualname = beaker.container |
|
261 | qualname = beaker.container | |
261 | propagate = 1 |
|
262 | propagate = 1 | |
262 |
|
263 | |||
263 | [logger_templates] |
|
264 | [logger_templates] | |
264 | level = INFO |
|
265 | level = INFO | |
265 | handlers = |
|
266 | handlers = | |
266 | qualname = pylons.templating |
|
267 | qualname = pylons.templating | |
267 | propagate = 1 |
|
268 | propagate = 1 | |
268 |
|
269 | |||
269 | [logger_rhodecode] |
|
270 | [logger_rhodecode] | |
270 | level = DEBUG |
|
271 | level = DEBUG | |
271 | handlers = |
|
272 | handlers = | |
272 | qualname = rhodecode |
|
273 | qualname = rhodecode | |
273 | propagate = 1 |
|
274 | propagate = 1 | |
274 |
|
275 | |||
275 | [logger_sqlalchemy] |
|
276 | [logger_sqlalchemy] | |
276 | level = INFO |
|
277 | level = INFO | |
277 | handlers = console_sql |
|
278 | handlers = console_sql | |
278 | qualname = sqlalchemy.engine |
|
279 | qualname = sqlalchemy.engine | |
279 | propagate = 0 |
|
280 | propagate = 0 | |
280 |
|
281 | |||
281 | [logger_whoosh_indexer] |
|
282 | [logger_whoosh_indexer] | |
282 | level = DEBUG |
|
283 | level = DEBUG | |
283 | handlers = |
|
284 | handlers = | |
284 | qualname = whoosh_indexer |
|
285 | qualname = whoosh_indexer | |
285 | propagate = 1 |
|
286 | propagate = 1 | |
286 |
|
287 | |||
287 | ############## |
|
288 | ############## | |
288 | ## HANDLERS ## |
|
289 | ## HANDLERS ## | |
289 | ############## |
|
290 | ############## | |
290 |
|
291 | |||
291 | [handler_console] |
|
292 | [handler_console] | |
292 | class = StreamHandler |
|
293 | class = StreamHandler | |
293 | args = (sys.stderr,) |
|
294 | args = (sys.stderr,) | |
294 | level = INFO |
|
295 | level = INFO | |
295 | formatter = generic |
|
296 | formatter = generic | |
296 |
|
297 | |||
297 | [handler_console_sql] |
|
298 | [handler_console_sql] | |
298 | class = StreamHandler |
|
299 | class = StreamHandler | |
299 | args = (sys.stderr,) |
|
300 | args = (sys.stderr,) | |
300 | level = WARN |
|
301 | level = WARN | |
301 | formatter = generic |
|
302 | formatter = generic | |
302 |
|
303 | |||
303 | ################ |
|
304 | ################ | |
304 | ## FORMATTERS ## |
|
305 | ## FORMATTERS ## | |
305 | ################ |
|
306 | ################ | |
306 |
|
307 | |||
307 | [formatter_generic] |
|
308 | [formatter_generic] | |
308 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
309 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
309 | datefmt = %Y-%m-%d %H:%M:%S |
|
310 | datefmt = %Y-%m-%d %H:%M:%S | |
310 |
|
311 | |||
311 | [formatter_color_formatter] |
|
312 | [formatter_color_formatter] | |
312 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
313 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
313 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
314 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
314 | datefmt = %Y-%m-%d %H:%M:%S |
|
315 | datefmt = %Y-%m-%d %H:%M:%S | |
315 |
|
316 | |||
316 | [formatter_color_formatter_sql] |
|
317 | [formatter_color_formatter_sql] | |
317 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
318 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
318 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
319 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
319 | datefmt = %Y-%m-%d %H:%M:%S |
|
320 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,196 +1,194 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | rhodecode.model.pull_reuquest |
|
3 | rhodecode.model.pull_reuquest | |
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 |
|
5 | |||
6 | pull request model for RhodeCode |
|
6 | pull request model for RhodeCode | |
7 |
|
7 | |||
8 | :created_on: Jun 6, 2012 |
|
8 | :created_on: Jun 6, 2012 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 | :copyright: (C) 2012-2012 Marcin Kuzminski <marcin@python-works.com> |
|
10 | :copyright: (C) 2012-2012 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify | |
14 | # it under the terms of the GNU General Public License as published by |
|
14 | # it under the terms of the GNU General Public License as published by | |
15 | # the Free Software Foundation, either version 3 of the License, or |
|
15 | # the Free Software Foundation, either version 3 of the License, or | |
16 | # (at your option) any later version. |
|
16 | # (at your option) any later version. | |
17 | # |
|
17 | # | |
18 | # This program is distributed in the hope that it will be useful, |
|
18 | # This program is distributed in the hope that it will be useful, | |
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | # GNU General Public License for more details. |
|
21 | # GNU General Public License for more details. | |
22 | # |
|
22 | # | |
23 | # You should have received a copy of the GNU General Public License |
|
23 | # You should have received a copy of the GNU General Public License | |
24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 |
|
25 | |||
26 | import logging |
|
26 | import logging | |
27 | import binascii |
|
27 | import binascii | |
|
28 | ||||
28 | from pylons.i18n.translation import _ |
|
29 | from pylons.i18n.translation import _ | |
29 |
|
30 | |||
|
31 | from rhodecode.model.meta import Session | |||
30 | from rhodecode.lib import helpers as h |
|
32 | from rhodecode.lib import helpers as h | |
31 | from rhodecode.model import BaseModel |
|
33 | from rhodecode.model import BaseModel | |
32 |
from rhodecode.model.db import PullRequest, PullRequestReviewers, Notification |
|
34 | from rhodecode.model.db import PullRequest, PullRequestReviewers, Notification | |
33 | ChangesetStatus |
|
|||
34 | from rhodecode.model.notification import NotificationModel |
|
35 | from rhodecode.model.notification import NotificationModel | |
35 | from rhodecode.lib.utils2 import safe_unicode |
|
36 | from rhodecode.lib.utils2 import safe_unicode | |
36 |
|
37 | |||
37 | from rhodecode.lib.vcs.utils.hgcompat import discovery |
|
38 | from rhodecode.lib.vcs.utils.hgcompat import discovery | |
38 | from rhodecode.model.changeset_status import ChangesetStatusModel |
|
|||
39 | from rhodecode.model.comment import ChangesetCommentsModel |
|
|||
40 | from rhodecode.model.meta import Session |
|
|||
41 |
|
39 | |||
42 | log = logging.getLogger(__name__) |
|
40 | log = logging.getLogger(__name__) | |
43 |
|
41 | |||
44 |
|
42 | |||
45 | class PullRequestModel(BaseModel): |
|
43 | class PullRequestModel(BaseModel): | |
46 |
|
44 | |||
47 | cls = PullRequest |
|
45 | cls = PullRequest | |
48 |
|
46 | |||
49 | def get_all(self, repo): |
|
47 | def get_all(self, repo): | |
50 | repo = self._get_repo(repo) |
|
48 | repo = self._get_repo(repo) | |
51 | return PullRequest.query().filter(PullRequest.other_repo == repo).all() |
|
49 | return PullRequest.query().filter(PullRequest.other_repo == repo).all() | |
52 |
|
50 | |||
53 | def create(self, created_by, org_repo, org_ref, other_repo, |
|
51 | def create(self, created_by, org_repo, org_ref, other_repo, | |
54 | other_ref, revisions, reviewers, title, description=None): |
|
52 | other_ref, revisions, reviewers, title, description=None): | |
55 |
|
53 | |||
56 | created_by_user = self._get_user(created_by) |
|
54 | created_by_user = self._get_user(created_by) | |
57 | org_repo = self._get_repo(org_repo) |
|
55 | org_repo = self._get_repo(org_repo) | |
58 | other_repo = self._get_repo(other_repo) |
|
56 | other_repo = self._get_repo(other_repo) | |
59 |
|
57 | |||
60 | new = PullRequest() |
|
58 | new = PullRequest() | |
61 | new.org_repo = org_repo |
|
59 | new.org_repo = org_repo | |
62 | new.org_ref = org_ref |
|
60 | new.org_ref = org_ref | |
63 | new.other_repo = other_repo |
|
61 | new.other_repo = other_repo | |
64 | new.other_ref = other_ref |
|
62 | new.other_ref = other_ref | |
65 | new.revisions = revisions |
|
63 | new.revisions = revisions | |
66 | new.title = title |
|
64 | new.title = title | |
67 | new.description = description |
|
65 | new.description = description | |
68 | new.author = created_by_user |
|
66 | new.author = created_by_user | |
69 | self.sa.add(new) |
|
67 | self.sa.add(new) | |
70 | Session().flush() |
|
68 | Session().flush() | |
71 | #members |
|
69 | #members | |
72 | for member in reviewers: |
|
70 | for member in reviewers: | |
73 | _usr = self._get_user(member) |
|
71 | _usr = self._get_user(member) | |
74 | reviewer = PullRequestReviewers(_usr, new) |
|
72 | reviewer = PullRequestReviewers(_usr, new) | |
75 | self.sa.add(reviewer) |
|
73 | self.sa.add(reviewer) | |
76 |
|
74 | |||
77 | #notification to reviewers |
|
75 | #notification to reviewers | |
78 | notif = NotificationModel() |
|
76 | notif = NotificationModel() | |
79 |
|
77 | |||
80 | subject = safe_unicode( |
|
78 | subject = safe_unicode( | |
81 | h.link_to( |
|
79 | h.link_to( | |
82 | _('%(user)s wants you to review pull request #%(pr_id)s') % \ |
|
80 | _('%(user)s wants you to review pull request #%(pr_id)s') % \ | |
83 | {'user': created_by_user.username, |
|
81 | {'user': created_by_user.username, | |
84 | 'pr_id': new.pull_request_id}, |
|
82 | 'pr_id': new.pull_request_id}, | |
85 | h.url('pullrequest_show', repo_name=other_repo.repo_name, |
|
83 | h.url('pullrequest_show', repo_name=other_repo.repo_name, | |
86 | pull_request_id=new.pull_request_id, |
|
84 | pull_request_id=new.pull_request_id, | |
87 | qualified=True, |
|
85 | qualified=True, | |
88 | ) |
|
86 | ) | |
89 | ) |
|
87 | ) | |
90 | ) |
|
88 | ) | |
91 | body = description |
|
89 | body = description | |
92 | notif.create(created_by=created_by_user, subject=subject, body=body, |
|
90 | notif.create(created_by=created_by_user, subject=subject, body=body, | |
93 | recipients=reviewers, |
|
91 | recipients=reviewers, | |
94 | type_=Notification.TYPE_PULL_REQUEST,) |
|
92 | type_=Notification.TYPE_PULL_REQUEST,) | |
95 |
|
93 | |||
96 | return new |
|
94 | return new | |
97 |
|
95 | |||
98 | def _get_changesets(self, org_repo, org_ref, other_repo, other_ref, |
|
96 | def _get_changesets(self, org_repo, org_ref, other_repo, other_ref, | |
99 | discovery_data): |
|
97 | discovery_data): | |
100 | """ |
|
98 | """ | |
101 | Returns a list of changesets that are incoming from org_repo@org_ref |
|
99 | Returns a list of changesets that are incoming from org_repo@org_ref | |
102 | to other_repo@other_ref |
|
100 | to other_repo@other_ref | |
103 |
|
101 | |||
104 | :param org_repo: |
|
102 | :param org_repo: | |
105 | :type org_repo: |
|
103 | :type org_repo: | |
106 | :param org_ref: |
|
104 | :param org_ref: | |
107 | :type org_ref: |
|
105 | :type org_ref: | |
108 | :param other_repo: |
|
106 | :param other_repo: | |
109 | :type other_repo: |
|
107 | :type other_repo: | |
110 | :param other_ref: |
|
108 | :param other_ref: | |
111 | :type other_ref: |
|
109 | :type other_ref: | |
112 | :param tmp: |
|
110 | :param tmp: | |
113 | :type tmp: |
|
111 | :type tmp: | |
114 | """ |
|
112 | """ | |
115 | changesets = [] |
|
113 | changesets = [] | |
116 | #case two independent repos |
|
114 | #case two independent repos | |
117 | if org_repo != other_repo: |
|
115 | if org_repo != other_repo: | |
118 | common, incoming, rheads = discovery_data |
|
116 | common, incoming, rheads = discovery_data | |
119 |
|
117 | |||
120 | if not incoming: |
|
118 | if not incoming: | |
121 | revs = [] |
|
119 | revs = [] | |
122 | else: |
|
120 | else: | |
123 | revs = org_repo._repo.changelog.findmissing(common, rheads) |
|
121 | revs = org_repo._repo.changelog.findmissing(common, rheads) | |
124 |
|
122 | |||
125 | for cs in reversed(map(binascii.hexlify, revs)): |
|
123 | for cs in reversed(map(binascii.hexlify, revs)): | |
126 | changesets.append(org_repo.get_changeset(cs)) |
|
124 | changesets.append(org_repo.get_changeset(cs)) | |
127 | else: |
|
125 | else: | |
128 | revs = ['ancestors(%s) and not ancestors(%s)' % (org_ref[1], |
|
126 | revs = ['ancestors(%s) and not ancestors(%s)' % (org_ref[1], | |
129 | other_ref[1])] |
|
127 | other_ref[1])] | |
130 | from mercurial import scmutil |
|
128 | from mercurial import scmutil | |
131 | out = scmutil.revrange(org_repo._repo, revs) |
|
129 | out = scmutil.revrange(org_repo._repo, revs) | |
132 | for cs in reversed(out): |
|
130 | for cs in reversed(out): | |
133 | changesets.append(org_repo.get_changeset(cs)) |
|
131 | changesets.append(org_repo.get_changeset(cs)) | |
134 |
|
132 | |||
135 | return changesets |
|
133 | return changesets | |
136 |
|
134 | |||
137 | def _get_discovery(self, org_repo, org_ref, other_repo, other_ref): |
|
135 | def _get_discovery(self, org_repo, org_ref, other_repo, other_ref): | |
138 | """ |
|
136 | """ | |
139 | Get's mercurial discovery data used to calculate difference between |
|
137 | Get's mercurial discovery data used to calculate difference between | |
140 | repos and refs |
|
138 | repos and refs | |
141 |
|
139 | |||
142 | :param org_repo: |
|
140 | :param org_repo: | |
143 | :type org_repo: |
|
141 | :type org_repo: | |
144 | :param org_ref: |
|
142 | :param org_ref: | |
145 | :type org_ref: |
|
143 | :type org_ref: | |
146 | :param other_repo: |
|
144 | :param other_repo: | |
147 | :type other_repo: |
|
145 | :type other_repo: | |
148 | :param other_ref: |
|
146 | :param other_ref: | |
149 | :type other_ref: |
|
147 | :type other_ref: | |
150 | """ |
|
148 | """ | |
151 |
|
149 | |||
152 | other = org_repo._repo |
|
150 | other = org_repo._repo | |
153 | repo = other_repo._repo |
|
151 | repo = other_repo._repo | |
154 | tip = other[org_ref[1]] |
|
152 | tip = other[org_ref[1]] | |
155 | log.debug('Doing discovery for %s@%s vs %s@%s' % ( |
|
153 | log.debug('Doing discovery for %s@%s vs %s@%s' % ( | |
156 | org_repo, org_ref, other_repo, other_ref) |
|
154 | org_repo, org_ref, other_repo, other_ref) | |
157 | ) |
|
155 | ) | |
158 | log.debug('Filter heads are %s[%s]' % (tip, org_ref[1])) |
|
156 | log.debug('Filter heads are %s[%s]' % (tip, org_ref[1])) | |
159 | tmp = discovery.findcommonincoming( |
|
157 | tmp = discovery.findcommonincoming( | |
160 | repo=repo, # other_repo we check for incoming |
|
158 | repo=repo, # other_repo we check for incoming | |
161 | remote=other, # org_repo source for incoming |
|
159 | remote=other, # org_repo source for incoming | |
162 | heads=[tip.node()], |
|
160 | heads=[tip.node()], | |
163 | force=False |
|
161 | force=False | |
164 | ) |
|
162 | ) | |
165 | return tmp |
|
163 | return tmp | |
166 |
|
164 | |||
167 | def get_compare_data(self, org_repo, org_ref, other_repo, other_ref): |
|
165 | def get_compare_data(self, org_repo, org_ref, other_repo, other_ref): | |
168 | """ |
|
166 | """ | |
169 | Returns a tuple of incomming changesets, and discoverydata cache |
|
167 | Returns a tuple of incomming changesets, and discoverydata cache | |
170 |
|
168 | |||
171 | :param org_repo: |
|
169 | :param org_repo: | |
172 | :type org_repo: |
|
170 | :type org_repo: | |
173 | :param org_ref: |
|
171 | :param org_ref: | |
174 | :type org_ref: |
|
172 | :type org_ref: | |
175 | :param other_repo: |
|
173 | :param other_repo: | |
176 | :type other_repo: |
|
174 | :type other_repo: | |
177 | :param other_ref: |
|
175 | :param other_ref: | |
178 | :type other_ref: |
|
176 | :type other_ref: | |
179 | """ |
|
177 | """ | |
180 |
|
178 | |||
181 | if len(org_ref) != 2 or not isinstance(org_ref, (list, tuple)): |
|
179 | if len(org_ref) != 2 or not isinstance(org_ref, (list, tuple)): | |
182 | raise Exception('org_ref must be a two element list/tuple') |
|
180 | raise Exception('org_ref must be a two element list/tuple') | |
183 |
|
181 | |||
184 | if len(other_ref) != 2 or not isinstance(org_ref, (list, tuple)): |
|
182 | if len(other_ref) != 2 or not isinstance(org_ref, (list, tuple)): | |
185 | raise Exception('other_ref must be a two element list/tuple') |
|
183 | raise Exception('other_ref must be a two element list/tuple') | |
186 |
|
184 | |||
187 | discovery_data = self._get_discovery(org_repo.scm_instance, |
|
185 | discovery_data = self._get_discovery(org_repo.scm_instance, | |
188 | org_ref, |
|
186 | org_ref, | |
189 | other_repo.scm_instance, |
|
187 | other_repo.scm_instance, | |
190 | other_ref) |
|
188 | other_ref) | |
191 | cs_ranges = self._get_changesets(org_repo.scm_instance, |
|
189 | cs_ranges = self._get_changesets(org_repo.scm_instance, | |
192 | org_ref, |
|
190 | org_ref, | |
193 | other_repo.scm_instance, |
|
191 | other_repo.scm_instance, | |
194 | other_ref, |
|
192 | other_ref, | |
195 | discovery_data) |
|
193 | discovery_data) | |
196 | return cs_ranges, discovery_data |
|
194 | return cs_ranges, discovery_data |
@@ -1,164 +1,165 b'' | |||||
1 | import os |
|
1 | import os | |
2 | import sys |
|
2 | import sys | |
3 | import platform |
|
3 | import platform | |
4 |
|
4 | |||
5 | if sys.version_info < (2, 5): |
|
5 | if sys.version_info < (2, 5): | |
6 | raise Exception('RhodeCode requires python 2.5 or later') |
|
6 | raise Exception('RhodeCode requires python 2.5 or later') | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | here = os.path.abspath(os.path.dirname(__file__)) |
|
9 | here = os.path.abspath(os.path.dirname(__file__)) | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | def _get_meta_var(name, data, callback_handler=None): |
|
12 | def _get_meta_var(name, data, callback_handler=None): | |
13 | import re |
|
13 | import re | |
14 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) |
|
14 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) | |
15 | if matches: |
|
15 | if matches: | |
16 | if not callable(callback_handler): |
|
16 | if not callable(callback_handler): | |
17 | callback_handler = lambda v: v |
|
17 | callback_handler = lambda v: v | |
18 |
|
18 | |||
19 | return callback_handler(eval(matches.groups()[0])) |
|
19 | return callback_handler(eval(matches.groups()[0])) | |
20 |
|
20 | |||
21 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') |
|
21 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') | |
22 | _metadata = _meta.read() |
|
22 | _metadata = _meta.read() | |
23 | _meta.close() |
|
23 | _meta.close() | |
24 |
|
24 | |||
25 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) |
|
25 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) | |
26 | __version__ = _get_meta_var('VERSION', _metadata, callback) |
|
26 | __version__ = _get_meta_var('VERSION', _metadata, callback) | |
27 | __license__ = _get_meta_var('__license__', _metadata) |
|
27 | __license__ = _get_meta_var('__license__', _metadata) | |
28 | __author__ = _get_meta_var('__author__', _metadata) |
|
28 | __author__ = _get_meta_var('__author__', _metadata) | |
29 | __url__ = _get_meta_var('__url__', _metadata) |
|
29 | __url__ = _get_meta_var('__url__', _metadata) | |
30 | # defines current platform |
|
30 | # defines current platform | |
31 | __platform__ = platform.system() |
|
31 | __platform__ = platform.system() | |
32 |
|
32 | |||
33 | is_windows = __platform__ in _get_meta_var('PLATFORM_WIN', _metadata) |
|
33 | is_windows = __platform__ in _get_meta_var('PLATFORM_WIN', _metadata) | |
34 |
|
34 | |||
35 | requirements = [ |
|
35 | requirements = [ | |
|
36 | "waitress==0.8.1", | |||
36 | "Pylons==1.0.0", |
|
37 | "Pylons==1.0.0", | |
37 | "Beaker==1.6.3", |
|
38 | "Beaker==1.6.3", | |
38 | "WebHelpers==1.3", |
|
39 | "WebHelpers==1.3", | |
39 | "formencode==1.2.4", |
|
40 | "formencode==1.2.4", | |
40 | "SQLAlchemy==0.7.8", |
|
41 | "SQLAlchemy==0.7.8", | |
41 | "Mako==0.7.0", |
|
42 | "Mako==0.7.0", | |
42 | "pygments>=1.4", |
|
43 | "pygments>=1.4", | |
43 | "whoosh>=2.4.0,<2.5", |
|
44 | "whoosh>=2.4.0,<2.5", | |
44 | "celery>=2.2.5,<2.3", |
|
45 | "celery>=2.2.5,<2.3", | |
45 | "babel", |
|
46 | "babel", | |
46 | "python-dateutil>=1.5.0,<2.0.0", |
|
47 | "python-dateutil>=1.5.0,<2.0.0", | |
47 | "dulwich>=0.8.5,<0.9.0", |
|
48 | "dulwich>=0.8.5,<0.9.0", | |
48 | "webob==1.0.8", |
|
49 | "webob==1.0.8", | |
49 | "markdown==2.1.1", |
|
50 | "markdown==2.1.1", | |
50 | "docutils==0.8.1", |
|
51 | "docutils==0.8.1", | |
51 | "simplejson==2.5.2", |
|
52 | "simplejson==2.5.2", | |
52 | "mock" |
|
53 | "mock", | |
53 | ] |
|
54 | ] | |
54 |
|
55 | |||
55 | if sys.version_info < (2, 6): |
|
56 | if sys.version_info < (2, 6): | |
56 | requirements.append("pysqlite") |
|
57 | requirements.append("pysqlite") | |
57 |
|
58 | |||
58 | if sys.version_info <= (2, 6): |
|
59 | if sys.version_info <= (2, 6): | |
59 | requirements.append("unittest2") |
|
60 | requirements.append("unittest2") | |
60 |
|
61 | |||
61 | if is_windows: |
|
62 | if is_windows: | |
62 | requirements.append("mercurial>=2.2.3,<2.3") |
|
63 | requirements.append("mercurial>=2.2.3,<2.3") | |
63 | else: |
|
64 | else: | |
64 | requirements.append("py-bcrypt") |
|
65 | requirements.append("py-bcrypt") | |
65 | requirements.append("mercurial>=2.2.3,<2.3") |
|
66 | requirements.append("mercurial>=2.2.3,<2.3") | |
66 |
|
67 | |||
67 |
|
68 | |||
68 | dependency_links = [ |
|
69 | dependency_links = [ | |
69 | ] |
|
70 | ] | |
70 |
|
71 | |||
71 | classifiers = [ |
|
72 | classifiers = [ | |
72 | 'Development Status :: 4 - Beta', |
|
73 | 'Development Status :: 4 - Beta', | |
73 | 'Environment :: Web Environment', |
|
74 | 'Environment :: Web Environment', | |
74 | 'Framework :: Pylons', |
|
75 | 'Framework :: Pylons', | |
75 | 'Intended Audience :: Developers', |
|
76 | 'Intended Audience :: Developers', | |
76 | 'License :: OSI Approved :: GNU General Public License (GPL)', |
|
77 | 'License :: OSI Approved :: GNU General Public License (GPL)', | |
77 | 'Operating System :: OS Independent', |
|
78 | 'Operating System :: OS Independent', | |
78 | 'Programming Language :: Python', |
|
79 | 'Programming Language :: Python', | |
79 | 'Programming Language :: Python :: 2.5', |
|
80 | 'Programming Language :: Python :: 2.5', | |
80 | 'Programming Language :: Python :: 2.6', |
|
81 | 'Programming Language :: Python :: 2.6', | |
81 | 'Programming Language :: Python :: 2.7', |
|
82 | 'Programming Language :: Python :: 2.7', | |
82 | ] |
|
83 | ] | |
83 |
|
84 | |||
84 |
|
85 | |||
85 | # additional files from project that goes somewhere in the filesystem |
|
86 | # additional files from project that goes somewhere in the filesystem | |
86 | # relative to sys.prefix |
|
87 | # relative to sys.prefix | |
87 | data_files = [] |
|
88 | data_files = [] | |
88 |
|
89 | |||
89 | # additional files that goes into package itself |
|
90 | # additional files that goes into package itself | |
90 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
91 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } | |
91 |
|
92 | |||
92 | description = ('Mercurial repository browser/management with ' |
|
93 | description = ('Mercurial repository browser/management with ' | |
93 | 'build in push/pull server and full text search') |
|
94 | 'build in push/pull server and full text search') | |
94 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', |
|
95 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', | |
95 | 'code review', 'repo groups', 'ldap' |
|
96 | 'code review', 'repo groups', 'ldap' | |
96 | 'repository management', 'hgweb replacement' |
|
97 | 'repository management', 'hgweb replacement' | |
97 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) |
|
98 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) | |
98 | # long description |
|
99 | # long description | |
99 | try: |
|
100 | try: | |
100 | readme_file = 'README.rst' |
|
101 | readme_file = 'README.rst' | |
101 | changelog_file = 'docs/changelog.rst' |
|
102 | changelog_file = 'docs/changelog.rst' | |
102 | long_description = open(readme_file).read() + '\n\n' + \ |
|
103 | long_description = open(readme_file).read() + '\n\n' + \ | |
103 | open(changelog_file).read() |
|
104 | open(changelog_file).read() | |
104 |
|
105 | |||
105 | except IOError, err: |
|
106 | except IOError, err: | |
106 | sys.stderr.write("[WARNING] Cannot find file specified as " |
|
107 | sys.stderr.write("[WARNING] Cannot find file specified as " | |
107 | "long_description (%s)\n or changelog (%s) skipping that file" \ |
|
108 | "long_description (%s)\n or changelog (%s) skipping that file" \ | |
108 | % (readme_file, changelog_file)) |
|
109 | % (readme_file, changelog_file)) | |
109 | long_description = description |
|
110 | long_description = description | |
110 |
|
111 | |||
111 |
|
112 | |||
112 | try: |
|
113 | try: | |
113 | from setuptools import setup, find_packages |
|
114 | from setuptools import setup, find_packages | |
114 | except ImportError: |
|
115 | except ImportError: | |
115 | from ez_setup import use_setuptools |
|
116 | from ez_setup import use_setuptools | |
116 | use_setuptools() |
|
117 | use_setuptools() | |
117 | from setuptools import setup, find_packages |
|
118 | from setuptools import setup, find_packages | |
118 | # packages |
|
119 | # packages | |
119 | packages = find_packages(exclude=['ez_setup']) |
|
120 | packages = find_packages(exclude=['ez_setup']) | |
120 |
|
121 | |||
121 | setup( |
|
122 | setup( | |
122 | name='RhodeCode', |
|
123 | name='RhodeCode', | |
123 | version=__version__, |
|
124 | version=__version__, | |
124 | description=description, |
|
125 | description=description, | |
125 | long_description=long_description, |
|
126 | long_description=long_description, | |
126 | keywords=keywords, |
|
127 | keywords=keywords, | |
127 | license=__license__, |
|
128 | license=__license__, | |
128 | author=__author__, |
|
129 | author=__author__, | |
129 | author_email='marcin@python-works.com', |
|
130 | author_email='marcin@python-works.com', | |
130 | dependency_links=dependency_links, |
|
131 | dependency_links=dependency_links, | |
131 | url=__url__, |
|
132 | url=__url__, | |
132 | install_requires=requirements, |
|
133 | install_requires=requirements, | |
133 | classifiers=classifiers, |
|
134 | classifiers=classifiers, | |
134 | setup_requires=["PasteScript>=1.6.3"], |
|
135 | setup_requires=["PasteScript>=1.6.3"], | |
135 | data_files=data_files, |
|
136 | data_files=data_files, | |
136 | packages=packages, |
|
137 | packages=packages, | |
137 | include_package_data=True, |
|
138 | include_package_data=True, | |
138 | test_suite='nose.collector', |
|
139 | test_suite='nose.collector', | |
139 | package_data=package_data, |
|
140 | package_data=package_data, | |
140 | message_extractors={'rhodecode': [ |
|
141 | message_extractors={'rhodecode': [ | |
141 | ('**.py', 'python', None), |
|
142 | ('**.py', 'python', None), | |
142 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
143 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), | |
143 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
144 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), | |
144 | ('public/**', 'ignore', None)]}, |
|
145 | ('public/**', 'ignore', None)]}, | |
145 | zip_safe=False, |
|
146 | zip_safe=False, | |
146 | paster_plugins=['PasteScript', 'Pylons'], |
|
147 | paster_plugins=['PasteScript', 'Pylons'], | |
147 | entry_points=""" |
|
148 | entry_points=""" | |
148 | [console_scripts] |
|
149 | [console_scripts] | |
149 | rhodecode-api = rhodecode.bin.rhodecode_api:main |
|
150 | rhodecode-api = rhodecode.bin.rhodecode_api:main | |
150 |
|
151 | |||
151 | [paste.app_factory] |
|
152 | [paste.app_factory] | |
152 | main = rhodecode.config.middleware:make_app |
|
153 | main = rhodecode.config.middleware:make_app | |
153 |
|
154 | |||
154 | [paste.app_install] |
|
155 | [paste.app_install] | |
155 | main = pylons.util:PylonsInstaller |
|
156 | main = pylons.util:PylonsInstaller | |
156 |
|
157 | |||
157 | [paste.global_paster_command] |
|
158 | [paste.global_paster_command] | |
158 | setup-rhodecode=rhodecode.config.setup_rhodecode:SetupCommand |
|
159 | setup-rhodecode=rhodecode.config.setup_rhodecode:SetupCommand | |
159 | make-index=rhodecode.lib.indexers:MakeIndex |
|
160 | make-index=rhodecode.lib.indexers:MakeIndex | |
160 | make-rcext=rhodecode.config.rcextensions.make_rcextensions:MakeRcExt |
|
161 | make-rcext=rhodecode.config.rcextensions.make_rcextensions:MakeRcExt | |
161 | upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb |
|
162 | upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb | |
162 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand |
|
163 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand | |
163 | """, |
|
164 | """, | |
164 | ) |
|
165 | ) |
@@ -1,297 +1,298 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
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 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | threadpool_max_requests = 2 |
|
36 | #threadpool_max_requests = 2 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
|
42 | use = egg:waitress#main | |||
42 | host = 127.0.0.1 |
|
43 | host = 127.0.0.1 | |
43 | port = 5000 |
|
44 | port = 5000 | |
44 |
|
45 | |||
45 | [app:main] |
|
46 | [app:main] | |
46 | use = egg:rhodecode |
|
47 | use = egg:rhodecode | |
47 | full_stack = true |
|
48 | full_stack = true | |
48 | static_files = true |
|
49 | static_files = true | |
49 | lang=en |
|
50 | lang=en | |
50 | cache_dir = /tmp/data |
|
51 | cache_dir = /tmp/data | |
51 | index_dir = /tmp/index |
|
52 | index_dir = /tmp/index | |
52 | app_instance_uuid = develop-test |
|
53 | app_instance_uuid = develop-test | |
53 | cut_off_limit = 256000 |
|
54 | cut_off_limit = 256000 | |
54 | force_https = false |
|
55 | force_https = false | |
55 | commit_parse_limit = 25 |
|
56 | commit_parse_limit = 25 | |
56 | use_gravatar = true |
|
57 | use_gravatar = true | |
57 | container_auth_enabled = false |
|
58 | container_auth_enabled = false | |
58 | proxypass_auth_enabled = false |
|
59 | proxypass_auth_enabled = false | |
59 |
|
60 | |||
60 |
|
61 | |||
61 | ## overwrite schema of clone url |
|
62 | ## overwrite schema of clone url | |
62 | ## available vars: |
|
63 | ## available vars: | |
63 | ## scheme - http/https |
|
64 | ## scheme - http/https | |
64 | ## user - current user |
|
65 | ## user - current user | |
65 | ## pass - password |
|
66 | ## pass - password | |
66 | ## netloc - network location |
|
67 | ## netloc - network location | |
67 | ## path - usually repo_name |
|
68 | ## path - usually repo_name | |
68 |
|
69 | |||
69 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
70 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
70 |
|
71 | |||
71 | ## issue tracking mapping for commits messages |
|
72 | ## issue tracking mapping for commits messages | |
72 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
73 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
73 |
|
74 | |||
74 | ## pattern to get the issues from commit messages |
|
75 | ## pattern to get the issues from commit messages | |
75 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
76 | ## default one used here is #<numbers> with a regex passive group for `#` | |
76 | ## {id} will be all groups matched from this pattern |
|
77 | ## {id} will be all groups matched from this pattern | |
77 |
|
78 | |||
78 | issue_pat = (?:\s*#)(\d+) |
|
79 | issue_pat = (?:\s*#)(\d+) | |
79 |
|
80 | |||
80 | ## server url to the issue, each {id} will be replaced with match |
|
81 | ## server url to the issue, each {id} will be replaced with match | |
81 | ## fetched from the regex and {repo} is replaced with repository name |
|
82 | ## fetched from the regex and {repo} is replaced with repository name | |
82 |
|
83 | |||
83 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
84 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
84 |
|
85 | |||
85 | ## prefix to add to link to indicate it's an url |
|
86 | ## prefix to add to link to indicate it's an url | |
86 | ## #314 will be replaced by <issue_prefix><id> |
|
87 | ## #314 will be replaced by <issue_prefix><id> | |
87 |
|
88 | |||
88 | issue_prefix = # |
|
89 | issue_prefix = # | |
89 |
|
90 | |||
90 | ## instance-id prefix |
|
91 | ## instance-id prefix | |
91 | ## a prefix key for this instance used for cache invalidation when running |
|
92 | ## a prefix key for this instance used for cache invalidation when running | |
92 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
93 | ## multiple instances of rhodecode, make sure it's globally unique for | |
93 | ## all running rhodecode instances. Leave empty if you don't use it |
|
94 | ## all running rhodecode instances. Leave empty if you don't use it | |
94 | instance_id = |
|
95 | instance_id = | |
95 |
|
96 | |||
96 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
97 | ## alternative return HTTP header for failed authentication. Default HTTP | |
97 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
98 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
98 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
99 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
99 | auth_ret_code = |
|
100 | auth_ret_code = | |
100 |
|
101 | |||
101 | #################################### |
|
102 | #################################### | |
102 | ### CELERY CONFIG #### |
|
103 | ### CELERY CONFIG #### | |
103 | #################################### |
|
104 | #################################### | |
104 | use_celery = false |
|
105 | use_celery = false | |
105 | broker.host = localhost |
|
106 | broker.host = localhost | |
106 | broker.vhost = rabbitmqhost |
|
107 | broker.vhost = rabbitmqhost | |
107 | broker.port = 5672 |
|
108 | broker.port = 5672 | |
108 | broker.user = rabbitmq |
|
109 | broker.user = rabbitmq | |
109 | broker.password = qweqwe |
|
110 | broker.password = qweqwe | |
110 |
|
111 | |||
111 | celery.imports = rhodecode.lib.celerylib.tasks |
|
112 | celery.imports = rhodecode.lib.celerylib.tasks | |
112 |
|
113 | |||
113 | celery.result.backend = amqp |
|
114 | celery.result.backend = amqp | |
114 | celery.result.dburi = amqp:// |
|
115 | celery.result.dburi = amqp:// | |
115 | celery.result.serialier = json |
|
116 | celery.result.serialier = json | |
116 |
|
117 | |||
117 | #celery.send.task.error.emails = true |
|
118 | #celery.send.task.error.emails = true | |
118 | #celery.amqp.task.result.expires = 18000 |
|
119 | #celery.amqp.task.result.expires = 18000 | |
119 |
|
120 | |||
120 | celeryd.concurrency = 2 |
|
121 | celeryd.concurrency = 2 | |
121 | #celeryd.log.file = celeryd.log |
|
122 | #celeryd.log.file = celeryd.log | |
122 | celeryd.log.level = debug |
|
123 | celeryd.log.level = debug | |
123 | celeryd.max.tasks.per.child = 1 |
|
124 | celeryd.max.tasks.per.child = 1 | |
124 |
|
125 | |||
125 | #tasks will never be sent to the queue, but executed locally instead. |
|
126 | #tasks will never be sent to the queue, but executed locally instead. | |
126 | celery.always.eager = false |
|
127 | celery.always.eager = false | |
127 |
|
128 | |||
128 | #################################### |
|
129 | #################################### | |
129 | ### BEAKER CACHE #### |
|
130 | ### BEAKER CACHE #### | |
130 | #################################### |
|
131 | #################################### | |
131 | beaker.cache.data_dir=/tmp/data/cache/data |
|
132 | beaker.cache.data_dir=/tmp/data/cache/data | |
132 | beaker.cache.lock_dir=/tmp/data/cache/lock |
|
133 | beaker.cache.lock_dir=/tmp/data/cache/lock | |
133 |
|
134 | |||
134 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
135 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
135 |
|
136 | |||
136 | beaker.cache.super_short_term.type=memory |
|
137 | beaker.cache.super_short_term.type=memory | |
137 | beaker.cache.super_short_term.expire=1 |
|
138 | beaker.cache.super_short_term.expire=1 | |
138 | beaker.cache.super_short_term.key_length = 256 |
|
139 | beaker.cache.super_short_term.key_length = 256 | |
139 |
|
140 | |||
140 | beaker.cache.short_term.type=memory |
|
141 | beaker.cache.short_term.type=memory | |
141 | beaker.cache.short_term.expire=60 |
|
142 | beaker.cache.short_term.expire=60 | |
142 | beaker.cache.short_term.key_length = 256 |
|
143 | beaker.cache.short_term.key_length = 256 | |
143 |
|
144 | |||
144 | beaker.cache.long_term.type=memory |
|
145 | beaker.cache.long_term.type=memory | |
145 | beaker.cache.long_term.expire=36000 |
|
146 | beaker.cache.long_term.expire=36000 | |
146 | beaker.cache.long_term.key_length = 256 |
|
147 | beaker.cache.long_term.key_length = 256 | |
147 |
|
148 | |||
148 | beaker.cache.sql_cache_short.type=memory |
|
149 | beaker.cache.sql_cache_short.type=memory | |
149 | beaker.cache.sql_cache_short.expire=1 |
|
150 | beaker.cache.sql_cache_short.expire=1 | |
150 | beaker.cache.sql_cache_short.key_length = 256 |
|
151 | beaker.cache.sql_cache_short.key_length = 256 | |
151 |
|
152 | |||
152 | beaker.cache.sql_cache_med.type=memory |
|
153 | beaker.cache.sql_cache_med.type=memory | |
153 | beaker.cache.sql_cache_med.expire=360 |
|
154 | beaker.cache.sql_cache_med.expire=360 | |
154 | beaker.cache.sql_cache_med.key_length = 256 |
|
155 | beaker.cache.sql_cache_med.key_length = 256 | |
155 |
|
156 | |||
156 | beaker.cache.sql_cache_long.type=file |
|
157 | beaker.cache.sql_cache_long.type=file | |
157 | beaker.cache.sql_cache_long.expire=3600 |
|
158 | beaker.cache.sql_cache_long.expire=3600 | |
158 | beaker.cache.sql_cache_long.key_length = 256 |
|
159 | beaker.cache.sql_cache_long.key_length = 256 | |
159 |
|
160 | |||
160 | #################################### |
|
161 | #################################### | |
161 | ### BEAKER SESSION #### |
|
162 | ### BEAKER SESSION #### | |
162 | #################################### |
|
163 | #################################### | |
163 | ## Type of storage used for the session, current types are |
|
164 | ## Type of storage used for the session, current types are | |
164 | ## dbm, file, memcached, database, and memory. |
|
165 | ## dbm, file, memcached, database, and memory. | |
165 | ## The storage uses the Container API |
|
166 | ## The storage uses the Container API | |
166 | ## that is also used by the cache system. |
|
167 | ## that is also used by the cache system. | |
167 |
|
168 | |||
168 | ## db session example |
|
169 | ## db session example | |
169 |
|
170 | |||
170 | #beaker.session.type = ext:database |
|
171 | #beaker.session.type = ext:database | |
171 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
172 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
172 | #beaker.session.table_name = db_session |
|
173 | #beaker.session.table_name = db_session | |
173 |
|
174 | |||
174 | ## encrypted cookie session, good for many instances |
|
175 | ## encrypted cookie session, good for many instances | |
175 | #beaker.session.type = cookie |
|
176 | #beaker.session.type = cookie | |
176 |
|
177 | |||
177 | beaker.session.type = file |
|
178 | beaker.session.type = file | |
178 | beaker.session.key = rhodecode |
|
179 | beaker.session.key = rhodecode | |
179 | # secure cookie requires AES python libraries |
|
180 | # secure cookie requires AES python libraries | |
180 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
181 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
181 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
182 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
182 | beaker.session.timeout = 36000 |
|
183 | beaker.session.timeout = 36000 | |
183 | beaker.session.httponly = true |
|
184 | beaker.session.httponly = true | |
184 |
|
185 | |||
185 | ## uncomment for https secure cookie |
|
186 | ## uncomment for https secure cookie | |
186 | beaker.session.secure = false |
|
187 | beaker.session.secure = false | |
187 |
|
188 | |||
188 | ##auto save the session to not to use .save() |
|
189 | ##auto save the session to not to use .save() | |
189 | beaker.session.auto = False |
|
190 | beaker.session.auto = False | |
190 |
|
191 | |||
191 | ##true exire at browser close |
|
192 | ##true exire at browser close | |
192 | #beaker.session.cookie_expires = 3600 |
|
193 | #beaker.session.cookie_expires = 3600 | |
193 |
|
194 | |||
194 |
|
195 | |||
195 | ################################################################################ |
|
196 | ################################################################################ | |
196 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
197 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
197 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
198 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
198 | ## execute malicious code after an exception is raised. ## |
|
199 | ## execute malicious code after an exception is raised. ## | |
199 | ################################################################################ |
|
200 | ################################################################################ | |
200 | #set debug = false |
|
201 | #set debug = false | |
201 |
|
202 | |||
202 | ################################## |
|
203 | ################################## | |
203 | ### LOGVIEW CONFIG ### |
|
204 | ### LOGVIEW CONFIG ### | |
204 | ################################## |
|
205 | ################################## | |
205 | logview.sqlalchemy = #faa |
|
206 | logview.sqlalchemy = #faa | |
206 | logview.pylons.templating = #bfb |
|
207 | logview.pylons.templating = #bfb | |
207 | logview.pylons.util = #eee |
|
208 | logview.pylons.util = #eee | |
208 |
|
209 | |||
209 | ######################################################### |
|
210 | ######################################################### | |
210 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
211 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
211 | ######################################################### |
|
212 | ######################################################### | |
212 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite |
|
213 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite | |
213 | #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test |
|
214 | #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test | |
214 | #sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test |
|
215 | #sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test | |
215 |
|
216 | |||
216 | sqlalchemy.db1.echo = false |
|
217 | sqlalchemy.db1.echo = false | |
217 | sqlalchemy.db1.pool_recycle = 3600 |
|
218 | sqlalchemy.db1.pool_recycle = 3600 | |
218 | sqlalchemy.db1.convert_unicode = true |
|
219 | sqlalchemy.db1.convert_unicode = true | |
219 |
|
220 | |||
220 | ################################ |
|
221 | ################################ | |
221 | ### LOGGING CONFIGURATION #### |
|
222 | ### LOGGING CONFIGURATION #### | |
222 | ################################ |
|
223 | ################################ | |
223 | [loggers] |
|
224 | [loggers] | |
224 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
225 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
225 |
|
226 | |||
226 | [handlers] |
|
227 | [handlers] | |
227 | keys = console |
|
228 | keys = console | |
228 |
|
229 | |||
229 | [formatters] |
|
230 | [formatters] | |
230 | keys = generic, color_formatter |
|
231 | keys = generic, color_formatter | |
231 |
|
232 | |||
232 | ############# |
|
233 | ############# | |
233 | ## LOGGERS ## |
|
234 | ## LOGGERS ## | |
234 | ############# |
|
235 | ############# | |
235 | [logger_root] |
|
236 | [logger_root] | |
236 | level = ERROR |
|
237 | level = ERROR | |
237 | handlers = console |
|
238 | handlers = console | |
238 |
|
239 | |||
239 | [logger_routes] |
|
240 | [logger_routes] | |
240 | level = ERROR |
|
241 | level = ERROR | |
241 | handlers = |
|
242 | handlers = | |
242 | qualname = routes.middleware |
|
243 | qualname = routes.middleware | |
243 | # "level = DEBUG" logs the route matched and routing variables. |
|
244 | # "level = DEBUG" logs the route matched and routing variables. | |
244 | propagate = 1 |
|
245 | propagate = 1 | |
245 |
|
246 | |||
246 | [logger_beaker] |
|
247 | [logger_beaker] | |
247 | level = DEBUG |
|
248 | level = DEBUG | |
248 | handlers = |
|
249 | handlers = | |
249 | qualname = beaker.container |
|
250 | qualname = beaker.container | |
250 | propagate = 1 |
|
251 | propagate = 1 | |
251 |
|
252 | |||
252 | [logger_templates] |
|
253 | [logger_templates] | |
253 | level = INFO |
|
254 | level = INFO | |
254 | handlers = |
|
255 | handlers = | |
255 | qualname = pylons.templating |
|
256 | qualname = pylons.templating | |
256 | propagate = 1 |
|
257 | propagate = 1 | |
257 |
|
258 | |||
258 | [logger_rhodecode] |
|
259 | [logger_rhodecode] | |
259 | level = ERROR |
|
260 | level = ERROR | |
260 | handlers = |
|
261 | handlers = | |
261 | qualname = rhodecode |
|
262 | qualname = rhodecode | |
262 | propagate = 1 |
|
263 | propagate = 1 | |
263 |
|
264 | |||
264 | [logger_sqlalchemy] |
|
265 | [logger_sqlalchemy] | |
265 | level = ERROR |
|
266 | level = ERROR | |
266 | handlers = console |
|
267 | handlers = console | |
267 | qualname = sqlalchemy.engine |
|
268 | qualname = sqlalchemy.engine | |
268 | propagate = 0 |
|
269 | propagate = 0 | |
269 |
|
270 | |||
270 | [logger_whoosh_indexer] |
|
271 | [logger_whoosh_indexer] | |
271 | level = DEBUG |
|
272 | level = DEBUG | |
272 | handlers = |
|
273 | handlers = | |
273 | qualname = whoosh_indexer |
|
274 | qualname = whoosh_indexer | |
274 | propagate = 1 |
|
275 | propagate = 1 | |
275 |
|
276 | |||
276 | ############## |
|
277 | ############## | |
277 | ## HANDLERS ## |
|
278 | ## HANDLERS ## | |
278 | ############## |
|
279 | ############## | |
279 |
|
280 | |||
280 | [handler_console] |
|
281 | [handler_console] | |
281 | class = StreamHandler |
|
282 | class = StreamHandler | |
282 | args = (sys.stderr,) |
|
283 | args = (sys.stderr,) | |
283 | level = NOTSET |
|
284 | level = NOTSET | |
284 | formatter = generic |
|
285 | formatter = generic | |
285 |
|
286 | |||
286 | ################ |
|
287 | ################ | |
287 | ## FORMATTERS ## |
|
288 | ## FORMATTERS ## | |
288 | ################ |
|
289 | ################ | |
289 |
|
290 | |||
290 | [formatter_generic] |
|
291 | [formatter_generic] | |
291 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
292 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
292 | datefmt = %Y-%m-%d %H:%M:%S |
|
293 | datefmt = %Y-%m-%d %H:%M:%S | |
293 |
|
294 | |||
294 | [formatter_color_formatter] |
|
295 | [formatter_color_formatter] | |
295 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
296 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
296 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
297 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
297 | datefmt = %Y-%m-%d %H:%M:%S No newline at end of file |
|
298 | datefmt = %Y-%m-%d %H:%M:%S |
General Comments 0
You need to be logged in to leave comments.
Login now