Show More
@@ -1,724 +1,718 b'' | |||
|
1 | 1 | |
|
2 | 2 | |
|
3 | 3 | ################################################################################ |
|
4 |
## |
|
|
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## | |
|
5 | 5 | ################################################################################ |
|
6 | 6 | |
|
7 | 7 | [DEFAULT] |
|
8 | ## Debug flag sets all loggers to debug, and enables request tracking | |
|
8 | 9 | debug = true |
|
9 | 10 | |
|
10 | 11 | ################################################################################ |
|
11 | 12 | ## EMAIL CONFIGURATION ## |
|
12 | 13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | 14 | ## any error reports after an application crash ## |
|
14 | 15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | 16 | ################################################################################ |
|
16 | 17 | |
|
17 | 18 | ## prefix all emails subjects with given prefix, helps filtering out emails |
|
18 | 19 | #email_prefix = [RhodeCode] |
|
19 | 20 | |
|
20 | 21 | ## email FROM address all mails will be sent |
|
21 | 22 | #app_email_from = rhodecode-noreply@localhost |
|
22 | 23 | |
|
23 | 24 | #smtp_server = mail.server.com |
|
24 | 25 | #smtp_username = |
|
25 | 26 | #smtp_password = |
|
26 | 27 | #smtp_port = |
|
27 | 28 | #smtp_use_tls = false |
|
28 | 29 | #smtp_use_ssl = true |
|
29 | 30 | |
|
30 | 31 | [server:main] |
|
31 | 32 | ## COMMON ## |
|
32 | 33 | host = 127.0.0.1 |
|
33 | 34 | port = 5000 |
|
34 | 35 | |
|
35 | 36 | ########################################################### |
|
36 | 37 | ## WAITRESS WSGI SERVER - Recommended for Development #### |
|
37 | 38 | ########################################################### |
|
38 | 39 | |
|
39 | 40 | use = egg:waitress#main |
|
40 | 41 | ## number of worker threads |
|
41 | 42 | threads = 5 |
|
42 | 43 | ## MAX BODY SIZE 100GB |
|
43 | 44 | max_request_body_size = 107374182400 |
|
44 | 45 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
45 | 46 | ## May not work on old windows systems. |
|
46 | 47 | asyncore_use_poll = true |
|
47 | 48 | |
|
48 | 49 | |
|
49 | 50 | ########################## |
|
50 | 51 | ## GUNICORN WSGI SERVER ## |
|
51 | 52 | ########################## |
|
52 | 53 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
53 | 54 | |
|
54 | 55 | #use = egg:gunicorn#main |
|
55 | 56 | ## Sets the number of process workers. More workers means more concurent connections |
|
56 | 57 | ## RhodeCode can handle at the same time. Each additional worker also it increases |
|
57 | 58 | ## memory usage as each has it's own set of caches. |
|
58 | 59 | ## Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more |
|
59 | 60 | ## than 8-10 unless for really big deployments .e.g 700-1000 users. |
|
60 | 61 | ## `instance_id = *` must be set in the [app:main] section below (which is the default) |
|
61 | 62 | ## when using more than 1 worker. |
|
62 | 63 | #workers = 2 |
|
63 | 64 | ## process name visible in process list |
|
64 | 65 | #proc_name = rhodecode |
|
65 | 66 | ## type of worker class, one of sync, gevent |
|
66 | 67 | ## recommended for bigger setup is using of of other than sync one |
|
67 | 68 | #worker_class = gevent |
|
68 | 69 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
69 | 70 | #worker_connections = 10 |
|
70 | 71 | ## max number of requests that worker will handle before being gracefully |
|
71 | 72 | ## restarted, could prevent memory leaks |
|
72 | 73 | #max_requests = 1000 |
|
73 | 74 | #max_requests_jitter = 30 |
|
74 | 75 | ## amount of time a worker can spend with handling a request before it |
|
75 | 76 | ## gets killed and restarted. Set to 6hrs |
|
76 | 77 | #timeout = 21600 |
|
77 | 78 | |
|
78 | 79 | |
|
79 | 80 | ## prefix middleware for RhodeCode. |
|
80 | 81 | ## recommended when using proxy setup. |
|
81 | 82 | ## allows to set RhodeCode under a prefix in server. |
|
82 | 83 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
83 | 84 | ## And set your prefix like: `prefix = /custom_prefix` |
|
84 | 85 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
85 | 86 | ## to make your cookies only work on prefix url |
|
86 | 87 | [filter:proxy-prefix] |
|
87 | 88 | use = egg:PasteDeploy#prefix |
|
88 | 89 | prefix = / |
|
89 | 90 | |
|
90 | 91 | [app:main] |
|
91 | 92 | ## The %(here)s variable will be replaced with the absolute path of parent directory |
|
92 | 93 | ## of this file |
|
93 | 94 | ## In addition ENVIRONMENT variables usage is possible, e.g |
|
94 | 95 | ## sqlalchemy.db1.url = {ENV_RC_DB_URL} |
|
95 | 96 | |
|
96 | 97 | use = egg:rhodecode-enterprise-ce |
|
97 | 98 | |
|
98 | 99 | ## enable proxy prefix middleware, defined above |
|
99 | 100 | #filter-with = proxy-prefix |
|
100 | 101 | |
|
101 | 102 | # During development the we want to have the debug toolbar enabled |
|
102 | 103 | pyramid.includes = |
|
103 | 104 | pyramid_debugtoolbar |
|
104 | 105 | rhodecode.lib.middleware.request_wrapper |
|
105 | 106 | |
|
106 | 107 | pyramid.reload_templates = true |
|
107 | 108 | |
|
108 | 109 | debugtoolbar.hosts = 0.0.0.0/0 |
|
109 | 110 | debugtoolbar.exclude_prefixes = |
|
110 | 111 | /css |
|
111 | 112 | /fonts |
|
112 | 113 | /images |
|
113 | 114 | /js |
|
114 | 115 | |
|
115 | 116 | ## RHODECODE PLUGINS ## |
|
116 | 117 | rhodecode.includes = |
|
117 | 118 | rhodecode.api |
|
118 | 119 | |
|
119 | 120 | |
|
120 | 121 | # api prefix url |
|
121 | 122 | rhodecode.api.url = /_admin/api |
|
122 | 123 | |
|
123 | 124 | |
|
124 | 125 | ## END RHODECODE PLUGINS ## |
|
125 | 126 | |
|
126 | 127 | ## encryption key used to encrypt social plugin tokens, |
|
127 | 128 | ## remote_urls with credentials etc, if not set it defaults to |
|
128 | 129 | ## `beaker.session.secret` |
|
129 | 130 | #rhodecode.encrypted_values.secret = |
|
130 | 131 | |
|
131 | 132 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
132 | 133 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
133 | 134 | #rhodecode.encrypted_values.strict = false |
|
134 | 135 | |
|
135 | 136 | ## return gzipped responses from Rhodecode (static files/application) |
|
136 | 137 | gzip_responses = false |
|
137 | 138 | |
|
138 | 139 | ## autogenerate javascript routes file on startup |
|
139 | 140 | generate_js_files = false |
|
140 | 141 | |
|
141 | 142 | ## System global default language. |
|
142 | 143 | ## All available languages: en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
143 | 144 | lang = en |
|
144 | 145 | |
|
145 | 146 | ## Perform a full repository scan and import on each server start. |
|
146 | 147 | ## Settings this to true could lead to very long startup time. |
|
147 | 148 | startup.import_repos = false |
|
148 | 149 | |
|
149 | 150 | ## Uncomment and set this path to use archive download cache. |
|
150 | 151 | ## Once enabled, generated archives will be cached at this location |
|
151 | 152 | ## and served from the cache during subsequent requests for the same archive of |
|
152 | 153 | ## the repository. |
|
153 | 154 | #archive_cache_dir = /tmp/tarballcache |
|
154 | 155 | |
|
155 | 156 | ## URL at which the application is running. This is used for bootstraping |
|
156 | 157 | ## requests in context when no web request is available. Used in ishell, or |
|
157 | 158 | ## SSH calls. Set this for events to receive proper url for SSH calls. |
|
158 | 159 | app.base_url = http://rhodecode.local |
|
159 | 160 | |
|
160 | 161 | ## Unique application ID. Should be a random unique string for security. |
|
161 | 162 | app_instance_uuid = rc-production |
|
162 | 163 | |
|
163 | 164 | ## Cut off limit for large diffs (size in bytes). If overall diff size on |
|
164 | 165 | ## commit, or pull request exceeds this limit this diff will be displayed |
|
165 | 166 | ## partially. E.g 512000 == 512Kb |
|
166 | 167 | cut_off_limit_diff = 512000 |
|
167 | 168 | |
|
168 | 169 | ## Cut off limit for large files inside diffs (size in bytes). Each individual |
|
169 | 170 | ## file inside diff which exceeds this limit will be displayed partially. |
|
170 | 171 | ## E.g 128000 == 128Kb |
|
171 | 172 | cut_off_limit_file = 128000 |
|
172 | 173 | |
|
173 | 174 | ## use cached version of vcs repositories everywhere. Recommended to be `true` |
|
174 | 175 | vcs_full_cache = true |
|
175 | 176 | |
|
176 | 177 | ## Force https in RhodeCode, fixes https redirects, assumes it's always https. |
|
177 | 178 | ## Normally this is controlled by proper http flags sent from http server |
|
178 | 179 | force_https = false |
|
179 | 180 | |
|
180 | 181 | ## use Strict-Transport-Security headers |
|
181 | 182 | use_htsts = false |
|
182 | 183 | |
|
183 | 184 | ## git rev filter option, --all is the default filter, if you need to |
|
184 | 185 | ## hide all refs in changelog switch this to --branches --tags |
|
185 | 186 | git_rev_filter = --branches --tags |
|
186 | 187 | |
|
187 | 188 | # Set to true if your repos are exposed using the dumb protocol |
|
188 | 189 | git_update_server_info = false |
|
189 | 190 | |
|
190 | 191 | ## RSS/ATOM feed options |
|
191 | 192 | rss_cut_off_limit = 256000 |
|
192 | 193 | rss_items_per_page = 10 |
|
193 | 194 | rss_include_diff = false |
|
194 | 195 | |
|
195 | 196 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
196 | 197 | ## url that does rewrites to _admin/gists/{gistid}. |
|
197 | 198 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
198 | 199 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
199 | 200 | gist_alias_url = |
|
200 | 201 | |
|
201 | 202 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
202 | 203 | ## used for access. |
|
203 | 204 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
204 | 205 | ## came from the the logged in user who own this authentication token. |
|
205 | 206 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific |
|
206 | 207 | ## authentication token. Such view would be only accessible when used together |
|
207 | 208 | ## with this authentication token |
|
208 | 209 | ## |
|
209 | 210 | ## list of all views can be found under `/_admin/permissions/auth_token_access` |
|
210 | 211 | ## The list should be "," separated and on a single line. |
|
211 | 212 | ## |
|
212 | 213 | ## Most common views to enable: |
|
213 | 214 | # RepoCommitsView:repo_commit_download |
|
214 | 215 | # RepoCommitsView:repo_commit_patch |
|
215 | 216 | # RepoCommitsView:repo_commit_raw |
|
216 | 217 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
217 | 218 | # RepoFilesView:repo_files_diff |
|
218 | 219 | # RepoFilesView:repo_archivefile |
|
219 | 220 | # RepoFilesView:repo_file_raw |
|
220 | 221 | # GistView:* |
|
221 | 222 | api_access_controllers_whitelist = |
|
222 | 223 | |
|
223 | 224 | ## Default encoding used to convert from and to unicode |
|
224 | 225 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
225 | 226 | default_encoding = UTF-8 |
|
226 | 227 | |
|
227 | 228 | ## instance-id prefix |
|
228 | 229 | ## a prefix key for this instance used for cache invalidation when running |
|
229 | 230 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
230 | 231 | ## all running rhodecode instances. Leave empty if you don't use it |
|
231 | 232 | instance_id = |
|
232 | 233 | |
|
233 | 234 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
234 | 235 | ## of an authentication plugin also if it is disabled by it's settings. |
|
235 | 236 | ## This could be useful if you are unable to log in to the system due to broken |
|
236 | 237 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
237 | 238 | ## module to log in again and fix the settings. |
|
238 | 239 | ## |
|
239 | 240 | ## Available builtin plugin IDs (hash is part of the ID): |
|
240 | 241 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
241 | 242 | ## egg:rhodecode-enterprise-ce#pam |
|
242 | 243 | ## egg:rhodecode-enterprise-ce#ldap |
|
243 | 244 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
244 | 245 | ## egg:rhodecode-enterprise-ce#headers |
|
245 | 246 | ## egg:rhodecode-enterprise-ce#crowd |
|
246 | 247 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
247 | 248 | |
|
248 | 249 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
249 | 250 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
250 | 251 | ## handling that causing a series of failed authentication calls. |
|
251 | 252 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
252 | 253 | ## This will be served instead of default 401 on bad authnetication |
|
253 | 254 | auth_ret_code = |
|
254 | 255 | |
|
255 | 256 | ## use special detection method when serving auth_ret_code, instead of serving |
|
256 | 257 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
257 | 258 | ## and then serve auth_ret_code to clients |
|
258 | 259 | auth_ret_code_detection = false |
|
259 | 260 | |
|
260 | 261 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
261 | 262 | ## codes don't break the transactions while 4XX codes do |
|
262 | 263 | lock_ret_code = 423 |
|
263 | 264 | |
|
264 | 265 | ## allows to change the repository location in settings page |
|
265 | 266 | allow_repo_location_change = true |
|
266 | 267 | |
|
267 | 268 | ## allows to setup custom hooks in settings page |
|
268 | 269 | allow_custom_hooks_settings = true |
|
269 | 270 | |
|
270 | 271 | ## Generated license token required for EE edition license. |
|
271 | 272 | ## New generated token value can be found in Admin > settings > license page. |
|
272 | 273 | license_token = |
|
273 | 274 | |
|
274 | 275 | ## supervisor connection uri, for managing supervisor and logs. |
|
275 | 276 | supervisor.uri = |
|
276 | 277 | ## supervisord group name/id we only want this RC instance to handle |
|
277 | 278 | supervisor.group_id = dev |
|
278 | 279 | |
|
279 | 280 | ## Display extended labs settings |
|
280 | 281 | labs_settings_active = true |
|
281 | 282 | |
|
282 | 283 | ## Custom exception store path, defaults to TMPDIR |
|
283 | 284 | ## This is used to store exception from RhodeCode in shared directory |
|
284 | 285 | #exception_tracker.store_path = |
|
285 | 286 | |
|
286 | 287 | |
|
287 | 288 | #################################### |
|
288 | 289 | ### CELERY CONFIG #### |
|
289 | 290 | #################################### |
|
290 | 291 | ## run: /path/to/celery worker \ |
|
291 | 292 | ## -E --beat --app rhodecode.lib.celerylib.loader \ |
|
292 | 293 | ## --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler \ |
|
293 | 294 | ## --loglevel DEBUG --ini /path/to/rhodecode.ini |
|
294 | 295 | |
|
295 | 296 | use_celery = false |
|
296 | 297 | |
|
297 | 298 | ## connection url to the message broker (default rabbitmq) |
|
298 | 299 | celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost |
|
299 | 300 | |
|
300 | 301 | ## maximum tasks to execute before worker restart |
|
301 | 302 | celery.max_tasks_per_child = 100 |
|
302 | 303 | |
|
303 | 304 | ## tasks will never be sent to the queue, but executed locally instead. |
|
304 | 305 | celery.task_always_eager = false |
|
305 | 306 | |
|
306 | 307 | ##################################### |
|
307 | 308 | ### DOGPILE CACHE #### |
|
308 | 309 | ##################################### |
|
309 | 310 | ## Default cache dir for caches. Putting this into a ramdisk |
|
310 | 311 | ## can boost performance, eg. /tmpfs/data_ramdisk, however this directory might require |
|
311 | 312 | ## large amount of space |
|
312 | 313 | cache_dir = %(here)s/data |
|
313 | 314 | |
|
314 | 315 | ## `cache_perms` cache settings for permission tree, auth TTL. |
|
315 | 316 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
316 | 317 | rc_cache.cache_perms.expiration_time = 300 |
|
317 | 318 | |
|
318 | 319 | ## alternative `cache_perms` redis backend with distributed lock |
|
319 | 320 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis |
|
320 | 321 | #rc_cache.cache_perms.expiration_time = 300 |
|
321 | 322 | ## redis_expiration_time needs to be greater then expiration_time |
|
322 | 323 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 |
|
323 | 324 | #rc_cache.cache_perms.arguments.socket_timeout = 30 |
|
324 | 325 | #rc_cache.cache_perms.arguments.host = localhost |
|
325 | 326 | #rc_cache.cache_perms.arguments.port = 6379 |
|
326 | 327 | #rc_cache.cache_perms.arguments.db = 0 |
|
327 | 328 | #rc_cache.cache_perms.arguments.distributed_lock = true |
|
328 | 329 | |
|
329 | 330 | ## `cache_repo` cache settings for FileTree, Readme, RSS FEEDS |
|
330 | 331 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
331 | 332 | rc_cache.cache_repo.expiration_time = 2592000 |
|
332 | 333 | |
|
333 | 334 | ## alternative `cache_repo` redis backend with distributed lock |
|
334 | 335 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis |
|
335 | 336 | #rc_cache.cache_repo.expiration_time = 2592000 |
|
336 | 337 | ## redis_expiration_time needs to be greater then expiration_time |
|
337 | 338 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 |
|
338 | 339 | #rc_cache.cache_repo.arguments.socket_timeout = 30 |
|
339 | 340 | #rc_cache.cache_repo.arguments.host = localhost |
|
340 | 341 | #rc_cache.cache_repo.arguments.port = 6379 |
|
341 | 342 | #rc_cache.cache_repo.arguments.db = 1 |
|
342 | 343 | #rc_cache.cache_repo.arguments.distributed_lock = true |
|
343 | 344 | |
|
344 | 345 | ## cache settings for SQL queries, this needs to use memory type backend |
|
345 | 346 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru |
|
346 | 347 | rc_cache.sql_cache_short.expiration_time = 30 |
|
347 | 348 | |
|
348 | 349 | ## `cache_repo_longterm` cache for repo object instances, this needs to use memory |
|
349 | 350 | ## type backend as the objects kept are not pickle serializable |
|
350 | 351 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru |
|
351 | 352 | ## by default we use 96H, this is using invalidation on push anyway |
|
352 | 353 | rc_cache.cache_repo_longterm.expiration_time = 345600 |
|
353 | 354 | ## max items in LRU cache, reduce this number to save memory, and expire last used |
|
354 | 355 | ## cached objects |
|
355 | 356 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
356 | 357 | |
|
357 | 358 | |
|
358 | 359 | #################################### |
|
359 | 360 | ### BEAKER SESSION #### |
|
360 | 361 | #################################### |
|
361 | 362 | |
|
362 | 363 | ## .session.type is type of storage options for the session, current allowed |
|
363 | 364 | ## types are file, ext:memcached, ext:redis, ext:database, and memory (default). |
|
364 | 365 | beaker.session.type = file |
|
365 | 366 | beaker.session.data_dir = %(here)s/data/sessions |
|
366 | 367 | |
|
367 | 368 | ## db based session, fast, and allows easy management over logged in users |
|
368 | 369 | #beaker.session.type = ext:database |
|
369 | 370 | #beaker.session.table_name = db_session |
|
370 | 371 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
371 | 372 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
372 | 373 | #beaker.session.sa.pool_recycle = 3600 |
|
373 | 374 | #beaker.session.sa.echo = false |
|
374 | 375 | |
|
375 | 376 | beaker.session.key = rhodecode |
|
376 | 377 | beaker.session.secret = develop-rc-uytcxaz |
|
377 | 378 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
378 | 379 | |
|
379 | 380 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
380 | 381 | ## you must disable beaker.session.secret to use this |
|
381 | 382 | #beaker.session.encrypt_key = key_for_encryption |
|
382 | 383 | #beaker.session.validate_key = validation_key |
|
383 | 384 | |
|
384 | 385 | ## sets session as invalid(also logging out user) if it haven not been |
|
385 | 386 | ## accessed for given amount of time in seconds |
|
386 | 387 | beaker.session.timeout = 2592000 |
|
387 | 388 | beaker.session.httponly = true |
|
388 | 389 | ## Path to use for the cookie. Set to prefix if you use prefix middleware |
|
389 | 390 | #beaker.session.cookie_path = /custom_prefix |
|
390 | 391 | |
|
391 | 392 | ## uncomment for https secure cookie |
|
392 | 393 | beaker.session.secure = false |
|
393 | 394 | |
|
394 | 395 | ## auto save the session to not to use .save() |
|
395 | 396 | beaker.session.auto = false |
|
396 | 397 | |
|
397 | 398 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
398 | 399 | ## at browser close |
|
399 | 400 | #beaker.session.cookie_expires = 3600 |
|
400 | 401 | |
|
401 | 402 | ################################### |
|
402 | 403 | ## SEARCH INDEXING CONFIGURATION ## |
|
403 | 404 | ################################### |
|
404 | 405 | ## Full text search indexer is available in rhodecode-tools under |
|
405 | 406 | ## `rhodecode-tools index` command |
|
406 | 407 | |
|
407 | 408 | ## WHOOSH Backend, doesn't require additional services to run |
|
408 | 409 | ## it works good with few dozen repos |
|
409 | 410 | search.module = rhodecode.lib.index.whoosh |
|
410 | 411 | search.location = %(here)s/data/index |
|
411 | 412 | |
|
412 | 413 | ######################################## |
|
413 | 414 | ### CHANNELSTREAM CONFIG #### |
|
414 | 415 | ######################################## |
|
415 | 416 | ## channelstream enables persistent connections and live notification |
|
416 | 417 | ## in the system. It's also used by the chat system |
|
418 | ||
|
417 | 419 | channelstream.enabled = false |
|
418 | 420 | |
|
419 | 421 | ## server address for channelstream server on the backend |
|
420 | 422 | channelstream.server = 127.0.0.1:9800 |
|
421 | 423 | |
|
422 | 424 | ## location of the channelstream server from outside world |
|
423 | 425 | ## use ws:// for http or wss:// for https. This address needs to be handled |
|
424 | 426 | ## by external HTTP server such as Nginx or Apache |
|
425 | 427 | ## see nginx/apache configuration examples in our docs |
|
426 | 428 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
427 | 429 | channelstream.secret = secret |
|
428 | 430 | channelstream.history.location = %(here)s/channelstream_history |
|
429 | 431 | |
|
430 | 432 | ## Internal application path that Javascript uses to connect into. |
|
431 | 433 | ## If you use proxy-prefix the prefix should be added before /_channelstream |
|
432 | 434 | channelstream.proxy_path = /_channelstream |
|
433 | 435 | |
|
434 | 436 | |
|
435 | 437 | ################################### |
|
436 | 438 | ## APPENLIGHT CONFIG ## |
|
437 | 439 | ################################### |
|
438 | 440 | |
|
439 | 441 | ## Appenlight is tailored to work with RhodeCode, see |
|
440 | 442 | ## http://appenlight.com for details how to obtain an account |
|
441 | 443 | |
|
442 | 444 | ## appenlight integration enabled |
|
443 | 445 | appenlight = false |
|
444 | 446 | |
|
445 | 447 | appenlight.server_url = https://api.appenlight.com |
|
446 | 448 | appenlight.api_key = YOUR_API_KEY |
|
447 | 449 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
448 | 450 | |
|
449 | 451 | # used for JS client |
|
450 | 452 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
451 | 453 | |
|
452 | 454 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
453 | 455 | |
|
454 | 456 | ## enables 404 error logging (default False) |
|
455 | 457 | appenlight.report_404 = false |
|
456 | 458 | |
|
457 | 459 | ## time in seconds after request is considered being slow (default 1) |
|
458 | 460 | appenlight.slow_request_time = 1 |
|
459 | 461 | |
|
460 | 462 | ## record slow requests in application |
|
461 | 463 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
462 | 464 | appenlight.slow_requests = true |
|
463 | 465 | |
|
464 | 466 | ## enable hooking to application loggers |
|
465 | 467 | appenlight.logging = true |
|
466 | 468 | |
|
467 | 469 | ## minimum log level for log capture |
|
468 | 470 | appenlight.logging.level = WARNING |
|
469 | 471 | |
|
470 | 472 | ## send logs only from erroneous/slow requests |
|
471 | 473 | ## (saves API quota for intensive logging) |
|
472 | 474 | appenlight.logging_on_error = false |
|
473 | 475 | |
|
474 | 476 | ## list of additonal keywords that should be grabbed from environ object |
|
475 | 477 | ## can be string with comma separated list of words in lowercase |
|
476 | 478 | ## (by default client will always send following info: |
|
477 | 479 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
478 | 480 | ## start with HTTP* this list be extended with additional keywords here |
|
479 | 481 | appenlight.environ_keys_whitelist = |
|
480 | 482 | |
|
481 | 483 | ## list of keywords that should be blanked from request object |
|
482 | 484 | ## can be string with comma separated list of words in lowercase |
|
483 | 485 | ## (by default client will always blank keys that contain following words |
|
484 | 486 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
485 | 487 | ## this list be extended with additional keywords set here |
|
486 | 488 | appenlight.request_keys_blacklist = |
|
487 | 489 | |
|
488 | 490 | ## list of namespaces that should be ignores when gathering log entries |
|
489 | 491 | ## can be string with comma separated list of namespaces |
|
490 | 492 | ## (by default the client ignores own entries: appenlight_client.client) |
|
491 | 493 | appenlight.log_namespace_blacklist = |
|
492 | 494 | |
|
493 | ||
|
494 | ################################################################################ | |
|
495 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
|
496 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
|
497 | ## execute malicious code after an exception is raised. ## | |
|
498 | ################################################################################ | |
|
499 | #set debug = false | |
|
500 | ||
|
501 | 495 | # enable debug style page |
|
502 | 496 | debug_style = true |
|
503 | 497 | |
|
504 | 498 | ########################################### |
|
505 | 499 | ### MAIN RHODECODE DATABASE CONFIG ### |
|
506 | 500 | ########################################### |
|
507 | 501 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
508 | 502 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
509 | 503 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 |
|
510 | 504 | # pymysql is an alternative driver for MySQL, use in case of problems with default one |
|
511 | 505 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode |
|
512 | 506 | |
|
513 | 507 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
514 | 508 | |
|
515 | 509 | # see sqlalchemy docs for other advanced settings |
|
516 | 510 | |
|
517 | 511 | ## print the sql statements to output |
|
518 | 512 | sqlalchemy.db1.echo = false |
|
519 | 513 | ## recycle the connections after this amount of seconds |
|
520 | 514 | sqlalchemy.db1.pool_recycle = 3600 |
|
521 | 515 | sqlalchemy.db1.convert_unicode = true |
|
522 | 516 | |
|
523 | 517 | ## the number of connections to keep open inside the connection pool. |
|
524 | 518 | ## 0 indicates no limit |
|
525 | 519 | #sqlalchemy.db1.pool_size = 5 |
|
526 | 520 | |
|
527 | 521 | ## the number of connections to allow in connection pool "overflow", that is |
|
528 | 522 | ## connections that can be opened above and beyond the pool_size setting, |
|
529 | 523 | ## which defaults to five. |
|
530 | 524 | #sqlalchemy.db1.max_overflow = 10 |
|
531 | 525 | |
|
532 | 526 | ## Connection check ping, used to detect broken database connections |
|
533 | 527 | ## could be enabled to better handle cases if MySQL has gone away errors |
|
534 | 528 | #sqlalchemy.db1.ping_connection = true |
|
535 | 529 | |
|
536 | 530 | ################## |
|
537 | 531 | ### VCS CONFIG ### |
|
538 | 532 | ################## |
|
539 | 533 | vcs.server.enable = true |
|
540 | 534 | vcs.server = localhost:9900 |
|
541 | 535 | |
|
542 | 536 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
543 | 537 | ## Available protocols are: |
|
544 | 538 | ## `http` - use http-rpc backend (default) |
|
545 | 539 | vcs.server.protocol = http |
|
546 | 540 | |
|
547 | 541 | ## Push/Pull operations protocol, available options are: |
|
548 | 542 | ## `http` - use http-rpc backend (default) |
|
549 | 543 | vcs.scm_app_implementation = http |
|
550 | 544 | |
|
551 | 545 | ## Push/Pull operations hooks protocol, available options are: |
|
552 | 546 | ## `http` - use http-rpc backend (default) |
|
553 | 547 | vcs.hooks.protocol = http |
|
554 | 548 | |
|
555 | 549 | ## Host on which this instance is listening for hooks. If vcsserver is in other location |
|
556 | 550 | ## this should be adjusted. |
|
557 | 551 | vcs.hooks.host = 127.0.0.1 |
|
558 | 552 | |
|
559 | 553 | vcs.server.log_level = debug |
|
560 | 554 | ## Start VCSServer with this instance as a subprocess, useful for development |
|
561 | 555 | vcs.start_server = false |
|
562 | 556 | |
|
563 | 557 | ## List of enabled VCS backends, available options are: |
|
564 | 558 | ## `hg` - mercurial |
|
565 | 559 | ## `git` - git |
|
566 | 560 | ## `svn` - subversion |
|
567 | 561 | vcs.backends = hg, git, svn |
|
568 | 562 | |
|
569 | 563 | vcs.connection_timeout = 3600 |
|
570 | 564 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
571 | 565 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
572 | 566 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
573 | 567 | |
|
574 | 568 | |
|
575 | 569 | ############################################################ |
|
576 | 570 | ### Subversion proxy support (mod_dav_svn) ### |
|
577 | 571 | ### Maps RhodeCode repo groups into SVN paths for Apache ### |
|
578 | 572 | ############################################################ |
|
579 | 573 | ## Enable or disable the config file generation. |
|
580 | 574 | svn.proxy.generate_config = false |
|
581 | 575 | ## Generate config file with `SVNListParentPath` set to `On`. |
|
582 | 576 | svn.proxy.list_parent_path = true |
|
583 | 577 | ## Set location and file name of generated config file. |
|
584 | 578 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf |
|
585 | 579 | ## alternative mod_dav config template. This needs to be a mako template |
|
586 | 580 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako |
|
587 | 581 | ## Used as a prefix to the `Location` block in the generated config file. |
|
588 | 582 | ## In most cases it should be set to `/`. |
|
589 | 583 | svn.proxy.location_root = / |
|
590 | 584 | ## Command to reload the mod dav svn configuration on change. |
|
591 | 585 | ## Example: `/etc/init.d/apache2 reload` |
|
592 | 586 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
593 | 587 | ## If the timeout expires before the reload command finishes, the command will |
|
594 | 588 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
595 | 589 | #svn.proxy.reload_timeout = 10 |
|
596 | 590 | |
|
597 | 591 | ############################################################ |
|
598 | 592 | ### SSH Support Settings ### |
|
599 | 593 | ############################################################ |
|
600 | 594 | |
|
601 | 595 | ## Defines if a custom authorized_keys file should be created and written on |
|
602 | 596 | ## any change user ssh keys. Setting this to false also disables posibility |
|
603 | 597 | ## of adding SSH keys by users from web interface. Super admins can still |
|
604 | 598 | ## manage SSH Keys. |
|
605 | 599 | ssh.generate_authorized_keyfile = false |
|
606 | 600 | |
|
607 | 601 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
608 | 602 | # ssh.authorized_keys_ssh_opts = |
|
609 | 603 | |
|
610 | 604 | ## Path to the authrozied_keys file where the generate entries are placed. |
|
611 | 605 | ## It is possible to have multiple key files specified in `sshd_config` e.g. |
|
612 | 606 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
613 | 607 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode |
|
614 | 608 | |
|
615 | 609 | ## Command to execute the SSH wrapper. The binary is available in the |
|
616 | 610 | ## rhodecode installation directory. |
|
617 | 611 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper |
|
618 | 612 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper |
|
619 | 613 | |
|
620 | 614 | ## Allow shell when executing the ssh-wrapper command |
|
621 | 615 | ssh.wrapper_cmd_allow_shell = false |
|
622 | 616 | |
|
623 | 617 | ## Enables logging, and detailed output send back to the client during SSH |
|
624 | 618 | ## operations. Usefull for debugging, shouldn't be used in production. |
|
625 | 619 | ssh.enable_debug_logging = true |
|
626 | 620 | |
|
627 | 621 | ## Paths to binary executable, by default they are the names, but we can |
|
628 | 622 | ## override them if we want to use a custom one |
|
629 | 623 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg |
|
630 | 624 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git |
|
631 | 625 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve |
|
632 | 626 | |
|
633 | 627 | |
|
634 | 628 | ## Dummy marker to add new entries after. |
|
635 | 629 | ## Add any custom entries below. Please don't remove. |
|
636 | 630 | custom.conf = 1 |
|
637 | 631 | |
|
638 | 632 | |
|
639 | 633 | ################################ |
|
640 | 634 | ### LOGGING CONFIGURATION #### |
|
641 | 635 | ################################ |
|
642 | 636 | [loggers] |
|
643 | 637 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper |
|
644 | 638 | |
|
645 | 639 | [handlers] |
|
646 | 640 | keys = console, console_sql |
|
647 | 641 | |
|
648 | 642 | [formatters] |
|
649 | 643 | keys = generic, color_formatter, color_formatter_sql |
|
650 | 644 | |
|
651 | 645 | ############# |
|
652 | 646 | ## LOGGERS ## |
|
653 | 647 | ############# |
|
654 | 648 | [logger_root] |
|
655 | 649 | level = NOTSET |
|
656 | 650 | handlers = console |
|
657 | 651 | |
|
658 | 652 | [logger_sqlalchemy] |
|
659 | 653 | level = INFO |
|
660 | 654 | handlers = console_sql |
|
661 | 655 | qualname = sqlalchemy.engine |
|
662 | 656 | propagate = 0 |
|
663 | 657 | |
|
664 | 658 | [logger_beaker] |
|
665 | 659 | level = DEBUG |
|
666 | 660 | handlers = |
|
667 | 661 | qualname = beaker.container |
|
668 | 662 | propagate = 1 |
|
669 | 663 | |
|
670 | 664 | [logger_rhodecode] |
|
671 | 665 | level = DEBUG |
|
672 | 666 | handlers = |
|
673 | 667 | qualname = rhodecode |
|
674 | 668 | propagate = 1 |
|
675 | 669 | |
|
676 | 670 | [logger_ssh_wrapper] |
|
677 | 671 | level = DEBUG |
|
678 | 672 | handlers = |
|
679 | 673 | qualname = ssh_wrapper |
|
680 | 674 | propagate = 1 |
|
681 | 675 | |
|
682 | 676 | [logger_celery] |
|
683 | 677 | level = DEBUG |
|
684 | 678 | handlers = |
|
685 | 679 | qualname = celery |
|
686 | 680 | |
|
687 | 681 | |
|
688 | 682 | ############## |
|
689 | 683 | ## HANDLERS ## |
|
690 | 684 | ############## |
|
691 | 685 | |
|
692 | 686 | [handler_console] |
|
693 | 687 | class = StreamHandler |
|
694 | 688 | args = (sys.stderr, ) |
|
695 | 689 | level = DEBUG |
|
696 | 690 | formatter = color_formatter |
|
697 | 691 | |
|
698 | 692 | [handler_console_sql] |
|
699 | 693 | # "level = DEBUG" logs SQL queries and results. |
|
700 | 694 | # "level = INFO" logs SQL queries. |
|
701 | 695 | # "level = WARN" logs neither. (Recommended for production systems.) |
|
702 | 696 | class = StreamHandler |
|
703 | 697 | args = (sys.stderr, ) |
|
704 | 698 | level = WARN |
|
705 | 699 | formatter = color_formatter_sql |
|
706 | 700 | |
|
707 | 701 | ################ |
|
708 | 702 | ## FORMATTERS ## |
|
709 | 703 | ################ |
|
710 | 704 | |
|
711 | 705 | [formatter_generic] |
|
712 | 706 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
713 | 707 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
714 | 708 | datefmt = %Y-%m-%d %H:%M:%S |
|
715 | 709 | |
|
716 | 710 | [formatter_color_formatter] |
|
717 | 711 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
718 | 712 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
719 | 713 | datefmt = %Y-%m-%d %H:%M:%S |
|
720 | 714 | |
|
721 | 715 | [formatter_color_formatter_sql] |
|
722 | 716 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
723 | 717 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
724 | 718 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,696 +1,691 b'' | |||
|
1 | 1 | |
|
2 | 2 | |
|
3 | 3 | ################################################################################ |
|
4 |
## |
|
|
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## | |
|
5 | 5 | ################################################################################ |
|
6 | 6 | |
|
7 | 7 | [DEFAULT] |
|
8 | debug = true | |
|
8 | ## Debug flag sets all loggers to debug, and enables request tracking | |
|
9 | debug = false | |
|
9 | 10 | |
|
10 | 11 | ################################################################################ |
|
11 | 12 | ## EMAIL CONFIGURATION ## |
|
12 | 13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | 14 | ## any error reports after an application crash ## |
|
14 | 15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | 16 | ################################################################################ |
|
16 | 17 | |
|
17 | 18 | ## prefix all emails subjects with given prefix, helps filtering out emails |
|
18 | 19 | #email_prefix = [RhodeCode] |
|
19 | 20 | |
|
20 | 21 | ## email FROM address all mails will be sent |
|
21 | 22 | #app_email_from = rhodecode-noreply@localhost |
|
22 | 23 | |
|
23 | 24 | #smtp_server = mail.server.com |
|
24 | 25 | #smtp_username = |
|
25 | 26 | #smtp_password = |
|
26 | 27 | #smtp_port = |
|
27 | 28 | #smtp_use_tls = false |
|
28 | 29 | #smtp_use_ssl = true |
|
29 | 30 | |
|
30 | 31 | [server:main] |
|
31 | 32 | ## COMMON ## |
|
32 | 33 | host = 127.0.0.1 |
|
33 | 34 | port = 5000 |
|
34 | 35 | |
|
35 | 36 | ########################################################### |
|
36 | 37 | ## WAITRESS WSGI SERVER - Recommended for Development #### |
|
37 | 38 | ########################################################### |
|
38 | 39 | |
|
39 | 40 | #use = egg:waitress#main |
|
40 | 41 | ## number of worker threads |
|
41 | 42 | #threads = 5 |
|
42 | 43 | ## MAX BODY SIZE 100GB |
|
43 | 44 | #max_request_body_size = 107374182400 |
|
44 | 45 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
45 | 46 | ## May not work on old windows systems. |
|
46 | 47 | #asyncore_use_poll = true |
|
47 | 48 | |
|
48 | 49 | |
|
49 | 50 | ########################## |
|
50 | 51 | ## GUNICORN WSGI SERVER ## |
|
51 | 52 | ########################## |
|
52 | 53 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
53 | 54 | |
|
54 | 55 | use = egg:gunicorn#main |
|
55 | 56 | ## Sets the number of process workers. More workers means more concurent connections |
|
56 | 57 | ## RhodeCode can handle at the same time. Each additional worker also it increases |
|
57 | 58 | ## memory usage as each has it's own set of caches. |
|
58 | 59 | ## Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more |
|
59 | 60 | ## than 8-10 unless for really big deployments .e.g 700-1000 users. |
|
60 | 61 | ## `instance_id = *` must be set in the [app:main] section below (which is the default) |
|
61 | 62 | ## when using more than 1 worker. |
|
62 | 63 | workers = 2 |
|
63 | 64 | ## process name visible in process list |
|
64 | 65 | proc_name = rhodecode |
|
65 | 66 | ## type of worker class, one of sync, gevent |
|
66 | 67 | ## recommended for bigger setup is using of of other than sync one |
|
67 | 68 | worker_class = gevent |
|
68 | 69 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
69 | 70 | worker_connections = 10 |
|
70 | 71 | ## max number of requests that worker will handle before being gracefully |
|
71 | 72 | ## restarted, could prevent memory leaks |
|
72 | 73 | max_requests = 1000 |
|
73 | 74 | max_requests_jitter = 30 |
|
74 | 75 | ## amount of time a worker can spend with handling a request before it |
|
75 | 76 | ## gets killed and restarted. Set to 6hrs |
|
76 | 77 | timeout = 21600 |
|
77 | 78 | |
|
78 | 79 | |
|
79 | 80 | ## prefix middleware for RhodeCode. |
|
80 | 81 | ## recommended when using proxy setup. |
|
81 | 82 | ## allows to set RhodeCode under a prefix in server. |
|
82 | 83 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
83 | 84 | ## And set your prefix like: `prefix = /custom_prefix` |
|
84 | 85 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
85 | 86 | ## to make your cookies only work on prefix url |
|
86 | 87 | [filter:proxy-prefix] |
|
87 | 88 | use = egg:PasteDeploy#prefix |
|
88 | 89 | prefix = / |
|
89 | 90 | |
|
90 | 91 | [app:main] |
|
91 | 92 | ## The %(here)s variable will be replaced with the absolute path of parent directory |
|
92 | 93 | ## of this file |
|
93 | 94 | ## In addition ENVIRONMENT variables usage is possible, e.g |
|
94 | 95 | ## sqlalchemy.db1.url = {ENV_RC_DB_URL} |
|
95 | 96 | |
|
96 | 97 | use = egg:rhodecode-enterprise-ce |
|
97 | 98 | |
|
98 | 99 | ## enable proxy prefix middleware, defined above |
|
99 | 100 | #filter-with = proxy-prefix |
|
100 | 101 | |
|
101 | 102 | ## encryption key used to encrypt social plugin tokens, |
|
102 | 103 | ## remote_urls with credentials etc, if not set it defaults to |
|
103 | 104 | ## `beaker.session.secret` |
|
104 | 105 | #rhodecode.encrypted_values.secret = |
|
105 | 106 | |
|
106 | 107 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
107 | 108 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
108 | 109 | #rhodecode.encrypted_values.strict = false |
|
109 | 110 | |
|
110 | 111 | ## return gzipped responses from Rhodecode (static files/application) |
|
111 | 112 | gzip_responses = false |
|
112 | 113 | |
|
113 | 114 | ## autogenerate javascript routes file on startup |
|
114 | 115 | generate_js_files = false |
|
115 | 116 | |
|
116 | 117 | ## System global default language. |
|
117 | 118 | ## All available languages: en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
118 | 119 | lang = en |
|
119 | 120 | |
|
120 | 121 | ## Perform a full repository scan and import on each server start. |
|
121 | 122 | ## Settings this to true could lead to very long startup time. |
|
122 | 123 | startup.import_repos = false |
|
123 | 124 | |
|
124 | 125 | ## Uncomment and set this path to use archive download cache. |
|
125 | 126 | ## Once enabled, generated archives will be cached at this location |
|
126 | 127 | ## and served from the cache during subsequent requests for the same archive of |
|
127 | 128 | ## the repository. |
|
128 | 129 | #archive_cache_dir = /tmp/tarballcache |
|
129 | 130 | |
|
130 | 131 | ## URL at which the application is running. This is used for bootstraping |
|
131 | 132 | ## requests in context when no web request is available. Used in ishell, or |
|
132 | 133 | ## SSH calls. Set this for events to receive proper url for SSH calls. |
|
133 | 134 | app.base_url = http://rhodecode.local |
|
134 | 135 | |
|
135 | 136 | ## Unique application ID. Should be a random unique string for security. |
|
136 | 137 | app_instance_uuid = rc-production |
|
137 | 138 | |
|
138 | 139 | ## Cut off limit for large diffs (size in bytes). If overall diff size on |
|
139 | 140 | ## commit, or pull request exceeds this limit this diff will be displayed |
|
140 | 141 | ## partially. E.g 512000 == 512Kb |
|
141 | 142 | cut_off_limit_diff = 512000 |
|
142 | 143 | |
|
143 | 144 | ## Cut off limit for large files inside diffs (size in bytes). Each individual |
|
144 | 145 | ## file inside diff which exceeds this limit will be displayed partially. |
|
145 | 146 | ## E.g 128000 == 128Kb |
|
146 | 147 | cut_off_limit_file = 128000 |
|
147 | 148 | |
|
148 | 149 | ## use cached version of vcs repositories everywhere. Recommended to be `true` |
|
149 | 150 | vcs_full_cache = true |
|
150 | 151 | |
|
151 | 152 | ## Force https in RhodeCode, fixes https redirects, assumes it's always https. |
|
152 | 153 | ## Normally this is controlled by proper http flags sent from http server |
|
153 | 154 | force_https = false |
|
154 | 155 | |
|
155 | 156 | ## use Strict-Transport-Security headers |
|
156 | 157 | use_htsts = false |
|
157 | 158 | |
|
158 | 159 | ## git rev filter option, --all is the default filter, if you need to |
|
159 | 160 | ## hide all refs in changelog switch this to --branches --tags |
|
160 | 161 | git_rev_filter = --branches --tags |
|
161 | 162 | |
|
162 | 163 | # Set to true if your repos are exposed using the dumb protocol |
|
163 | 164 | git_update_server_info = false |
|
164 | 165 | |
|
165 | 166 | ## RSS/ATOM feed options |
|
166 | 167 | rss_cut_off_limit = 256000 |
|
167 | 168 | rss_items_per_page = 10 |
|
168 | 169 | rss_include_diff = false |
|
169 | 170 | |
|
170 | 171 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
171 | 172 | ## url that does rewrites to _admin/gists/{gistid}. |
|
172 | 173 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
173 | 174 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
174 | 175 | gist_alias_url = |
|
175 | 176 | |
|
176 | 177 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
177 | 178 | ## used for access. |
|
178 | 179 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
179 | 180 | ## came from the the logged in user who own this authentication token. |
|
180 | 181 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific |
|
181 | 182 | ## authentication token. Such view would be only accessible when used together |
|
182 | 183 | ## with this authentication token |
|
183 | 184 | ## |
|
184 | 185 | ## list of all views can be found under `/_admin/permissions/auth_token_access` |
|
185 | 186 | ## The list should be "," separated and on a single line. |
|
186 | 187 | ## |
|
187 | 188 | ## Most common views to enable: |
|
188 | 189 | # RepoCommitsView:repo_commit_download |
|
189 | 190 | # RepoCommitsView:repo_commit_patch |
|
190 | 191 | # RepoCommitsView:repo_commit_raw |
|
191 | 192 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
192 | 193 | # RepoFilesView:repo_files_diff |
|
193 | 194 | # RepoFilesView:repo_archivefile |
|
194 | 195 | # RepoFilesView:repo_file_raw |
|
195 | 196 | # GistView:* |
|
196 | 197 | api_access_controllers_whitelist = |
|
197 | 198 | |
|
198 | 199 | ## Default encoding used to convert from and to unicode |
|
199 | 200 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
200 | 201 | default_encoding = UTF-8 |
|
201 | 202 | |
|
202 | 203 | ## instance-id prefix |
|
203 | 204 | ## a prefix key for this instance used for cache invalidation when running |
|
204 | 205 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
205 | 206 | ## all running rhodecode instances. Leave empty if you don't use it |
|
206 | 207 | instance_id = |
|
207 | 208 | |
|
208 | 209 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
209 | 210 | ## of an authentication plugin also if it is disabled by it's settings. |
|
210 | 211 | ## This could be useful if you are unable to log in to the system due to broken |
|
211 | 212 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
212 | 213 | ## module to log in again and fix the settings. |
|
213 | 214 | ## |
|
214 | 215 | ## Available builtin plugin IDs (hash is part of the ID): |
|
215 | 216 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
216 | 217 | ## egg:rhodecode-enterprise-ce#pam |
|
217 | 218 | ## egg:rhodecode-enterprise-ce#ldap |
|
218 | 219 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
219 | 220 | ## egg:rhodecode-enterprise-ce#headers |
|
220 | 221 | ## egg:rhodecode-enterprise-ce#crowd |
|
221 | 222 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
222 | 223 | |
|
223 | 224 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
224 | 225 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
225 | 226 | ## handling that causing a series of failed authentication calls. |
|
226 | 227 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
227 | 228 | ## This will be served instead of default 401 on bad authnetication |
|
228 | 229 | auth_ret_code = |
|
229 | 230 | |
|
230 | 231 | ## use special detection method when serving auth_ret_code, instead of serving |
|
231 | 232 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
232 | 233 | ## and then serve auth_ret_code to clients |
|
233 | 234 | auth_ret_code_detection = false |
|
234 | 235 | |
|
235 | 236 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
236 | 237 | ## codes don't break the transactions while 4XX codes do |
|
237 | 238 | lock_ret_code = 423 |
|
238 | 239 | |
|
239 | 240 | ## allows to change the repository location in settings page |
|
240 | 241 | allow_repo_location_change = true |
|
241 | 242 | |
|
242 | 243 | ## allows to setup custom hooks in settings page |
|
243 | 244 | allow_custom_hooks_settings = true |
|
244 | 245 | |
|
245 | 246 | ## Generated license token required for EE edition license. |
|
246 | 247 | ## New generated token value can be found in Admin > settings > license page. |
|
247 | 248 | license_token = |
|
248 | 249 | |
|
249 | 250 | ## supervisor connection uri, for managing supervisor and logs. |
|
250 | 251 | supervisor.uri = |
|
251 | 252 | ## supervisord group name/id we only want this RC instance to handle |
|
252 | 253 | supervisor.group_id = prod |
|
253 | 254 | |
|
254 | 255 | ## Display extended labs settings |
|
255 | 256 | labs_settings_active = true |
|
256 | 257 | |
|
257 | 258 | ## Custom exception store path, defaults to TMPDIR |
|
258 | 259 | ## This is used to store exception from RhodeCode in shared directory |
|
259 | 260 | #exception_tracker.store_path = |
|
260 | 261 | |
|
261 | 262 | |
|
262 | 263 | #################################### |
|
263 | 264 | ### CELERY CONFIG #### |
|
264 | 265 | #################################### |
|
265 | 266 | ## run: /path/to/celery worker \ |
|
266 | 267 | ## -E --beat --app rhodecode.lib.celerylib.loader \ |
|
267 | 268 | ## --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler \ |
|
268 | 269 | ## --loglevel DEBUG --ini /path/to/rhodecode.ini |
|
269 | 270 | |
|
270 | 271 | use_celery = false |
|
271 | 272 | |
|
272 | 273 | ## connection url to the message broker (default rabbitmq) |
|
273 | 274 | celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost |
|
274 | 275 | |
|
275 | 276 | ## maximum tasks to execute before worker restart |
|
276 | 277 | celery.max_tasks_per_child = 100 |
|
277 | 278 | |
|
278 | 279 | ## tasks will never be sent to the queue, but executed locally instead. |
|
279 | 280 | celery.task_always_eager = false |
|
280 | 281 | |
|
281 | 282 | ##################################### |
|
282 | 283 | ### DOGPILE CACHE #### |
|
283 | 284 | ##################################### |
|
284 | 285 | ## Default cache dir for caches. Putting this into a ramdisk |
|
285 | 286 | ## can boost performance, eg. /tmpfs/data_ramdisk, however this directory might require |
|
286 | 287 | ## large amount of space |
|
287 | 288 | cache_dir = %(here)s/data |
|
288 | 289 | |
|
289 | 290 | ## `cache_perms` cache settings for permission tree, auth TTL. |
|
290 | 291 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
291 | 292 | rc_cache.cache_perms.expiration_time = 300 |
|
292 | 293 | |
|
293 | 294 | ## alternative `cache_perms` redis backend with distributed lock |
|
294 | 295 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis |
|
295 | 296 | #rc_cache.cache_perms.expiration_time = 300 |
|
296 | 297 | ## redis_expiration_time needs to be greater then expiration_time |
|
297 | 298 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 |
|
298 | 299 | #rc_cache.cache_perms.arguments.socket_timeout = 30 |
|
299 | 300 | #rc_cache.cache_perms.arguments.host = localhost |
|
300 | 301 | #rc_cache.cache_perms.arguments.port = 6379 |
|
301 | 302 | #rc_cache.cache_perms.arguments.db = 0 |
|
302 | 303 | #rc_cache.cache_perms.arguments.distributed_lock = true |
|
303 | 304 | |
|
304 | 305 | ## `cache_repo` cache settings for FileTree, Readme, RSS FEEDS |
|
305 | 306 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
306 | 307 | rc_cache.cache_repo.expiration_time = 2592000 |
|
307 | 308 | |
|
308 | 309 | ## alternative `cache_repo` redis backend with distributed lock |
|
309 | 310 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis |
|
310 | 311 | #rc_cache.cache_repo.expiration_time = 2592000 |
|
311 | 312 | ## redis_expiration_time needs to be greater then expiration_time |
|
312 | 313 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 |
|
313 | 314 | #rc_cache.cache_repo.arguments.socket_timeout = 30 |
|
314 | 315 | #rc_cache.cache_repo.arguments.host = localhost |
|
315 | 316 | #rc_cache.cache_repo.arguments.port = 6379 |
|
316 | 317 | #rc_cache.cache_repo.arguments.db = 1 |
|
317 | 318 | #rc_cache.cache_repo.arguments.distributed_lock = true |
|
318 | 319 | |
|
319 | 320 | ## cache settings for SQL queries, this needs to use memory type backend |
|
320 | 321 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru |
|
321 | 322 | rc_cache.sql_cache_short.expiration_time = 30 |
|
322 | 323 | |
|
323 | 324 | ## `cache_repo_longterm` cache for repo object instances, this needs to use memory |
|
324 | 325 | ## type backend as the objects kept are not pickle serializable |
|
325 | 326 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru |
|
326 | 327 | ## by default we use 96H, this is using invalidation on push anyway |
|
327 | 328 | rc_cache.cache_repo_longterm.expiration_time = 345600 |
|
328 | 329 | ## max items in LRU cache, reduce this number to save memory, and expire last used |
|
329 | 330 | ## cached objects |
|
330 | 331 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
331 | 332 | |
|
332 | 333 | |
|
333 | 334 | #################################### |
|
334 | 335 | ### BEAKER SESSION #### |
|
335 | 336 | #################################### |
|
336 | 337 | |
|
337 | 338 | ## .session.type is type of storage options for the session, current allowed |
|
338 | 339 | ## types are file, ext:memcached, ext:redis, ext:database, and memory (default). |
|
339 | 340 | beaker.session.type = file |
|
340 | 341 | beaker.session.data_dir = %(here)s/data/sessions |
|
341 | 342 | |
|
342 | 343 | ## db based session, fast, and allows easy management over logged in users |
|
343 | 344 | #beaker.session.type = ext:database |
|
344 | 345 | #beaker.session.table_name = db_session |
|
345 | 346 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
346 | 347 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
347 | 348 | #beaker.session.sa.pool_recycle = 3600 |
|
348 | 349 | #beaker.session.sa.echo = false |
|
349 | 350 | |
|
350 | 351 | beaker.session.key = rhodecode |
|
351 | 352 | beaker.session.secret = production-rc-uytcxaz |
|
352 | 353 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
353 | 354 | |
|
354 | 355 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
355 | 356 | ## you must disable beaker.session.secret to use this |
|
356 | 357 | #beaker.session.encrypt_key = key_for_encryption |
|
357 | 358 | #beaker.session.validate_key = validation_key |
|
358 | 359 | |
|
359 | 360 | ## sets session as invalid(also logging out user) if it haven not been |
|
360 | 361 | ## accessed for given amount of time in seconds |
|
361 | 362 | beaker.session.timeout = 2592000 |
|
362 | 363 | beaker.session.httponly = true |
|
363 | 364 | ## Path to use for the cookie. Set to prefix if you use prefix middleware |
|
364 | 365 | #beaker.session.cookie_path = /custom_prefix |
|
365 | 366 | |
|
366 | 367 | ## uncomment for https secure cookie |
|
367 | 368 | beaker.session.secure = false |
|
368 | 369 | |
|
369 | 370 | ## auto save the session to not to use .save() |
|
370 | 371 | beaker.session.auto = false |
|
371 | 372 | |
|
372 | 373 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
373 | 374 | ## at browser close |
|
374 | 375 | #beaker.session.cookie_expires = 3600 |
|
375 | 376 | |
|
376 | 377 | ################################### |
|
377 | 378 | ## SEARCH INDEXING CONFIGURATION ## |
|
378 | 379 | ################################### |
|
379 | 380 | ## Full text search indexer is available in rhodecode-tools under |
|
380 | 381 | ## `rhodecode-tools index` command |
|
381 | 382 | |
|
382 | 383 | ## WHOOSH Backend, doesn't require additional services to run |
|
383 | 384 | ## it works good with few dozen repos |
|
384 | 385 | search.module = rhodecode.lib.index.whoosh |
|
385 | 386 | search.location = %(here)s/data/index |
|
386 | 387 | |
|
387 | 388 | ######################################## |
|
388 | 389 | ### CHANNELSTREAM CONFIG #### |
|
389 | 390 | ######################################## |
|
390 | 391 | ## channelstream enables persistent connections and live notification |
|
391 | 392 | ## in the system. It's also used by the chat system |
|
393 | ||
|
392 | 394 | channelstream.enabled = false |
|
393 | 395 | |
|
394 | 396 | ## server address for channelstream server on the backend |
|
395 | 397 | channelstream.server = 127.0.0.1:9800 |
|
396 | 398 | |
|
397 | 399 | ## location of the channelstream server from outside world |
|
398 | 400 | ## use ws:// for http or wss:// for https. This address needs to be handled |
|
399 | 401 | ## by external HTTP server such as Nginx or Apache |
|
400 | 402 | ## see nginx/apache configuration examples in our docs |
|
401 | 403 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
402 | 404 | channelstream.secret = secret |
|
403 | 405 | channelstream.history.location = %(here)s/channelstream_history |
|
404 | 406 | |
|
405 | 407 | ## Internal application path that Javascript uses to connect into. |
|
406 | 408 | ## If you use proxy-prefix the prefix should be added before /_channelstream |
|
407 | 409 | channelstream.proxy_path = /_channelstream |
|
408 | 410 | |
|
409 | 411 | |
|
410 | 412 | ################################### |
|
411 | 413 | ## APPENLIGHT CONFIG ## |
|
412 | 414 | ################################### |
|
413 | 415 | |
|
414 | 416 | ## Appenlight is tailored to work with RhodeCode, see |
|
415 | 417 | ## http://appenlight.com for details how to obtain an account |
|
416 | 418 | |
|
417 | 419 | ## appenlight integration enabled |
|
418 | 420 | appenlight = false |
|
419 | 421 | |
|
420 | 422 | appenlight.server_url = https://api.appenlight.com |
|
421 | 423 | appenlight.api_key = YOUR_API_KEY |
|
422 | 424 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
423 | 425 | |
|
424 | 426 | # used for JS client |
|
425 | 427 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
426 | 428 | |
|
427 | 429 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
428 | 430 | |
|
429 | 431 | ## enables 404 error logging (default False) |
|
430 | 432 | appenlight.report_404 = false |
|
431 | 433 | |
|
432 | 434 | ## time in seconds after request is considered being slow (default 1) |
|
433 | 435 | appenlight.slow_request_time = 1 |
|
434 | 436 | |
|
435 | 437 | ## record slow requests in application |
|
436 | 438 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
437 | 439 | appenlight.slow_requests = true |
|
438 | 440 | |
|
439 | 441 | ## enable hooking to application loggers |
|
440 | 442 | appenlight.logging = true |
|
441 | 443 | |
|
442 | 444 | ## minimum log level for log capture |
|
443 | 445 | appenlight.logging.level = WARNING |
|
444 | 446 | |
|
445 | 447 | ## send logs only from erroneous/slow requests |
|
446 | 448 | ## (saves API quota for intensive logging) |
|
447 | 449 | appenlight.logging_on_error = false |
|
448 | 450 | |
|
449 | 451 | ## list of additonal keywords that should be grabbed from environ object |
|
450 | 452 | ## can be string with comma separated list of words in lowercase |
|
451 | 453 | ## (by default client will always send following info: |
|
452 | 454 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
453 | 455 | ## start with HTTP* this list be extended with additional keywords here |
|
454 | 456 | appenlight.environ_keys_whitelist = |
|
455 | 457 | |
|
456 | 458 | ## list of keywords that should be blanked from request object |
|
457 | 459 | ## can be string with comma separated list of words in lowercase |
|
458 | 460 | ## (by default client will always blank keys that contain following words |
|
459 | 461 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
460 | 462 | ## this list be extended with additional keywords set here |
|
461 | 463 | appenlight.request_keys_blacklist = |
|
462 | 464 | |
|
463 | 465 | ## list of namespaces that should be ignores when gathering log entries |
|
464 | 466 | ## can be string with comma separated list of namespaces |
|
465 | 467 | ## (by default the client ignores own entries: appenlight_client.client) |
|
466 | 468 | appenlight.log_namespace_blacklist = |
|
467 | 469 | |
|
468 | 470 | |
|
469 | ################################################################################ | |
|
470 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
|
471 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
|
472 | ## execute malicious code after an exception is raised. ## | |
|
473 | ################################################################################ | |
|
474 | set debug = false | |
|
475 | ||
|
476 | ||
|
477 | 471 | ########################################### |
|
478 | 472 | ### MAIN RHODECODE DATABASE CONFIG ### |
|
479 | 473 | ########################################### |
|
480 | 474 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
481 | 475 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
482 | 476 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 |
|
483 | 477 | # pymysql is an alternative driver for MySQL, use in case of problems with default one |
|
484 | 478 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode |
|
485 | 479 | |
|
486 | 480 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
487 | 481 | |
|
488 | 482 | # see sqlalchemy docs for other advanced settings |
|
489 | 483 | |
|
490 | 484 | ## print the sql statements to output |
|
491 | 485 | sqlalchemy.db1.echo = false |
|
492 | 486 | ## recycle the connections after this amount of seconds |
|
493 | 487 | sqlalchemy.db1.pool_recycle = 3600 |
|
494 | 488 | sqlalchemy.db1.convert_unicode = true |
|
495 | 489 | |
|
496 | 490 | ## the number of connections to keep open inside the connection pool. |
|
497 | 491 | ## 0 indicates no limit |
|
498 | 492 | #sqlalchemy.db1.pool_size = 5 |
|
499 | 493 | |
|
500 | 494 | ## the number of connections to allow in connection pool "overflow", that is |
|
501 | 495 | ## connections that can be opened above and beyond the pool_size setting, |
|
502 | 496 | ## which defaults to five. |
|
503 | 497 | #sqlalchemy.db1.max_overflow = 10 |
|
504 | 498 | |
|
505 | 499 | ## Connection check ping, used to detect broken database connections |
|
506 | 500 | ## could be enabled to better handle cases if MySQL has gone away errors |
|
507 | 501 | #sqlalchemy.db1.ping_connection = true |
|
508 | 502 | |
|
509 | 503 | ################## |
|
510 | 504 | ### VCS CONFIG ### |
|
511 | 505 | ################## |
|
512 | 506 | vcs.server.enable = true |
|
513 | 507 | vcs.server = localhost:9900 |
|
514 | 508 | |
|
515 | 509 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
516 | 510 | ## Available protocols are: |
|
517 | 511 | ## `http` - use http-rpc backend (default) |
|
518 | 512 | vcs.server.protocol = http |
|
519 | 513 | |
|
520 | 514 | ## Push/Pull operations protocol, available options are: |
|
521 | 515 | ## `http` - use http-rpc backend (default) |
|
522 | 516 | vcs.scm_app_implementation = http |
|
523 | 517 | |
|
524 | 518 | ## Push/Pull operations hooks protocol, available options are: |
|
525 | 519 | ## `http` - use http-rpc backend (default) |
|
526 | 520 | vcs.hooks.protocol = http |
|
521 | ||
|
527 | 522 | ## Host on which this instance is listening for hooks. If vcsserver is in other location |
|
528 | 523 | ## this should be adjusted. |
|
529 | 524 | vcs.hooks.host = 127.0.0.1 |
|
530 | 525 | |
|
531 | 526 | vcs.server.log_level = info |
|
532 | 527 | ## Start VCSServer with this instance as a subprocess, useful for development |
|
533 | 528 | vcs.start_server = false |
|
534 | 529 | |
|
535 | 530 | ## List of enabled VCS backends, available options are: |
|
536 | 531 | ## `hg` - mercurial |
|
537 | 532 | ## `git` - git |
|
538 | 533 | ## `svn` - subversion |
|
539 | 534 | vcs.backends = hg, git, svn |
|
540 | 535 | |
|
541 | 536 | vcs.connection_timeout = 3600 |
|
542 | 537 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
543 | 538 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
544 | 539 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
545 | 540 | |
|
546 | 541 | |
|
547 | 542 | ############################################################ |
|
548 | 543 | ### Subversion proxy support (mod_dav_svn) ### |
|
549 | 544 | ### Maps RhodeCode repo groups into SVN paths for Apache ### |
|
550 | 545 | ############################################################ |
|
551 | 546 | ## Enable or disable the config file generation. |
|
552 | 547 | svn.proxy.generate_config = false |
|
553 | 548 | ## Generate config file with `SVNListParentPath` set to `On`. |
|
554 | 549 | svn.proxy.list_parent_path = true |
|
555 | 550 | ## Set location and file name of generated config file. |
|
556 | 551 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf |
|
557 | 552 | ## alternative mod_dav config template. This needs to be a mako template |
|
558 | 553 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako |
|
559 | 554 | ## Used as a prefix to the `Location` block in the generated config file. |
|
560 | 555 | ## In most cases it should be set to `/`. |
|
561 | 556 | svn.proxy.location_root = / |
|
562 | 557 | ## Command to reload the mod dav svn configuration on change. |
|
563 | 558 | ## Example: `/etc/init.d/apache2 reload` |
|
564 | 559 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
565 | 560 | ## If the timeout expires before the reload command finishes, the command will |
|
566 | 561 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
567 | 562 | #svn.proxy.reload_timeout = 10 |
|
568 | 563 | |
|
569 | 564 | ############################################################ |
|
570 | 565 | ### SSH Support Settings ### |
|
571 | 566 | ############################################################ |
|
572 | 567 | |
|
573 | 568 | ## Defines if a custom authorized_keys file should be created and written on |
|
574 | 569 | ## any change user ssh keys. Setting this to false also disables posibility |
|
575 | 570 | ## of adding SSH keys by users from web interface. Super admins can still |
|
576 | 571 | ## manage SSH Keys. |
|
577 | 572 | ssh.generate_authorized_keyfile = false |
|
578 | 573 | |
|
579 | 574 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
580 | 575 | # ssh.authorized_keys_ssh_opts = |
|
581 | 576 | |
|
582 | 577 | ## Path to the authrozied_keys file where the generate entries are placed. |
|
583 | 578 | ## It is possible to have multiple key files specified in `sshd_config` e.g. |
|
584 | 579 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
585 | 580 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode |
|
586 | 581 | |
|
587 | 582 | ## Command to execute the SSH wrapper. The binary is available in the |
|
588 | 583 | ## rhodecode installation directory. |
|
589 | 584 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper |
|
590 | 585 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper |
|
591 | 586 | |
|
592 | 587 | ## Allow shell when executing the ssh-wrapper command |
|
593 | 588 | ssh.wrapper_cmd_allow_shell = false |
|
594 | 589 | |
|
595 | 590 | ## Enables logging, and detailed output send back to the client during SSH |
|
596 | 591 | ## operations. Usefull for debugging, shouldn't be used in production. |
|
597 | 592 | ssh.enable_debug_logging = false |
|
598 | 593 | |
|
599 | 594 | ## Paths to binary executable, by default they are the names, but we can |
|
600 | 595 | ## override them if we want to use a custom one |
|
601 | 596 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg |
|
602 | 597 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git |
|
603 | 598 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve |
|
604 | 599 | |
|
605 | 600 | |
|
606 | 601 | ## Dummy marker to add new entries after. |
|
607 | 602 | ## Add any custom entries below. Please don't remove. |
|
608 | 603 | custom.conf = 1 |
|
609 | 604 | |
|
610 | 605 | |
|
611 | 606 | ################################ |
|
612 | 607 | ### LOGGING CONFIGURATION #### |
|
613 | 608 | ################################ |
|
614 | 609 | [loggers] |
|
615 | 610 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper |
|
616 | 611 | |
|
617 | 612 | [handlers] |
|
618 | 613 | keys = console, console_sql |
|
619 | 614 | |
|
620 | 615 | [formatters] |
|
621 | 616 | keys = generic, color_formatter, color_formatter_sql |
|
622 | 617 | |
|
623 | 618 | ############# |
|
624 | 619 | ## LOGGERS ## |
|
625 | 620 | ############# |
|
626 | 621 | [logger_root] |
|
627 | 622 | level = NOTSET |
|
628 | 623 | handlers = console |
|
629 | 624 | |
|
630 | 625 | [logger_sqlalchemy] |
|
631 | 626 | level = INFO |
|
632 | 627 | handlers = console_sql |
|
633 | 628 | qualname = sqlalchemy.engine |
|
634 | 629 | propagate = 0 |
|
635 | 630 | |
|
636 | 631 | [logger_beaker] |
|
637 | 632 | level = DEBUG |
|
638 | 633 | handlers = |
|
639 | 634 | qualname = beaker.container |
|
640 | 635 | propagate = 1 |
|
641 | 636 | |
|
642 | 637 | [logger_rhodecode] |
|
643 | 638 | level = DEBUG |
|
644 | 639 | handlers = |
|
645 | 640 | qualname = rhodecode |
|
646 | 641 | propagate = 1 |
|
647 | 642 | |
|
648 | 643 | [logger_ssh_wrapper] |
|
649 | 644 | level = DEBUG |
|
650 | 645 | handlers = |
|
651 | 646 | qualname = ssh_wrapper |
|
652 | 647 | propagate = 1 |
|
653 | 648 | |
|
654 | 649 | [logger_celery] |
|
655 | 650 | level = DEBUG |
|
656 | 651 | handlers = |
|
657 | 652 | qualname = celery |
|
658 | 653 | |
|
659 | 654 | |
|
660 | 655 | ############## |
|
661 | 656 | ## HANDLERS ## |
|
662 | 657 | ############## |
|
663 | 658 | |
|
664 | 659 | [handler_console] |
|
665 | 660 | class = StreamHandler |
|
666 | 661 | args = (sys.stderr, ) |
|
667 | 662 | level = INFO |
|
668 | 663 | formatter = generic |
|
669 | 664 | |
|
670 | 665 | [handler_console_sql] |
|
671 | 666 | # "level = DEBUG" logs SQL queries and results. |
|
672 | 667 | # "level = INFO" logs SQL queries. |
|
673 | 668 | # "level = WARN" logs neither. (Recommended for production systems.) |
|
674 | 669 | class = StreamHandler |
|
675 | 670 | args = (sys.stderr, ) |
|
676 | 671 | level = WARN |
|
677 | 672 | formatter = generic |
|
678 | 673 | |
|
679 | 674 | ################ |
|
680 | 675 | ## FORMATTERS ## |
|
681 | 676 | ################ |
|
682 | 677 | |
|
683 | 678 | [formatter_generic] |
|
684 | 679 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
685 | 680 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
686 | 681 | datefmt = %Y-%m-%d %H:%M:%S |
|
687 | 682 | |
|
688 | 683 | [formatter_color_formatter] |
|
689 | 684 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
690 | 685 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
691 | 686 | datefmt = %Y-%m-%d %H:%M:%S |
|
692 | 687 | |
|
693 | 688 | [formatter_color_formatter_sql] |
|
694 | 689 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
695 | 690 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
696 | 691 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,112 +1,148 b'' | |||
|
1 | 1 | .. _debug-mode: |
|
2 | 2 | |
|
3 | 3 | Enabling Debug Mode |
|
4 | 4 | ------------------- |
|
5 | 5 | |
|
6 | Debug Mode will enable debug logging, and request tracking middleware. Debug Mode | |
|
7 | enabled DEBUG log-level which allows tracking various information about authentication | |
|
8 | failures, LDAP connection, email etc. | |
|
9 | ||
|
10 | The request tracking will add a special | |
|
11 | unique ID: `| req_id:00000000-0000-0000-0000-000000000000` at the end of each log line. | |
|
12 | The req_id is the same for each individual requests, it means that if you want to | |
|
13 | track particular user logs only, and exclude other concurrent ones | |
|
14 | simply grep by `req_id` uuid which you'll have to find for the individual request. | |
|
15 | ||
|
6 | 16 | To enable debug mode on a |RCE| instance you need to set the debug property |
|
7 | 17 | in the :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. To |
|
8 | 18 | do this, use the following steps |
|
9 | 19 | |
|
10 | 20 | 1. Open the file and set the ``debug`` line to ``true`` |
|
11 | 21 | 2. Restart you instance using the ``rccontrol restart`` command, |
|
12 | 22 | see the following example: |
|
13 | 23 | |
|
14 | You can also set the log level, the follow are the valid options; | |
|
15 | ``debug``, ``info``, ``warning``, or ``fatal``. | |
|
16 | ||
|
17 | 24 | .. code-block:: ini |
|
18 | 25 | |
|
19 | 26 | [DEFAULT] |
|
20 | 27 | debug = true |
|
21 | pdebug = false | |
|
22 | 28 | |
|
23 | 29 | .. code-block:: bash |
|
24 | 30 | |
|
25 | 31 | # Restart your instance |
|
26 | 32 | $ rccontrol restart enterprise-1 |
|
27 | 33 | Instance "enterprise-1" successfully stopped. |
|
28 | 34 | Instance "enterprise-1" successfully started. |
|
29 | 35 | |
|
36 | ||
|
30 | 37 | Debug and Logging Configuration |
|
31 | 38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
32 | 39 | |
|
33 | 40 | Further debugging and logging settings can also be set in the |
|
34 | 41 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. |
|
35 | 42 | |
|
36 | 43 | In the logging section, the various packages that run with |RCE| can have |
|
37 | 44 | different debug levels set. If you want to increase the logging level change |
|
38 | 45 | ``level = DEBUG`` line to one of the valid options. |
|
39 | 46 | |
|
40 | 47 | You also need to change the log level for handlers. See the example |
|
41 | 48 | ``##handler`` section below. The ``handler`` level takes the same options as |
|
42 | 49 | the ``debug`` level. |
|
43 | 50 | |
|
44 | 51 | .. code-block:: ini |
|
45 | 52 | |
|
46 | 53 | ################################ |
|
47 | 54 | ### LOGGING CONFIGURATION #### |
|
48 | 55 | ################################ |
|
49 | 56 | [loggers] |
|
50 | keys = root, sqlalchemy, rhodecode, ssh_wrapper | |
|
57 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper | |
|
51 | 58 | |
|
52 | 59 | [handlers] |
|
53 | 60 | keys = console, console_sql, file, file_rotating |
|
54 | 61 | |
|
55 | 62 | [formatters] |
|
56 | 63 | keys = generic, color_formatter, color_formatter_sql |
|
57 | 64 | |
|
58 | 65 | ############# |
|
59 | 66 | ## LOGGERS ## |
|
60 | 67 | ############# |
|
61 | 68 | [logger_root] |
|
62 | 69 | level = NOTSET |
|
63 | 70 | handlers = console |
|
64 | 71 | |
|
65 |
[logger_ |
|
|
72 | [logger_sqlalchemy] | |
|
73 | level = INFO | |
|
74 | handlers = console_sql | |
|
75 | qualname = sqlalchemy.engine | |
|
76 | propagate = 0 | |
|
77 | ||
|
78 | [logger_beaker] | |
|
66 | 79 | level = DEBUG |
|
67 | 80 | handlers = |
|
68 |
qualname = |
|
|
69 | ## "level = DEBUG" logs the route matched and routing variables. | |
|
81 | qualname = beaker.container | |
|
70 | 82 | propagate = 1 |
|
71 | 83 | |
|
72 | 84 | [logger_rhodecode] |
|
73 | 85 | level = DEBUG |
|
74 | 86 | handlers = |
|
75 | 87 | qualname = rhodecode |
|
76 | 88 | propagate = 1 |
|
77 | 89 | |
|
78 |
[logger_s |
|
|
79 |
level = |
|
|
80 |
handlers = |
|
|
81 |
qualname = s |
|
|
82 |
propagate = |
|
|
90 | [logger_ssh_wrapper] | |
|
91 | level = DEBUG | |
|
92 | handlers = | |
|
93 | qualname = ssh_wrapper | |
|
94 | propagate = 1 | |
|
95 | ||
|
96 | [logger_celery] | |
|
97 | level = DEBUG | |
|
98 | handlers = | |
|
99 | qualname = celery | |
|
83 | 100 | |
|
84 | 101 | ############## |
|
85 | 102 | ## HANDLERS ## |
|
86 | 103 | ############## |
|
87 | 104 | |
|
88 | 105 | [handler_console] |
|
89 | 106 | class = StreamHandler |
|
90 | args = (sys.stderr,) | |
|
91 |
level = |
|
|
107 | args = (sys.stderr, ) | |
|
108 | level = DEBUG | |
|
92 | 109 | formatter = generic |
|
93 | 110 | |
|
94 | 111 | [handler_console_sql] |
|
95 | 112 | class = StreamHandler |
|
96 | args = (sys.stderr,) | |
|
97 |
level = |
|
|
113 | args = (sys.stderr, ) | |
|
114 | level = INFO | |
|
98 | 115 | formatter = generic |
|
99 | 116 | |
|
100 | 117 | [handler_file] |
|
101 | 118 | class = FileHandler |
|
102 | args = ('rhodecode.log', 'a',) | |
|
119 | args = ('rhodecode_debug.log', 'a',) | |
|
103 | 120 | level = INFO |
|
104 | 121 | formatter = generic |
|
105 | 122 | |
|
106 | 123 | [handler_file_rotating] |
|
107 | 124 | class = logging.handlers.TimedRotatingFileHandler |
|
108 | 125 | # 'D', 5 - rotate every 5days |
|
109 | 126 | # you can set 'h', 'midnight' |
|
110 | args = ('rhodecode.log', 'D', 5, 10,) | |
|
127 | args = ('rhodecode_debug_rotated.log', 'D', 5, 10,) | |
|
111 | 128 | level = INFO |
|
112 | 129 | formatter = generic |
|
130 | ||
|
131 | ################ | |
|
132 | ## FORMATTERS ## | |
|
133 | ################ | |
|
134 | ||
|
135 | [formatter_generic] | |
|
136 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
|
137 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
|
138 | datefmt = %Y-%m-%d %H:%M:%S | |
|
139 | ||
|
140 | [formatter_color_formatter] | |
|
141 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
|
142 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
|
143 | datefmt = %Y-%m-%d %H:%M:%S | |
|
144 | ||
|
145 | [formatter_color_formatter_sql] | |
|
146 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
|
147 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
|
148 | datefmt = %Y-%m-%d %H:%M:%S No newline at end of file |
@@ -1,614 +1,727 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2018 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import os |
|
22 | 22 | import sys |
|
23 | 23 | import logging |
|
24 | 24 | import collections |
|
25 | 25 | import tempfile |
|
26 | 26 | import time |
|
27 | 27 | |
|
28 | 28 | from paste.gzipper import make_gzip_middleware |
|
29 | 29 | import pyramid.events |
|
30 | 30 | from pyramid.wsgi import wsgiapp |
|
31 | 31 | from pyramid.authorization import ACLAuthorizationPolicy |
|
32 | 32 | from pyramid.config import Configurator |
|
33 | 33 | from pyramid.settings import asbool, aslist |
|
34 | 34 | from pyramid.httpexceptions import ( |
|
35 | 35 | HTTPException, HTTPError, HTTPInternalServerError, HTTPFound, HTTPNotFound) |
|
36 | 36 | from pyramid.renderers import render_to_response |
|
37 | 37 | |
|
38 | 38 | from rhodecode.model import meta |
|
39 | 39 | from rhodecode.config import patches |
|
40 | 40 | from rhodecode.config import utils as config_utils |
|
41 | 41 | from rhodecode.config.environment import load_pyramid_environment |
|
42 | 42 | |
|
43 | 43 | import rhodecode.events |
|
44 | 44 | from rhodecode.lib.middleware.vcs import VCSMiddleware |
|
45 | 45 | from rhodecode.lib.request import Request |
|
46 | 46 | from rhodecode.lib.vcs import VCSCommunicationError |
|
47 | 47 | from rhodecode.lib.exceptions import VCSServerUnavailable |
|
48 | 48 | from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled |
|
49 | 49 | from rhodecode.lib.middleware.https_fixup import HttpsFixup |
|
50 | 50 | from rhodecode.lib.celerylib.loader import configure_celery |
|
51 | 51 | from rhodecode.lib.plugins.utils import register_rhodecode_plugin |
|
52 | 52 | from rhodecode.lib.utils2 import aslist as rhodecode_aslist, AttributeDict |
|
53 | 53 | from rhodecode.lib.exc_tracking import store_exception |
|
54 | 54 | from rhodecode.subscribers import ( |
|
55 | 55 | scan_repositories_if_enabled, write_js_routes_if_enabled, |
|
56 | 56 | write_metadata_if_needed, inject_app_settings) |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | log = logging.getLogger(__name__) |
|
60 | 60 | |
|
61 | 61 | |
|
62 | 62 | def is_http_error(response): |
|
63 | 63 | # error which should have traceback |
|
64 | 64 | return response.status_code > 499 |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | def should_load_all(): |
|
68 | 68 | """ |
|
69 | 69 | Returns if all application components should be loaded. In some cases it's |
|
70 | 70 | desired to skip apps loading for faster shell script execution |
|
71 | 71 | """ |
|
72 | 72 | return True |
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | def make_pyramid_app(global_config, **settings): |
|
76 | 76 | """ |
|
77 | 77 | Constructs the WSGI application based on Pyramid. |
|
78 | 78 | |
|
79 | 79 | Specials: |
|
80 | 80 | |
|
81 | 81 | * The application can also be integrated like a plugin via the call to |
|
82 | 82 | `includeme`. This is accompanied with the other utility functions which |
|
83 | 83 | are called. Changing this should be done with great care to not break |
|
84 | 84 | cases when these fragments are assembled from another place. |
|
85 | 85 | |
|
86 | 86 | """ |
|
87 | 87 | |
|
88 | 88 | # Allows to use format style "{ENV_NAME}" placeholders in the configuration. It |
|
89 | 89 | # will be replaced by the value of the environment variable "NAME" in this case. |
|
90 | 90 | start_time = time.time() |
|
91 | 91 | |
|
92 | debug = asbool(global_config.get('debug')) | |
|
93 | if debug: | |
|
94 | enable_debug() | |
|
95 | ||
|
92 | 96 | environ = {'ENV_{}'.format(key): value for key, value in os.environ.items()} |
|
93 | 97 | |
|
94 | 98 | global_config = _substitute_values(global_config, environ) |
|
95 | 99 | settings = _substitute_values(settings, environ) |
|
96 | 100 | |
|
97 | 101 | sanitize_settings_and_apply_defaults(settings) |
|
98 | 102 | |
|
99 | 103 | config = Configurator(settings=settings) |
|
100 | 104 | |
|
101 | 105 | # Apply compatibility patches |
|
102 | 106 | patches.inspect_getargspec() |
|
103 | 107 | |
|
104 | 108 | load_pyramid_environment(global_config, settings) |
|
105 | 109 | |
|
106 | 110 | # Static file view comes first |
|
107 | 111 | includeme_first(config) |
|
108 | 112 | |
|
109 | 113 | includeme(config) |
|
110 | 114 | |
|
111 | 115 | pyramid_app = config.make_wsgi_app() |
|
112 | 116 | pyramid_app = wrap_app_in_wsgi_middlewares(pyramid_app, config) |
|
113 | 117 | pyramid_app.config = config |
|
114 | 118 | |
|
115 | 119 | config.configure_celery(global_config['__file__']) |
|
116 | 120 | # creating the app uses a connection - return it after we are done |
|
117 | 121 | meta.Session.remove() |
|
118 | 122 | total_time = time.time() - start_time |
|
119 | 123 | log.info('Pyramid app `%s` created and configured in %.2fs', |
|
120 | 124 | pyramid_app.func_name, total_time) |
|
125 | ||
|
121 | 126 | return pyramid_app |
|
122 | 127 | |
|
123 | 128 | |
|
124 | 129 | def not_found_view(request): |
|
125 | 130 | """ |
|
126 | 131 | This creates the view which should be registered as not-found-view to |
|
127 | 132 | pyramid. |
|
128 | 133 | """ |
|
129 | 134 | |
|
130 | 135 | if not getattr(request, 'vcs_call', None): |
|
131 | 136 | # handle like regular case with our error_handler |
|
132 | 137 | return error_handler(HTTPNotFound(), request) |
|
133 | 138 | |
|
134 | 139 | # handle not found view as a vcs call |
|
135 | 140 | settings = request.registry.settings |
|
136 | 141 | ae_client = getattr(request, 'ae_client', None) |
|
137 | 142 | vcs_app = VCSMiddleware( |
|
138 | 143 | HTTPNotFound(), request.registry, settings, |
|
139 | 144 | appenlight_client=ae_client) |
|
140 | 145 | |
|
141 | 146 | return wsgiapp(vcs_app)(None, request) |
|
142 | 147 | |
|
143 | 148 | |
|
144 | 149 | def error_handler(exception, request): |
|
145 | 150 | import rhodecode |
|
146 | 151 | from rhodecode.lib import helpers |
|
147 | 152 | |
|
148 | 153 | rhodecode_title = rhodecode.CONFIG.get('rhodecode_title') or 'RhodeCode' |
|
149 | 154 | |
|
150 | 155 | base_response = HTTPInternalServerError() |
|
151 | 156 | # prefer original exception for the response since it may have headers set |
|
152 | 157 | if isinstance(exception, HTTPException): |
|
153 | 158 | base_response = exception |
|
154 | 159 | elif isinstance(exception, VCSCommunicationError): |
|
155 | 160 | base_response = VCSServerUnavailable() |
|
156 | 161 | |
|
157 | 162 | if is_http_error(base_response): |
|
158 | 163 | log.exception( |
|
159 | 164 | 'error occurred handling this request for path: %s', request.path) |
|
160 | 165 | |
|
161 | 166 | error_explanation = base_response.explanation or str(base_response) |
|
162 | 167 | if base_response.status_code == 404: |
|
163 | 168 | error_explanation += " Or you don't have permission to access it." |
|
164 | 169 | c = AttributeDict() |
|
165 | 170 | c.error_message = base_response.status |
|
166 | 171 | c.error_explanation = error_explanation |
|
167 | 172 | c.visual = AttributeDict() |
|
168 | 173 | |
|
169 | 174 | c.visual.rhodecode_support_url = ( |
|
170 | 175 | request.registry.settings.get('rhodecode_support_url') or |
|
171 | 176 | request.route_url('rhodecode_support') |
|
172 | 177 | ) |
|
173 | 178 | c.redirect_time = 0 |
|
174 | 179 | c.rhodecode_name = rhodecode_title |
|
175 | 180 | if not c.rhodecode_name: |
|
176 | 181 | c.rhodecode_name = 'Rhodecode' |
|
177 | 182 | |
|
178 | 183 | c.causes = [] |
|
179 | 184 | if is_http_error(base_response): |
|
180 | 185 | c.causes.append('Server is overloaded.') |
|
181 | 186 | c.causes.append('Server database connection is lost.') |
|
182 | 187 | c.causes.append('Server expected unhandled error.') |
|
183 | 188 | |
|
184 | 189 | if hasattr(base_response, 'causes'): |
|
185 | 190 | c.causes = base_response.causes |
|
186 | 191 | |
|
187 | 192 | c.messages = helpers.flash.pop_messages(request=request) |
|
188 | 193 | |
|
189 | 194 | exc_info = sys.exc_info() |
|
190 | 195 | c.exception_id = id(exc_info) |
|
191 | 196 | c.show_exception_id = isinstance(base_response, VCSServerUnavailable) \ |
|
192 | 197 | or base_response.status_code > 499 |
|
193 | 198 | c.exception_id_url = request.route_url( |
|
194 | 199 | 'admin_settings_exception_tracker_show', exception_id=c.exception_id) |
|
195 | 200 | |
|
196 | 201 | if c.show_exception_id: |
|
197 | 202 | store_exception(c.exception_id, exc_info) |
|
198 | 203 | |
|
199 | 204 | response = render_to_response( |
|
200 | 205 | '/errors/error_document.mako', {'c': c, 'h': helpers}, request=request, |
|
201 | 206 | response=base_response) |
|
202 | 207 | |
|
203 | 208 | return response |
|
204 | 209 | |
|
205 | 210 | |
|
206 | 211 | def includeme_first(config): |
|
207 | 212 | # redirect automatic browser favicon.ico requests to correct place |
|
208 | 213 | def favicon_redirect(context, request): |
|
209 | 214 | return HTTPFound( |
|
210 | 215 | request.static_path('rhodecode:public/images/favicon.ico')) |
|
211 | 216 | |
|
212 | 217 | config.add_view(favicon_redirect, route_name='favicon') |
|
213 | 218 | config.add_route('favicon', '/favicon.ico') |
|
214 | 219 | |
|
215 | 220 | def robots_redirect(context, request): |
|
216 | 221 | return HTTPFound( |
|
217 | 222 | request.static_path('rhodecode:public/robots.txt')) |
|
218 | 223 | |
|
219 | 224 | config.add_view(robots_redirect, route_name='robots') |
|
220 | 225 | config.add_route('robots', '/robots.txt') |
|
221 | 226 | |
|
222 | 227 | config.add_static_view( |
|
223 | 228 | '_static/deform', 'deform:static') |
|
224 | 229 | config.add_static_view( |
|
225 | 230 | '_static/rhodecode', path='rhodecode:public', cache_max_age=3600 * 24) |
|
226 | 231 | |
|
227 | 232 | |
|
228 | 233 | def includeme(config): |
|
229 | 234 | log.debug('Initializing main includeme from %s', os.path.basename(__file__)) |
|
230 | 235 | settings = config.registry.settings |
|
231 | 236 | config.set_request_factory(Request) |
|
232 | 237 | |
|
233 | 238 | # plugin information |
|
234 | 239 | config.registry.rhodecode_plugins = collections.OrderedDict() |
|
235 | 240 | |
|
236 | 241 | config.add_directive( |
|
237 | 242 | 'register_rhodecode_plugin', register_rhodecode_plugin) |
|
238 | 243 | |
|
239 | 244 | config.add_directive('configure_celery', configure_celery) |
|
240 | 245 | |
|
241 | 246 | if asbool(settings.get('appenlight', 'false')): |
|
242 | 247 | config.include('appenlight_client.ext.pyramid_tween') |
|
243 | 248 | |
|
244 | 249 | load_all = should_load_all() |
|
245 | 250 | |
|
246 | 251 | # Includes which are required. The application would fail without them. |
|
247 | 252 | config.include('pyramid_mako') |
|
248 | 253 | config.include('pyramid_beaker') |
|
249 | 254 | config.include('rhodecode.lib.rc_cache') |
|
250 | 255 | |
|
251 | 256 | config.include('rhodecode.apps._base.navigation') |
|
252 | 257 | config.include('rhodecode.apps._base.subscribers') |
|
253 | 258 | config.include('rhodecode.tweens') |
|
254 | 259 | |
|
255 | 260 | config.include('rhodecode.integrations') |
|
256 | 261 | config.include('rhodecode.authentication') |
|
257 | 262 | |
|
258 | 263 | if load_all: |
|
259 | 264 | from rhodecode.authentication import discover_legacy_plugins |
|
260 | 265 | # load CE authentication plugins |
|
261 | 266 | config.include('rhodecode.authentication.plugins.auth_crowd') |
|
262 | 267 | config.include('rhodecode.authentication.plugins.auth_headers') |
|
263 | 268 | config.include('rhodecode.authentication.plugins.auth_jasig_cas') |
|
264 | 269 | config.include('rhodecode.authentication.plugins.auth_ldap') |
|
265 | 270 | config.include('rhodecode.authentication.plugins.auth_pam') |
|
266 | 271 | config.include('rhodecode.authentication.plugins.auth_rhodecode') |
|
267 | 272 | config.include('rhodecode.authentication.plugins.auth_token') |
|
268 | 273 | |
|
269 | 274 | # Auto discover authentication plugins and include their configuration. |
|
270 | 275 | discover_legacy_plugins(config) |
|
271 | 276 | |
|
272 | 277 | # apps |
|
273 | 278 | config.include('rhodecode.apps._base') |
|
274 | 279 | |
|
275 | 280 | if load_all: |
|
276 | 281 | config.include('rhodecode.apps.ops') |
|
277 | 282 | config.include('rhodecode.apps.admin') |
|
278 | 283 | config.include('rhodecode.apps.channelstream') |
|
279 | 284 | config.include('rhodecode.apps.login') |
|
280 | 285 | config.include('rhodecode.apps.home') |
|
281 | 286 | config.include('rhodecode.apps.journal') |
|
282 | 287 | config.include('rhodecode.apps.repository') |
|
283 | 288 | config.include('rhodecode.apps.repo_group') |
|
284 | 289 | config.include('rhodecode.apps.user_group') |
|
285 | 290 | config.include('rhodecode.apps.search') |
|
286 | 291 | config.include('rhodecode.apps.user_profile') |
|
287 | 292 | config.include('rhodecode.apps.user_group_profile') |
|
288 | 293 | config.include('rhodecode.apps.my_account') |
|
289 | 294 | config.include('rhodecode.apps.svn_support') |
|
290 | 295 | config.include('rhodecode.apps.ssh_support') |
|
291 | 296 | config.include('rhodecode.apps.gist') |
|
292 | 297 | config.include('rhodecode.apps.debug_style') |
|
293 | 298 | config.include('rhodecode.api') |
|
294 | 299 | |
|
295 | 300 | config.add_route('rhodecode_support', 'https://rhodecode.com/help/', static=True) |
|
296 | 301 | config.add_translation_dirs('rhodecode:i18n/') |
|
297 | 302 | settings['default_locale_name'] = settings.get('lang', 'en') |
|
298 | 303 | |
|
299 | 304 | # Add subscribers. |
|
300 | 305 | config.add_subscriber(inject_app_settings, |
|
301 | 306 | pyramid.events.ApplicationCreated) |
|
302 | 307 | config.add_subscriber(scan_repositories_if_enabled, |
|
303 | 308 | pyramid.events.ApplicationCreated) |
|
304 | 309 | config.add_subscriber(write_metadata_if_needed, |
|
305 | 310 | pyramid.events.ApplicationCreated) |
|
306 | 311 | config.add_subscriber(write_js_routes_if_enabled, |
|
307 | 312 | pyramid.events.ApplicationCreated) |
|
308 | 313 | |
|
309 | 314 | # request custom methods |
|
310 | 315 | config.add_request_method( |
|
311 | 316 | 'rhodecode.lib.partial_renderer.get_partial_renderer', |
|
312 | 317 | 'get_partial_renderer') |
|
313 | 318 | |
|
314 | 319 | # Set the authorization policy. |
|
315 | 320 | authz_policy = ACLAuthorizationPolicy() |
|
316 | 321 | config.set_authorization_policy(authz_policy) |
|
317 | 322 | |
|
318 | 323 | # Set the default renderer for HTML templates to mako. |
|
319 | 324 | config.add_mako_renderer('.html') |
|
320 | 325 | |
|
321 | 326 | config.add_renderer( |
|
322 | 327 | name='json_ext', |
|
323 | 328 | factory='rhodecode.lib.ext_json_renderer.pyramid_ext_json') |
|
324 | 329 | |
|
325 | 330 | # include RhodeCode plugins |
|
326 | 331 | includes = aslist(settings.get('rhodecode.includes', [])) |
|
327 | 332 | for inc in includes: |
|
328 | 333 | config.include(inc) |
|
329 | 334 | |
|
330 | 335 | # custom not found view, if our pyramid app doesn't know how to handle |
|
331 | 336 | # the request pass it to potential VCS handling ap |
|
332 | 337 | config.add_notfound_view(not_found_view) |
|
333 | 338 | if not settings.get('debugtoolbar.enabled', False): |
|
334 | 339 | # disabled debugtoolbar handle all exceptions via the error_handlers |
|
335 | 340 | config.add_view(error_handler, context=Exception) |
|
336 | 341 | |
|
337 | 342 | # all errors including 403/404/50X |
|
338 | 343 | config.add_view(error_handler, context=HTTPError) |
|
339 | 344 | |
|
340 | 345 | |
|
341 | 346 | def wrap_app_in_wsgi_middlewares(pyramid_app, config): |
|
342 | 347 | """ |
|
343 | 348 | Apply outer WSGI middlewares around the application. |
|
344 | 349 | """ |
|
345 | 350 | registry = config.registry |
|
346 | 351 | settings = registry.settings |
|
347 | 352 | |
|
348 | 353 | # enable https redirects based on HTTP_X_URL_SCHEME set by proxy |
|
349 | 354 | pyramid_app = HttpsFixup(pyramid_app, settings) |
|
350 | 355 | |
|
351 | 356 | pyramid_app, _ae_client = wrap_in_appenlight_if_enabled( |
|
352 | 357 | pyramid_app, settings) |
|
353 | 358 | registry.ae_client = _ae_client |
|
354 | 359 | |
|
355 | 360 | if settings['gzip_responses']: |
|
356 | 361 | pyramid_app = make_gzip_middleware( |
|
357 | 362 | pyramid_app, settings, compress_level=1) |
|
358 | 363 | |
|
359 | 364 | # this should be the outer most middleware in the wsgi stack since |
|
360 | 365 | # middleware like Routes make database calls |
|
361 | 366 | def pyramid_app_with_cleanup(environ, start_response): |
|
362 | 367 | try: |
|
363 | 368 | return pyramid_app(environ, start_response) |
|
364 | 369 | finally: |
|
365 | 370 | # Dispose current database session and rollback uncommitted |
|
366 | 371 | # transactions. |
|
367 | 372 | meta.Session.remove() |
|
368 | 373 | |
|
369 | 374 | # In a single threaded mode server, on non sqlite db we should have |
|
370 | 375 | # '0 Current Checked out connections' at the end of a request, |
|
371 | 376 | # if not, then something, somewhere is leaving a connection open |
|
372 | 377 | pool = meta.Base.metadata.bind.engine.pool |
|
373 | 378 | log.debug('sa pool status: %s', pool.status()) |
|
374 | 379 | log.debug('Request processing finalized') |
|
375 | 380 | |
|
376 | 381 | return pyramid_app_with_cleanup |
|
377 | 382 | |
|
378 | 383 | |
|
379 | 384 | def sanitize_settings_and_apply_defaults(settings): |
|
380 | 385 | """ |
|
381 | 386 | Applies settings defaults and does all type conversion. |
|
382 | 387 | |
|
383 | 388 | We would move all settings parsing and preparation into this place, so that |
|
384 | 389 | we have only one place left which deals with this part. The remaining parts |
|
385 | 390 | of the application would start to rely fully on well prepared settings. |
|
386 | 391 | |
|
387 | 392 | This piece would later be split up per topic to avoid a big fat monster |
|
388 | 393 | function. |
|
389 | 394 | """ |
|
390 | 395 | |
|
391 | 396 | settings.setdefault('rhodecode.edition', 'Community Edition') |
|
392 | 397 | |
|
393 | 398 | if 'mako.default_filters' not in settings: |
|
394 | 399 | # set custom default filters if we don't have it defined |
|
395 | 400 | settings['mako.imports'] = 'from rhodecode.lib.base import h_filter' |
|
396 | 401 | settings['mako.default_filters'] = 'h_filter' |
|
397 | 402 | |
|
398 | 403 | if 'mako.directories' not in settings: |
|
399 | 404 | mako_directories = settings.setdefault('mako.directories', [ |
|
400 | 405 | # Base templates of the original application |
|
401 | 406 | 'rhodecode:templates', |
|
402 | 407 | ]) |
|
403 | 408 | log.debug( |
|
404 | 409 | "Using the following Mako template directories: %s", |
|
405 | 410 | mako_directories) |
|
406 | 411 | |
|
407 | 412 | # Default includes, possible to change as a user |
|
408 | 413 | pyramid_includes = settings.setdefault('pyramid.includes', [ |
|
409 | 414 | 'rhodecode.lib.middleware.request_wrapper', |
|
410 | 415 | ]) |
|
411 | 416 | log.debug( |
|
412 | 417 | "Using the following pyramid.includes: %s", |
|
413 | 418 | pyramid_includes) |
|
414 | 419 | |
|
415 | 420 | # TODO: johbo: Re-think this, usually the call to config.include |
|
416 | 421 | # should allow to pass in a prefix. |
|
417 | 422 | settings.setdefault('rhodecode.api.url', '/_admin/api') |
|
418 | 423 | |
|
419 | 424 | # Sanitize generic settings. |
|
420 | 425 | _list_setting(settings, 'default_encoding', 'UTF-8') |
|
421 | 426 | _bool_setting(settings, 'is_test', 'false') |
|
422 | 427 | _bool_setting(settings, 'gzip_responses', 'false') |
|
423 | 428 | |
|
424 | 429 | # Call split out functions that sanitize settings for each topic. |
|
425 | 430 | _sanitize_appenlight_settings(settings) |
|
426 | 431 | _sanitize_vcs_settings(settings) |
|
427 | 432 | _sanitize_cache_settings(settings) |
|
428 | 433 | |
|
429 | 434 | # configure instance id |
|
430 | 435 | config_utils.set_instance_id(settings) |
|
431 | 436 | |
|
432 | 437 | return settings |
|
433 | 438 | |
|
434 | 439 | |
|
440 | def enable_debug(): | |
|
441 | """ | |
|
442 | Helper to enable debug on running instance | |
|
443 | :return: | |
|
444 | """ | |
|
445 | import tempfile | |
|
446 | import textwrap | |
|
447 | import logging.config | |
|
448 | ||
|
449 | ini_template = textwrap.dedent(""" | |
|
450 | ##################################### | |
|
451 | ### DEBUG LOGGING CONFIGURATION #### | |
|
452 | ##################################### | |
|
453 | [loggers] | |
|
454 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper | |
|
455 | ||
|
456 | [handlers] | |
|
457 | keys = console, console_sql | |
|
458 | ||
|
459 | [formatters] | |
|
460 | keys = generic, color_formatter, color_formatter_sql | |
|
461 | ||
|
462 | ############# | |
|
463 | ## LOGGERS ## | |
|
464 | ############# | |
|
465 | [logger_root] | |
|
466 | level = NOTSET | |
|
467 | handlers = console | |
|
468 | ||
|
469 | [logger_sqlalchemy] | |
|
470 | level = INFO | |
|
471 | handlers = console_sql | |
|
472 | qualname = sqlalchemy.engine | |
|
473 | propagate = 0 | |
|
474 | ||
|
475 | [logger_beaker] | |
|
476 | level = DEBUG | |
|
477 | handlers = | |
|
478 | qualname = beaker.container | |
|
479 | propagate = 1 | |
|
480 | ||
|
481 | [logger_rhodecode] | |
|
482 | level = DEBUG | |
|
483 | handlers = | |
|
484 | qualname = rhodecode | |
|
485 | propagate = 1 | |
|
486 | ||
|
487 | [logger_ssh_wrapper] | |
|
488 | level = DEBUG | |
|
489 | handlers = | |
|
490 | qualname = ssh_wrapper | |
|
491 | propagate = 1 | |
|
492 | ||
|
493 | [logger_celery] | |
|
494 | level = DEBUG | |
|
495 | handlers = | |
|
496 | qualname = celery | |
|
497 | ||
|
498 | ||
|
499 | ############## | |
|
500 | ## HANDLERS ## | |
|
501 | ############## | |
|
502 | ||
|
503 | [handler_console] | |
|
504 | class = StreamHandler | |
|
505 | args = (sys.stderr, ) | |
|
506 | level = DEBUG | |
|
507 | formatter = color_formatter | |
|
508 | ||
|
509 | [handler_console_sql] | |
|
510 | # "level = DEBUG" logs SQL queries and results. | |
|
511 | # "level = INFO" logs SQL queries. | |
|
512 | # "level = WARN" logs neither. (Recommended for production systems.) | |
|
513 | class = StreamHandler | |
|
514 | args = (sys.stderr, ) | |
|
515 | level = WARN | |
|
516 | formatter = color_formatter_sql | |
|
517 | ||
|
518 | ################ | |
|
519 | ## FORMATTERS ## | |
|
520 | ################ | |
|
521 | ||
|
522 | [formatter_generic] | |
|
523 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
|
524 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | %(req_id)s | |
|
525 | datefmt = %Y-%m-%d %H:%M:%S | |
|
526 | ||
|
527 | [formatter_color_formatter] | |
|
528 | class = rhodecode.lib.logging_formatter.ColorRequestTrackingFormatter | |
|
529 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | %(req_id)s | |
|
530 | datefmt = %Y-%m-%d %H:%M:%S | |
|
531 | ||
|
532 | [formatter_color_formatter_sql] | |
|
533 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
|
534 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
|
535 | datefmt = %Y-%m-%d %H:%M:%S | |
|
536 | """) | |
|
537 | ||
|
538 | with tempfile.NamedTemporaryFile(prefix='rc_debug_logging_', suffix='.ini', | |
|
539 | delete=False) as f: | |
|
540 | log.info('Saved Temporary DEBUG config at %s', f.name) | |
|
541 | f.write(ini_template) | |
|
542 | ||
|
543 | logging.config.fileConfig(f.name) | |
|
544 | log.debug('DEBUG MODE ON') | |
|
545 | os.remove(f.name) | |
|
546 | ||
|
547 | ||
|
435 | 548 | def _sanitize_appenlight_settings(settings): |
|
436 | 549 | _bool_setting(settings, 'appenlight', 'false') |
|
437 | 550 | |
|
438 | 551 | |
|
439 | 552 | def _sanitize_vcs_settings(settings): |
|
440 | 553 | """ |
|
441 | 554 | Applies settings defaults and does type conversion for all VCS related |
|
442 | 555 | settings. |
|
443 | 556 | """ |
|
444 | 557 | _string_setting(settings, 'vcs.svn.compatible_version', '') |
|
445 | 558 | _string_setting(settings, 'git_rev_filter', '--all') |
|
446 | 559 | _string_setting(settings, 'vcs.hooks.protocol', 'http') |
|
447 | 560 | _string_setting(settings, 'vcs.hooks.host', '127.0.0.1') |
|
448 | 561 | _string_setting(settings, 'vcs.scm_app_implementation', 'http') |
|
449 | 562 | _string_setting(settings, 'vcs.server', '') |
|
450 | 563 | _string_setting(settings, 'vcs.server.log_level', 'debug') |
|
451 | 564 | _string_setting(settings, 'vcs.server.protocol', 'http') |
|
452 | 565 | _bool_setting(settings, 'startup.import_repos', 'false') |
|
453 | 566 | _bool_setting(settings, 'vcs.hooks.direct_calls', 'false') |
|
454 | 567 | _bool_setting(settings, 'vcs.server.enable', 'true') |
|
455 | 568 | _bool_setting(settings, 'vcs.start_server', 'false') |
|
456 | 569 | _list_setting(settings, 'vcs.backends', 'hg, git, svn') |
|
457 | 570 | _int_setting(settings, 'vcs.connection_timeout', 3600) |
|
458 | 571 | |
|
459 | 572 | # Support legacy values of vcs.scm_app_implementation. Legacy |
|
460 | 573 | # configurations may use 'rhodecode.lib.middleware.utils.scm_app_http', or |
|
461 | 574 | # disabled since 4.13 'vcsserver.scm_app' which is now mapped to 'http'. |
|
462 | 575 | scm_app_impl = settings['vcs.scm_app_implementation'] |
|
463 | 576 | if scm_app_impl in ['rhodecode.lib.middleware.utils.scm_app_http', 'vcsserver.scm_app']: |
|
464 | 577 | settings['vcs.scm_app_implementation'] = 'http' |
|
465 | 578 | |
|
466 | 579 | |
|
467 | 580 | def _sanitize_cache_settings(settings): |
|
468 | 581 | temp_store = tempfile.gettempdir() |
|
469 | 582 | default_cache_dir = os.path.join(temp_store, 'rc_cache') |
|
470 | 583 | |
|
471 | 584 | # save default, cache dir, and use it for all backends later. |
|
472 | 585 | default_cache_dir = _string_setting( |
|
473 | 586 | settings, |
|
474 | 587 | 'cache_dir', |
|
475 | 588 | default_cache_dir, lower=False, default_when_empty=True) |
|
476 | 589 | |
|
477 | 590 | # ensure we have our dir created |
|
478 | 591 | if not os.path.isdir(default_cache_dir): |
|
479 | 592 | os.makedirs(default_cache_dir, mode=0o755) |
|
480 | 593 | |
|
481 | 594 | # exception store cache |
|
482 | 595 | _string_setting( |
|
483 | 596 | settings, |
|
484 | 597 | 'exception_tracker.store_path', |
|
485 | 598 | temp_store, lower=False, default_when_empty=True) |
|
486 | 599 | |
|
487 | 600 | # cache_perms |
|
488 | 601 | _string_setting( |
|
489 | 602 | settings, |
|
490 | 603 | 'rc_cache.cache_perms.backend', |
|
491 | 604 | 'dogpile.cache.rc.file_namespace', lower=False) |
|
492 | 605 | _int_setting( |
|
493 | 606 | settings, |
|
494 | 607 | 'rc_cache.cache_perms.expiration_time', |
|
495 | 608 | 60) |
|
496 | 609 | _string_setting( |
|
497 | 610 | settings, |
|
498 | 611 | 'rc_cache.cache_perms.arguments.filename', |
|
499 | 612 | os.path.join(default_cache_dir, 'rc_cache_1'), lower=False) |
|
500 | 613 | |
|
501 | 614 | # cache_repo |
|
502 | 615 | _string_setting( |
|
503 | 616 | settings, |
|
504 | 617 | 'rc_cache.cache_repo.backend', |
|
505 | 618 | 'dogpile.cache.rc.file_namespace', lower=False) |
|
506 | 619 | _int_setting( |
|
507 | 620 | settings, |
|
508 | 621 | 'rc_cache.cache_repo.expiration_time', |
|
509 | 622 | 60) |
|
510 | 623 | _string_setting( |
|
511 | 624 | settings, |
|
512 | 625 | 'rc_cache.cache_repo.arguments.filename', |
|
513 | 626 | os.path.join(default_cache_dir, 'rc_cache_2'), lower=False) |
|
514 | 627 | |
|
515 | 628 | # cache_license |
|
516 | 629 | _string_setting( |
|
517 | 630 | settings, |
|
518 | 631 | 'rc_cache.cache_license.backend', |
|
519 | 632 | 'dogpile.cache.rc.file_namespace', lower=False) |
|
520 | 633 | _int_setting( |
|
521 | 634 | settings, |
|
522 | 635 | 'rc_cache.cache_license.expiration_time', |
|
523 | 636 | 5*60) |
|
524 | 637 | _string_setting( |
|
525 | 638 | settings, |
|
526 | 639 | 'rc_cache.cache_license.arguments.filename', |
|
527 | 640 | os.path.join(default_cache_dir, 'rc_cache_3'), lower=False) |
|
528 | 641 | |
|
529 | 642 | # cache_repo_longterm memory, 96H |
|
530 | 643 | _string_setting( |
|
531 | 644 | settings, |
|
532 | 645 | 'rc_cache.cache_repo_longterm.backend', |
|
533 | 646 | 'dogpile.cache.rc.memory_lru', lower=False) |
|
534 | 647 | _int_setting( |
|
535 | 648 | settings, |
|
536 | 649 | 'rc_cache.cache_repo_longterm.expiration_time', |
|
537 | 650 | 345600) |
|
538 | 651 | _int_setting( |
|
539 | 652 | settings, |
|
540 | 653 | 'rc_cache.cache_repo_longterm.max_size', |
|
541 | 654 | 10000) |
|
542 | 655 | |
|
543 | 656 | # sql_cache_short |
|
544 | 657 | _string_setting( |
|
545 | 658 | settings, |
|
546 | 659 | 'rc_cache.sql_cache_short.backend', |
|
547 | 660 | 'dogpile.cache.rc.memory_lru', lower=False) |
|
548 | 661 | _int_setting( |
|
549 | 662 | settings, |
|
550 | 663 | 'rc_cache.sql_cache_short.expiration_time', |
|
551 | 664 | 30) |
|
552 | 665 | _int_setting( |
|
553 | 666 | settings, |
|
554 | 667 | 'rc_cache.sql_cache_short.max_size', |
|
555 | 668 | 10000) |
|
556 | 669 | |
|
557 | 670 | |
|
558 | 671 | def _int_setting(settings, name, default): |
|
559 | 672 | settings[name] = int(settings.get(name, default)) |
|
560 | 673 | return settings[name] |
|
561 | 674 | |
|
562 | 675 | |
|
563 | 676 | def _bool_setting(settings, name, default): |
|
564 | 677 | input_val = settings.get(name, default) |
|
565 | 678 | if isinstance(input_val, unicode): |
|
566 | 679 | input_val = input_val.encode('utf8') |
|
567 | 680 | settings[name] = asbool(input_val) |
|
568 | 681 | return settings[name] |
|
569 | 682 | |
|
570 | 683 | |
|
571 | 684 | def _list_setting(settings, name, default): |
|
572 | 685 | raw_value = settings.get(name, default) |
|
573 | 686 | |
|
574 | 687 | old_separator = ',' |
|
575 | 688 | if old_separator in raw_value: |
|
576 | 689 | # If we get a comma separated list, pass it to our own function. |
|
577 | 690 | settings[name] = rhodecode_aslist(raw_value, sep=old_separator) |
|
578 | 691 | else: |
|
579 | 692 | # Otherwise we assume it uses pyramids space/newline separation. |
|
580 | 693 | settings[name] = aslist(raw_value) |
|
581 | 694 | return settings[name] |
|
582 | 695 | |
|
583 | 696 | |
|
584 | 697 | def _string_setting(settings, name, default, lower=True, default_when_empty=False): |
|
585 | 698 | value = settings.get(name, default) |
|
586 | 699 | |
|
587 | 700 | if default_when_empty and not value: |
|
588 | 701 | # use default value when value is empty |
|
589 | 702 | value = default |
|
590 | 703 | |
|
591 | 704 | if lower: |
|
592 | 705 | value = value.lower() |
|
593 | 706 | settings[name] = value |
|
594 | 707 | return settings[name] |
|
595 | 708 | |
|
596 | 709 | |
|
597 | 710 | def _substitute_values(mapping, substitutions): |
|
598 | 711 | |
|
599 | 712 | try: |
|
600 | 713 | result = { |
|
601 | 714 | # Note: Cannot use regular replacements, since they would clash |
|
602 | 715 | # with the implementation of ConfigParser. Using "format" instead. |
|
603 | 716 | key: value.format(**substitutions) |
|
604 | 717 | for key, value in mapping.items() |
|
605 | 718 | } |
|
606 | 719 | except KeyError as e: |
|
607 | 720 | raise ValueError( |
|
608 | 721 | 'Failed to substitute env variable: {}. ' |
|
609 | 722 | 'Make sure you have specified this env variable without ENV_ prefix'.format(e)) |
|
610 | 723 | except ValueError as e: |
|
611 | 724 | log.warning('Failed to substitute ENV variable: %s', e) |
|
612 | 725 | result = mapping |
|
613 | 726 | |
|
614 | 727 | return result |
@@ -1,336 +1,336 b'' | |||
|
1 | 1 | |
|
2 | 2 | /****************************************************************************** |
|
3 | 3 | * * |
|
4 | 4 | * DO NOT CHANGE THIS FILE MANUALLY * |
|
5 | 5 | * * |
|
6 | 6 | * * |
|
7 | 7 | * This file is automatically generated when the app starts up with * |
|
8 | 8 | * generate_js_files = true * |
|
9 | 9 | * * |
|
10 | 10 | * To add a route here pass jsroute=True to the route definition in the app * |
|
11 | 11 | * * |
|
12 | 12 | ******************************************************************************/ |
|
13 | 13 | function registerRCRoutes() { |
|
14 | 14 | // routes registration |
|
15 | 15 | pyroutes.register('favicon', '/favicon.ico', []); |
|
16 | 16 | pyroutes.register('robots', '/robots.txt', []); |
|
17 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); | |
|
18 | 17 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); |
|
19 | 18 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); |
|
20 | 19 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); |
|
21 | 20 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); |
|
22 | 21 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); |
|
23 | 22 | pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/_settings/integrations', ['repo_group_name']); |
|
24 | 23 | pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/_settings/integrations/new', ['repo_group_name']); |
|
25 | 24 | pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/_settings/integrations/%(integration)s', ['repo_group_name', 'integration']); |
|
26 | 25 | pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/_settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); |
|
27 | 26 | pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/_settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); |
|
28 | 27 | pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']); |
|
29 | 28 | pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']); |
|
30 | 29 | pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); |
|
31 | 30 | pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); |
|
32 | 31 | pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); |
|
32 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); | |
|
33 | 33 | pyroutes.register('ops_ping', '/_admin/ops/ping', []); |
|
34 | 34 | pyroutes.register('ops_error_test', '/_admin/ops/error', []); |
|
35 | 35 | pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []); |
|
36 | 36 | pyroutes.register('ops_ping_legacy', '/_admin/ping', []); |
|
37 | 37 | pyroutes.register('ops_error_test_legacy', '/_admin/error_test', []); |
|
38 | 38 | pyroutes.register('admin_home', '/_admin', []); |
|
39 | 39 | pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); |
|
40 | 40 | pyroutes.register('admin_audit_log_entry', '/_admin/audit_logs/%(audit_log_id)s', ['audit_log_id']); |
|
41 | 41 | pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); |
|
42 | 42 | pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']); |
|
43 | 43 | pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']); |
|
44 | 44 | pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []); |
|
45 | 45 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []); |
|
46 | 46 | pyroutes.register('admin_settings_system', '/_admin/settings/system', []); |
|
47 | 47 | pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []); |
|
48 | 48 | pyroutes.register('admin_settings_exception_tracker', '/_admin/settings/exceptions', []); |
|
49 | 49 | pyroutes.register('admin_settings_exception_tracker_delete_all', '/_admin/settings/exceptions/delete', []); |
|
50 | 50 | pyroutes.register('admin_settings_exception_tracker_show', '/_admin/settings/exceptions/%(exception_id)s', ['exception_id']); |
|
51 | 51 | pyroutes.register('admin_settings_exception_tracker_delete', '/_admin/settings/exceptions/%(exception_id)s/delete', ['exception_id']); |
|
52 | 52 | pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []); |
|
53 | 53 | pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []); |
|
54 | 54 | pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []); |
|
55 | 55 | pyroutes.register('admin_settings_process_management_data', '/_admin/settings/process_management/data', []); |
|
56 | 56 | pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []); |
|
57 | 57 | pyroutes.register('admin_settings_process_management_master_signal', '/_admin/settings/process_management/master_signal', []); |
|
58 | 58 | pyroutes.register('admin_defaults_repositories', '/_admin/defaults/repositories', []); |
|
59 | 59 | pyroutes.register('admin_defaults_repositories_update', '/_admin/defaults/repositories/update', []); |
|
60 | 60 | pyroutes.register('admin_settings', '/_admin/settings', []); |
|
61 | 61 | pyroutes.register('admin_settings_update', '/_admin/settings/update', []); |
|
62 | 62 | pyroutes.register('admin_settings_global', '/_admin/settings/global', []); |
|
63 | 63 | pyroutes.register('admin_settings_global_update', '/_admin/settings/global/update', []); |
|
64 | 64 | pyroutes.register('admin_settings_vcs', '/_admin/settings/vcs', []); |
|
65 | 65 | pyroutes.register('admin_settings_vcs_update', '/_admin/settings/vcs/update', []); |
|
66 | 66 | pyroutes.register('admin_settings_vcs_svn_pattern_delete', '/_admin/settings/vcs/svn_pattern_delete', []); |
|
67 | 67 | pyroutes.register('admin_settings_mapping', '/_admin/settings/mapping', []); |
|
68 | 68 | pyroutes.register('admin_settings_mapping_update', '/_admin/settings/mapping/update', []); |
|
69 | 69 | pyroutes.register('admin_settings_visual', '/_admin/settings/visual', []); |
|
70 | 70 | pyroutes.register('admin_settings_visual_update', '/_admin/settings/visual/update', []); |
|
71 | 71 | pyroutes.register('admin_settings_issuetracker', '/_admin/settings/issue-tracker', []); |
|
72 | 72 | pyroutes.register('admin_settings_issuetracker_update', '/_admin/settings/issue-tracker/update', []); |
|
73 | 73 | pyroutes.register('admin_settings_issuetracker_test', '/_admin/settings/issue-tracker/test', []); |
|
74 | 74 | pyroutes.register('admin_settings_issuetracker_delete', '/_admin/settings/issue-tracker/delete', []); |
|
75 | 75 | pyroutes.register('admin_settings_email', '/_admin/settings/email', []); |
|
76 | 76 | pyroutes.register('admin_settings_email_update', '/_admin/settings/email/update', []); |
|
77 | 77 | pyroutes.register('admin_settings_hooks', '/_admin/settings/hooks', []); |
|
78 | 78 | pyroutes.register('admin_settings_hooks_update', '/_admin/settings/hooks/update', []); |
|
79 | 79 | pyroutes.register('admin_settings_hooks_delete', '/_admin/settings/hooks/delete', []); |
|
80 | 80 | pyroutes.register('admin_settings_search', '/_admin/settings/search', []); |
|
81 | 81 | pyroutes.register('admin_settings_labs', '/_admin/settings/labs', []); |
|
82 | 82 | pyroutes.register('admin_settings_labs_update', '/_admin/settings/labs/update', []); |
|
83 | 83 | pyroutes.register('admin_settings_automation', '/_admin/_admin/settings/automation', []); |
|
84 | 84 | pyroutes.register('admin_permissions_application', '/_admin/permissions/application', []); |
|
85 | 85 | pyroutes.register('admin_permissions_application_update', '/_admin/permissions/application/update', []); |
|
86 | 86 | pyroutes.register('admin_permissions_global', '/_admin/permissions/global', []); |
|
87 | 87 | pyroutes.register('admin_permissions_global_update', '/_admin/permissions/global/update', []); |
|
88 | 88 | pyroutes.register('admin_permissions_object', '/_admin/permissions/object', []); |
|
89 | 89 | pyroutes.register('admin_permissions_object_update', '/_admin/permissions/object/update', []); |
|
90 | 90 | pyroutes.register('admin_permissions_branch', '/_admin/permissions/branch', []); |
|
91 | 91 | pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []); |
|
92 | 92 | pyroutes.register('admin_permissions_overview', '/_admin/permissions/overview', []); |
|
93 | 93 | pyroutes.register('admin_permissions_auth_token_access', '/_admin/permissions/auth_token_access', []); |
|
94 | 94 | pyroutes.register('admin_permissions_ssh_keys', '/_admin/permissions/ssh_keys', []); |
|
95 | 95 | pyroutes.register('admin_permissions_ssh_keys_data', '/_admin/permissions/ssh_keys/data', []); |
|
96 | 96 | pyroutes.register('admin_permissions_ssh_keys_update', '/_admin/permissions/ssh_keys/update', []); |
|
97 | 97 | pyroutes.register('users', '/_admin/users', []); |
|
98 | 98 | pyroutes.register('users_data', '/_admin/users_data', []); |
|
99 | 99 | pyroutes.register('users_create', '/_admin/users/create', []); |
|
100 | 100 | pyroutes.register('users_new', '/_admin/users/new', []); |
|
101 | 101 | pyroutes.register('user_edit', '/_admin/users/%(user_id)s/edit', ['user_id']); |
|
102 | 102 | pyroutes.register('user_edit_advanced', '/_admin/users/%(user_id)s/edit/advanced', ['user_id']); |
|
103 | 103 | pyroutes.register('user_edit_global_perms', '/_admin/users/%(user_id)s/edit/global_permissions', ['user_id']); |
|
104 | 104 | pyroutes.register('user_edit_global_perms_update', '/_admin/users/%(user_id)s/edit/global_permissions/update', ['user_id']); |
|
105 | 105 | pyroutes.register('user_update', '/_admin/users/%(user_id)s/update', ['user_id']); |
|
106 | 106 | pyroutes.register('user_delete', '/_admin/users/%(user_id)s/delete', ['user_id']); |
|
107 | 107 | pyroutes.register('user_force_password_reset', '/_admin/users/%(user_id)s/password_reset', ['user_id']); |
|
108 | 108 | pyroutes.register('user_create_personal_repo_group', '/_admin/users/%(user_id)s/create_repo_group', ['user_id']); |
|
109 | 109 | pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); |
|
110 | 110 | pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); |
|
111 | 111 | pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); |
|
112 | 112 | pyroutes.register('edit_user_ssh_keys', '/_admin/users/%(user_id)s/edit/ssh_keys', ['user_id']); |
|
113 | 113 | pyroutes.register('edit_user_ssh_keys_generate_keypair', '/_admin/users/%(user_id)s/edit/ssh_keys/generate', ['user_id']); |
|
114 | 114 | pyroutes.register('edit_user_ssh_keys_add', '/_admin/users/%(user_id)s/edit/ssh_keys/new', ['user_id']); |
|
115 | 115 | pyroutes.register('edit_user_ssh_keys_delete', '/_admin/users/%(user_id)s/edit/ssh_keys/delete', ['user_id']); |
|
116 | 116 | pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']); |
|
117 | 117 | pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']); |
|
118 | 118 | pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']); |
|
119 | 119 | pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']); |
|
120 | 120 | pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']); |
|
121 | 121 | pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']); |
|
122 | 122 | pyroutes.register('edit_user_perms_summary', '/_admin/users/%(user_id)s/edit/permissions_summary', ['user_id']); |
|
123 | 123 | pyroutes.register('edit_user_perms_summary_json', '/_admin/users/%(user_id)s/edit/permissions_summary/json', ['user_id']); |
|
124 | 124 | pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']); |
|
125 | 125 | pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); |
|
126 | 126 | pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']); |
|
127 | 127 | pyroutes.register('edit_user_caches', '/_admin/users/%(user_id)s/edit/caches', ['user_id']); |
|
128 | 128 | pyroutes.register('edit_user_caches_update', '/_admin/users/%(user_id)s/edit/caches/update', ['user_id']); |
|
129 | 129 | pyroutes.register('user_groups', '/_admin/user_groups', []); |
|
130 | 130 | pyroutes.register('user_groups_data', '/_admin/user_groups_data', []); |
|
131 | 131 | pyroutes.register('user_groups_new', '/_admin/user_groups/new', []); |
|
132 | 132 | pyroutes.register('user_groups_create', '/_admin/user_groups/create', []); |
|
133 | 133 | pyroutes.register('repos', '/_admin/repos', []); |
|
134 | 134 | pyroutes.register('repo_new', '/_admin/repos/new', []); |
|
135 | 135 | pyroutes.register('repo_create', '/_admin/repos/create', []); |
|
136 | 136 | pyroutes.register('repo_groups', '/_admin/repo_groups', []); |
|
137 | 137 | pyroutes.register('repo_group_new', '/_admin/repo_group/new', []); |
|
138 | 138 | pyroutes.register('repo_group_create', '/_admin/repo_group/create', []); |
|
139 | 139 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); |
|
140 | 140 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); |
|
141 | 141 | pyroutes.register('channelstream_proxy', '/_channelstream', []); |
|
142 | 142 | pyroutes.register('login', '/_admin/login', []); |
|
143 | 143 | pyroutes.register('logout', '/_admin/logout', []); |
|
144 | 144 | pyroutes.register('register', '/_admin/register', []); |
|
145 | 145 | pyroutes.register('reset_password', '/_admin/password_reset', []); |
|
146 | 146 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); |
|
147 | 147 | pyroutes.register('home', '/', []); |
|
148 | 148 | pyroutes.register('user_autocomplete_data', '/_users', []); |
|
149 | 149 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); |
|
150 | 150 | pyroutes.register('repo_list_data', '/_repos', []); |
|
151 | 151 | pyroutes.register('goto_switcher_data', '/_goto_data', []); |
|
152 | 152 | pyroutes.register('markup_preview', '/_markup_preview', []); |
|
153 | 153 | pyroutes.register('store_user_session_value', '/_store_session_attr', []); |
|
154 | 154 | pyroutes.register('journal', '/_admin/journal', []); |
|
155 | 155 | pyroutes.register('journal_rss', '/_admin/journal/rss', []); |
|
156 | 156 | pyroutes.register('journal_atom', '/_admin/journal/atom', []); |
|
157 | 157 | pyroutes.register('journal_public', '/_admin/public_journal', []); |
|
158 | 158 | pyroutes.register('journal_public_atom', '/_admin/public_journal/atom', []); |
|
159 | 159 | pyroutes.register('journal_public_atom_old', '/_admin/public_journal_atom', []); |
|
160 | 160 | pyroutes.register('journal_public_rss', '/_admin/public_journal/rss', []); |
|
161 | 161 | pyroutes.register('journal_public_rss_old', '/_admin/public_journal_rss', []); |
|
162 | 162 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); |
|
163 | 163 | pyroutes.register('repo_creating', '/%(repo_name)s/repo_creating', ['repo_name']); |
|
164 | 164 | pyroutes.register('repo_creating_check', '/%(repo_name)s/repo_creating_check', ['repo_name']); |
|
165 | 165 | pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']); |
|
166 | 166 | pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']); |
|
167 | 167 | pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']); |
|
168 | 168 | pyroutes.register('repo_commit_children', '/%(repo_name)s/changeset_children/%(commit_id)s', ['repo_name', 'commit_id']); |
|
169 | 169 | pyroutes.register('repo_commit_parents', '/%(repo_name)s/changeset_parents/%(commit_id)s', ['repo_name', 'commit_id']); |
|
170 | 170 | pyroutes.register('repo_commit_raw', '/%(repo_name)s/changeset-diff/%(commit_id)s', ['repo_name', 'commit_id']); |
|
171 | 171 | pyroutes.register('repo_commit_patch', '/%(repo_name)s/changeset-patch/%(commit_id)s', ['repo_name', 'commit_id']); |
|
172 | 172 | pyroutes.register('repo_commit_download', '/%(repo_name)s/changeset-download/%(commit_id)s', ['repo_name', 'commit_id']); |
|
173 | 173 | pyroutes.register('repo_commit_data', '/%(repo_name)s/changeset-data/%(commit_id)s', ['repo_name', 'commit_id']); |
|
174 | 174 | pyroutes.register('repo_commit_comment_create', '/%(repo_name)s/changeset/%(commit_id)s/comment/create', ['repo_name', 'commit_id']); |
|
175 | 175 | pyroutes.register('repo_commit_comment_preview', '/%(repo_name)s/changeset/%(commit_id)s/comment/preview', ['repo_name', 'commit_id']); |
|
176 | 176 | pyroutes.register('repo_commit_comment_delete', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/delete', ['repo_name', 'commit_id', 'comment_id']); |
|
177 | 177 | pyroutes.register('repo_commit_raw_deprecated', '/%(repo_name)s/raw-changeset/%(commit_id)s', ['repo_name', 'commit_id']); |
|
178 | 178 | pyroutes.register('repo_archivefile', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); |
|
179 | 179 | pyroutes.register('repo_files_diff', '/%(repo_name)s/diff/%(f_path)s', ['repo_name', 'f_path']); |
|
180 | 180 | pyroutes.register('repo_files_diff_2way_redirect', '/%(repo_name)s/diff-2way/%(f_path)s', ['repo_name', 'f_path']); |
|
181 | 181 | pyroutes.register('repo_files', '/%(repo_name)s/files/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
182 | 182 | pyroutes.register('repo_files:default_path', '/%(repo_name)s/files/%(commit_id)s/', ['repo_name', 'commit_id']); |
|
183 | 183 | pyroutes.register('repo_files:default_commit', '/%(repo_name)s/files', ['repo_name']); |
|
184 | 184 | pyroutes.register('repo_files:rendered', '/%(repo_name)s/render/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
185 | 185 | pyroutes.register('repo_files:annotated', '/%(repo_name)s/annotate/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
186 | 186 | pyroutes.register('repo_files:annotated_previous', '/%(repo_name)s/annotate-previous/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
187 | 187 | pyroutes.register('repo_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
188 | 188 | pyroutes.register('repo_nodetree_full:default_path', '/%(repo_name)s/nodetree_full/%(commit_id)s/', ['repo_name', 'commit_id']); |
|
189 | 189 | pyroutes.register('repo_files_nodelist', '/%(repo_name)s/nodelist/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
190 | 190 | pyroutes.register('repo_file_raw', '/%(repo_name)s/raw/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
191 | 191 | pyroutes.register('repo_file_download', '/%(repo_name)s/download/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
192 | 192 | pyroutes.register('repo_file_download:legacy', '/%(repo_name)s/rawfile/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
193 | 193 | pyroutes.register('repo_file_history', '/%(repo_name)s/history/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
194 | 194 | pyroutes.register('repo_file_authors', '/%(repo_name)s/authors/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
195 | 195 | pyroutes.register('repo_files_remove_file', '/%(repo_name)s/remove_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
196 | 196 | pyroutes.register('repo_files_delete_file', '/%(repo_name)s/delete_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
197 | 197 | pyroutes.register('repo_files_edit_file', '/%(repo_name)s/edit_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
198 | 198 | pyroutes.register('repo_files_update_file', '/%(repo_name)s/update_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
199 | 199 | pyroutes.register('repo_files_add_file', '/%(repo_name)s/add_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
200 | 200 | pyroutes.register('repo_files_create_file', '/%(repo_name)s/create_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
201 | 201 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); |
|
202 | 202 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); |
|
203 | 203 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); |
|
204 | 204 | pyroutes.register('repo_changelog', '/%(repo_name)s/changelog', ['repo_name']); |
|
205 | 205 | pyroutes.register('repo_changelog_file', '/%(repo_name)s/changelog/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
206 | 206 | pyroutes.register('repo_changelog_elements', '/%(repo_name)s/changelog_elements', ['repo_name']); |
|
207 | 207 | pyroutes.register('repo_changelog_elements_file', '/%(repo_name)s/changelog_elements/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
208 | 208 | pyroutes.register('repo_compare_select', '/%(repo_name)s/compare', ['repo_name']); |
|
209 | 209 | pyroutes.register('repo_compare', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); |
|
210 | 210 | pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']); |
|
211 | 211 | pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']); |
|
212 | 212 | pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']); |
|
213 | 213 | pyroutes.register('repo_fork_new', '/%(repo_name)s/fork', ['repo_name']); |
|
214 | 214 | pyroutes.register('repo_fork_create', '/%(repo_name)s/fork/create', ['repo_name']); |
|
215 | 215 | pyroutes.register('repo_forks_show_all', '/%(repo_name)s/forks', ['repo_name']); |
|
216 | 216 | pyroutes.register('repo_forks_data', '/%(repo_name)s/forks/data', ['repo_name']); |
|
217 | 217 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
218 | 218 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); |
|
219 | 219 | pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']); |
|
220 | 220 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); |
|
221 | 221 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); |
|
222 | 222 | pyroutes.register('pullrequest_new', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
223 | 223 | pyroutes.register('pullrequest_create', '/%(repo_name)s/pull-request/create', ['repo_name']); |
|
224 | 224 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s/update', ['repo_name', 'pull_request_id']); |
|
225 | 225 | pyroutes.register('pullrequest_merge', '/%(repo_name)s/pull-request/%(pull_request_id)s/merge', ['repo_name', 'pull_request_id']); |
|
226 | 226 | pyroutes.register('pullrequest_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/delete', ['repo_name', 'pull_request_id']); |
|
227 | 227 | pyroutes.register('pullrequest_comment_create', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment', ['repo_name', 'pull_request_id']); |
|
228 | 228 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment/%(comment_id)s/delete', ['repo_name', 'pull_request_id', 'comment_id']); |
|
229 | 229 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); |
|
230 | 230 | pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']); |
|
231 | 231 | pyroutes.register('edit_repo_advanced_archive', '/%(repo_name)s/settings/advanced/archive', ['repo_name']); |
|
232 | 232 | pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']); |
|
233 | 233 | pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']); |
|
234 | 234 | pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']); |
|
235 | 235 | pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']); |
|
236 | 236 | pyroutes.register('edit_repo_advanced_hooks', '/%(repo_name)s/settings/advanced/hooks', ['repo_name']); |
|
237 | 237 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); |
|
238 | 238 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); |
|
239 | 239 | pyroutes.register('edit_repo_perms_branch', '/%(repo_name)s/settings/branch_permissions', ['repo_name']); |
|
240 | 240 | pyroutes.register('edit_repo_perms_branch_delete', '/%(repo_name)s/settings/branch_permissions/%(rule_id)s/delete', ['repo_name', 'rule_id']); |
|
241 | 241 | pyroutes.register('edit_repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']); |
|
242 | 242 | pyroutes.register('edit_repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']); |
|
243 | 243 | pyroutes.register('edit_repo_fields', '/%(repo_name)s/settings/fields', ['repo_name']); |
|
244 | 244 | pyroutes.register('edit_repo_fields_create', '/%(repo_name)s/settings/fields/create', ['repo_name']); |
|
245 | 245 | pyroutes.register('edit_repo_fields_delete', '/%(repo_name)s/settings/fields/%(field_id)s/delete', ['repo_name', 'field_id']); |
|
246 | 246 | pyroutes.register('repo_edit_toggle_locking', '/%(repo_name)s/settings/toggle_locking', ['repo_name']); |
|
247 | 247 | pyroutes.register('edit_repo_remote', '/%(repo_name)s/settings/remote', ['repo_name']); |
|
248 | 248 | pyroutes.register('edit_repo_remote_pull', '/%(repo_name)s/settings/remote/pull', ['repo_name']); |
|
249 | 249 | pyroutes.register('edit_repo_remote_push', '/%(repo_name)s/settings/remote/push', ['repo_name']); |
|
250 | 250 | pyroutes.register('edit_repo_statistics', '/%(repo_name)s/settings/statistics', ['repo_name']); |
|
251 | 251 | pyroutes.register('edit_repo_statistics_reset', '/%(repo_name)s/settings/statistics/update', ['repo_name']); |
|
252 | 252 | pyroutes.register('edit_repo_issuetracker', '/%(repo_name)s/settings/issue_trackers', ['repo_name']); |
|
253 | 253 | pyroutes.register('edit_repo_issuetracker_test', '/%(repo_name)s/settings/issue_trackers/test', ['repo_name']); |
|
254 | 254 | pyroutes.register('edit_repo_issuetracker_delete', '/%(repo_name)s/settings/issue_trackers/delete', ['repo_name']); |
|
255 | 255 | pyroutes.register('edit_repo_issuetracker_update', '/%(repo_name)s/settings/issue_trackers/update', ['repo_name']); |
|
256 | 256 | pyroutes.register('edit_repo_vcs', '/%(repo_name)s/settings/vcs', ['repo_name']); |
|
257 | 257 | pyroutes.register('edit_repo_vcs_update', '/%(repo_name)s/settings/vcs/update', ['repo_name']); |
|
258 | 258 | pyroutes.register('edit_repo_vcs_svn_pattern_delete', '/%(repo_name)s/settings/vcs/svn_pattern/delete', ['repo_name']); |
|
259 | 259 | pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']); |
|
260 | 260 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']); |
|
261 | 261 | pyroutes.register('repo_automation', '/%(repo_name)s/settings/automation', ['repo_name']); |
|
262 | 262 | pyroutes.register('edit_repo_strip', '/%(repo_name)s/settings/strip', ['repo_name']); |
|
263 | 263 | pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']); |
|
264 | 264 | pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']); |
|
265 | 265 | pyroutes.register('edit_repo_audit_logs', '/%(repo_name)s/settings/audit_logs', ['repo_name']); |
|
266 | 266 | pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']); |
|
267 | 267 | pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']); |
|
268 | 268 | pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']); |
|
269 | 269 | pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']); |
|
270 | 270 | pyroutes.register('edit_repo_group', '/%(repo_group_name)s/_edit', ['repo_group_name']); |
|
271 | 271 | pyroutes.register('edit_repo_group_advanced', '/%(repo_group_name)s/_settings/advanced', ['repo_group_name']); |
|
272 | 272 | pyroutes.register('edit_repo_group_advanced_delete', '/%(repo_group_name)s/_settings/advanced/delete', ['repo_group_name']); |
|
273 | 273 | pyroutes.register('edit_repo_group_perms', '/%(repo_group_name)s/_settings/permissions', ['repo_group_name']); |
|
274 | 274 | pyroutes.register('edit_repo_group_perms_update', '/%(repo_group_name)s/_settings/permissions/update', ['repo_group_name']); |
|
275 | 275 | pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']); |
|
276 | 276 | pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']); |
|
277 | 277 | pyroutes.register('user_group_members_data', '/_admin/user_groups/%(user_group_id)s/members', ['user_group_id']); |
|
278 | 278 | pyroutes.register('edit_user_group_perms_summary', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary', ['user_group_id']); |
|
279 | 279 | pyroutes.register('edit_user_group_perms_summary_json', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary/json', ['user_group_id']); |
|
280 | 280 | pyroutes.register('edit_user_group', '/_admin/user_groups/%(user_group_id)s/edit', ['user_group_id']); |
|
281 | 281 | pyroutes.register('user_groups_update', '/_admin/user_groups/%(user_group_id)s/update', ['user_group_id']); |
|
282 | 282 | pyroutes.register('edit_user_group_global_perms', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions', ['user_group_id']); |
|
283 | 283 | pyroutes.register('edit_user_group_global_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions/update', ['user_group_id']); |
|
284 | 284 | pyroutes.register('edit_user_group_perms', '/_admin/user_groups/%(user_group_id)s/edit/permissions', ['user_group_id']); |
|
285 | 285 | pyroutes.register('edit_user_group_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/permissions/update', ['user_group_id']); |
|
286 | 286 | pyroutes.register('edit_user_group_advanced', '/_admin/user_groups/%(user_group_id)s/edit/advanced', ['user_group_id']); |
|
287 | 287 | pyroutes.register('edit_user_group_advanced_sync', '/_admin/user_groups/%(user_group_id)s/edit/advanced/sync', ['user_group_id']); |
|
288 | 288 | pyroutes.register('user_groups_delete', '/_admin/user_groups/%(user_group_id)s/delete', ['user_group_id']); |
|
289 | 289 | pyroutes.register('search', '/_admin/search', []); |
|
290 | 290 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); |
|
291 | 291 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); |
|
292 | 292 | pyroutes.register('user_group_profile', '/_profile_user_group/%(user_group_name)s', ['user_group_name']); |
|
293 | 293 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); |
|
294 | 294 | pyroutes.register('my_account_edit', '/_admin/my_account/edit', []); |
|
295 | 295 | pyroutes.register('my_account_update', '/_admin/my_account/update', []); |
|
296 | 296 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); |
|
297 | 297 | pyroutes.register('my_account_password_update', '/_admin/my_account/password/update', []); |
|
298 | 298 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); |
|
299 | 299 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); |
|
300 | 300 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); |
|
301 | 301 | pyroutes.register('my_account_ssh_keys', '/_admin/my_account/ssh_keys', []); |
|
302 | 302 | pyroutes.register('my_account_ssh_keys_generate', '/_admin/my_account/ssh_keys/generate', []); |
|
303 | 303 | pyroutes.register('my_account_ssh_keys_add', '/_admin/my_account/ssh_keys/new', []); |
|
304 | 304 | pyroutes.register('my_account_ssh_keys_delete', '/_admin/my_account/ssh_keys/delete', []); |
|
305 | 305 | pyroutes.register('my_account_user_group_membership', '/_admin/my_account/user_group_membership', []); |
|
306 | 306 | pyroutes.register('my_account_emails', '/_admin/my_account/emails', []); |
|
307 | 307 | pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []); |
|
308 | 308 | pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []); |
|
309 | 309 | pyroutes.register('my_account_repos', '/_admin/my_account/repos', []); |
|
310 | 310 | pyroutes.register('my_account_watched', '/_admin/my_account/watched', []); |
|
311 | 311 | pyroutes.register('my_account_perms', '/_admin/my_account/perms', []); |
|
312 | 312 | pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []); |
|
313 | 313 | pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []); |
|
314 | 314 | pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []); |
|
315 | 315 | pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []); |
|
316 | 316 | pyroutes.register('notifications_show_all', '/_admin/notifications', []); |
|
317 | 317 | pyroutes.register('notifications_mark_all_read', '/_admin/notifications/mark_all_read', []); |
|
318 | 318 | pyroutes.register('notifications_show', '/_admin/notifications/%(notification_id)s', ['notification_id']); |
|
319 | 319 | pyroutes.register('notifications_update', '/_admin/notifications/%(notification_id)s/update', ['notification_id']); |
|
320 | 320 | pyroutes.register('notifications_delete', '/_admin/notifications/%(notification_id)s/delete', ['notification_id']); |
|
321 | 321 | pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []); |
|
322 | 322 | pyroutes.register('gists_show', '/_admin/gists', []); |
|
323 | 323 | pyroutes.register('gists_new', '/_admin/gists/new', []); |
|
324 | 324 | pyroutes.register('gists_create', '/_admin/gists/create', []); |
|
325 | 325 | pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']); |
|
326 | 326 | pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']); |
|
327 | 327 | pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']); |
|
328 | 328 | pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']); |
|
329 | 329 | pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']); |
|
330 | 330 | pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']); |
|
331 | 331 | pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']); |
|
332 | 332 | pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']); |
|
333 | 333 | pyroutes.register('debug_style_home', '/_admin/debug_style', []); |
|
334 | 334 | pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']); |
|
335 | 335 | pyroutes.register('apiv2', '/_admin/api', []); |
|
336 | 336 | } |
General Comments 0
You need to be logged in to leave comments.
Login now