Show More
@@ -1,727 +1,729 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | ################################################################################ |
|
3 | ################################################################################ | |
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## |
|
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 |
|
10 | |||
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## EMAIL CONFIGURATION ## |
|
12 | ## EMAIL CONFIGURATION ## | |
13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | ## Uncomment and replace with the email address which should receive ## | |
14 | ## any error reports after an application crash ## |
|
14 | ## any error reports after an application crash ## | |
15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | ## Additionally these settings will be used by the RhodeCode mailing system ## | |
16 | ################################################################################ |
|
16 | ################################################################################ | |
17 |
|
17 | |||
18 | ## prefix all emails subjects with given prefix, helps filtering out emails |
|
18 | ## prefix all emails subjects with given prefix, helps filtering out emails | |
19 | #email_prefix = [RhodeCode] |
|
19 | #email_prefix = [RhodeCode] | |
20 |
|
20 | |||
21 | ## email FROM address all mails will be sent |
|
21 | ## email FROM address all mails will be sent | |
22 | #app_email_from = rhodecode-noreply@localhost |
|
22 | #app_email_from = rhodecode-noreply@localhost | |
23 |
|
23 | |||
24 | ## Uncomment and replace with the address which should receive any error report |
|
24 | ## Uncomment and replace with the address which should receive any error report | |
25 | ## note: using appenlight for error handling doesn't need this to be uncommented |
|
25 | ## note: using appenlight for error handling doesn't need this to be uncommented | |
26 | #email_to = admin@localhost |
|
26 | #email_to = admin@localhost | |
27 |
|
27 | |||
28 | ## in case of Application errors, sent an error email form |
|
28 | ## in case of Application errors, sent an error email form | |
29 | #error_email_from = rhodecode_error@localhost |
|
29 | #error_email_from = rhodecode_error@localhost | |
30 |
|
30 | |||
31 | ## additional error message to be send in case of server crash |
|
31 | ## additional error message to be send in case of server crash | |
32 | #error_message = |
|
32 | #error_message = | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | #smtp_server = mail.server.com |
|
35 | #smtp_server = mail.server.com | |
36 | #smtp_username = |
|
36 | #smtp_username = | |
37 | #smtp_password = |
|
37 | #smtp_password = | |
38 | #smtp_port = |
|
38 | #smtp_port = | |
39 | #smtp_use_tls = false |
|
39 | #smtp_use_tls = false | |
40 | #smtp_use_ssl = true |
|
40 | #smtp_use_ssl = true | |
41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
42 | #smtp_auth = |
|
42 | #smtp_auth = | |
43 |
|
43 | |||
44 | [server:main] |
|
44 | [server:main] | |
45 | ## COMMON ## |
|
45 | ## COMMON ## | |
46 | host = 127.0.0.1 |
|
46 | host = 127.0.0.1 | |
47 | port = 5000 |
|
47 | port = 5000 | |
48 |
|
48 | |||
49 | ################################## |
|
49 | ################################## | |
50 | ## WAITRESS WSGI SERVER ## |
|
50 | ## WAITRESS WSGI SERVER ## | |
51 | ## Recommended for Development ## |
|
51 | ## Recommended for Development ## | |
52 | ################################## |
|
52 | ################################## | |
53 |
|
53 | |||
54 | use = egg:waitress#main |
|
54 | use = egg:waitress#main | |
55 | ## number of worker threads |
|
55 | ## number of worker threads | |
56 | threads = 5 |
|
56 | threads = 5 | |
57 | ## MAX BODY SIZE 100GB |
|
57 | ## MAX BODY SIZE 100GB | |
58 | max_request_body_size = 107374182400 |
|
58 | max_request_body_size = 107374182400 | |
59 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
59 | ## Use poll instead of select, fixes file descriptors limits problems. | |
60 | ## May not work on old windows systems. |
|
60 | ## May not work on old windows systems. | |
61 | asyncore_use_poll = true |
|
61 | asyncore_use_poll = true | |
62 |
|
62 | |||
63 |
|
63 | |||
64 | ########################## |
|
64 | ########################## | |
65 | ## GUNICORN WSGI SERVER ## |
|
65 | ## GUNICORN WSGI SERVER ## | |
66 | ########################## |
|
66 | ########################## | |
67 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
67 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini | |
68 |
|
68 | |||
69 | #use = egg:gunicorn#main |
|
69 | #use = egg:gunicorn#main | |
70 | ## Sets the number of process workers. You must set `instance_id = *` |
|
70 | ## Sets the number of process workers. You must set `instance_id = *` | |
71 | ## when this option is set to more than one worker, recommended |
|
71 | ## when this option is set to more than one worker, recommended | |
72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers |
|
72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers | |
73 | ## The `instance_id = *` must be set in the [app:main] section below |
|
73 | ## The `instance_id = *` must be set in the [app:main] section below | |
74 | #workers = 2 |
|
74 | #workers = 2 | |
75 | ## number of threads for each of the worker, must be set to 1 for gevent |
|
75 | ## number of threads for each of the worker, must be set to 1 for gevent | |
76 | ## generally recommended to be at 1 |
|
76 | ## generally recommended to be at 1 | |
77 | #threads = 1 |
|
77 | #threads = 1 | |
78 | ## process name |
|
78 | ## process name | |
79 | #proc_name = rhodecode |
|
79 | #proc_name = rhodecode | |
80 | ## type of worker class, one of sync, gevent |
|
80 | ## type of worker class, one of sync, gevent | |
81 | ## recommended for bigger setup is using of of other than sync one |
|
81 | ## recommended for bigger setup is using of of other than sync one | |
82 | #worker_class = sync |
|
82 | #worker_class = sync | |
83 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
83 | ## The maximum number of simultaneous clients. Valid only for Gevent | |
84 | #worker_connections = 10 |
|
84 | #worker_connections = 10 | |
85 | ## max number of requests that worker will handle before being gracefully |
|
85 | ## max number of requests that worker will handle before being gracefully | |
86 | ## restarted, could prevent memory leaks |
|
86 | ## restarted, could prevent memory leaks | |
87 | #max_requests = 1000 |
|
87 | #max_requests = 1000 | |
88 | #max_requests_jitter = 30 |
|
88 | #max_requests_jitter = 30 | |
89 | ## amount of time a worker can spend with handling a request before it |
|
89 | ## amount of time a worker can spend with handling a request before it | |
90 | ## gets killed and restarted. Set to 6hrs |
|
90 | ## gets killed and restarted. Set to 6hrs | |
91 | #timeout = 21600 |
|
91 | #timeout = 21600 | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | ## prefix middleware for RhodeCode. |
|
94 | ## prefix middleware for RhodeCode. | |
95 | ## recommended when using proxy setup. |
|
95 | ## recommended when using proxy setup. | |
96 | ## allows to set RhodeCode under a prefix in server. |
|
96 | ## allows to set RhodeCode under a prefix in server. | |
97 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
97 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. | |
98 | ## And set your prefix like: `prefix = /custom_prefix` |
|
98 | ## And set your prefix like: `prefix = /custom_prefix` | |
99 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
99 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need | |
100 | ## to make your cookies only work on prefix url |
|
100 | ## to make your cookies only work on prefix url | |
101 | [filter:proxy-prefix] |
|
101 | [filter:proxy-prefix] | |
102 | use = egg:PasteDeploy#prefix |
|
102 | use = egg:PasteDeploy#prefix | |
103 | prefix = / |
|
103 | prefix = / | |
104 |
|
104 | |||
105 | [app:main] |
|
105 | [app:main] | |
106 | use = egg:rhodecode-enterprise-ce |
|
106 | use = egg:rhodecode-enterprise-ce | |
107 |
|
107 | |||
108 | ## enable proxy prefix middleware, defined above |
|
108 | ## enable proxy prefix middleware, defined above | |
109 | #filter-with = proxy-prefix |
|
109 | #filter-with = proxy-prefix | |
110 |
|
110 | |||
111 | # During development the we want to have the debug toolbar enabled |
|
111 | # During development the we want to have the debug toolbar enabled | |
112 | pyramid.includes = |
|
112 | pyramid.includes = | |
113 | pyramid_debugtoolbar |
|
113 | pyramid_debugtoolbar | |
114 | rhodecode.utils.debugtoolbar |
|
114 | rhodecode.utils.debugtoolbar | |
115 | rhodecode.lib.middleware.request_wrapper |
|
115 | rhodecode.lib.middleware.request_wrapper | |
116 |
|
116 | |||
117 | pyramid.reload_templates = true |
|
117 | pyramid.reload_templates = true | |
118 |
|
118 | |||
119 | debugtoolbar.hosts = 0.0.0.0/0 |
|
119 | debugtoolbar.hosts = 0.0.0.0/0 | |
120 | debugtoolbar.exclude_prefixes = |
|
120 | debugtoolbar.exclude_prefixes = | |
121 | /css |
|
121 | /css | |
122 | /fonts |
|
122 | /fonts | |
123 | /images |
|
123 | /images | |
124 | /js |
|
124 | /js | |
125 |
|
125 | |||
126 | ## RHODECODE PLUGINS ## |
|
126 | ## RHODECODE PLUGINS ## | |
127 | rhodecode.includes = |
|
127 | rhodecode.includes = | |
128 | rhodecode.api |
|
128 | rhodecode.api | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | # api prefix url |
|
131 | # api prefix url | |
132 | rhodecode.api.url = /_admin/api |
|
132 | rhodecode.api.url = /_admin/api | |
133 |
|
133 | |||
134 |
|
134 | |||
135 | ## END RHODECODE PLUGINS ## |
|
135 | ## END RHODECODE PLUGINS ## | |
136 |
|
136 | |||
137 | ## encryption key used to encrypt social plugin tokens, |
|
137 | ## encryption key used to encrypt social plugin tokens, | |
138 | ## remote_urls with credentials etc, if not set it defaults to |
|
138 | ## remote_urls with credentials etc, if not set it defaults to | |
139 | ## `beaker.session.secret` |
|
139 | ## `beaker.session.secret` | |
140 | #rhodecode.encrypted_values.secret = |
|
140 | #rhodecode.encrypted_values.secret = | |
141 |
|
141 | |||
142 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
142 | ## decryption strict mode (enabled by default). It controls if decryption raises | |
143 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
143 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. | |
144 | #rhodecode.encrypted_values.strict = false |
|
144 | #rhodecode.encrypted_values.strict = false | |
145 |
|
145 | |||
146 | ## return gzipped responses from Rhodecode (static files/application) |
|
146 | ## return gzipped responses from Rhodecode (static files/application) | |
147 | gzip_responses = false |
|
147 | gzip_responses = false | |
148 |
|
148 | |||
149 | ## autogenerate javascript routes file on startup |
|
149 | ## autogenerate javascript routes file on startup | |
150 | generate_js_files = false |
|
150 | generate_js_files = false | |
151 |
|
151 | |||
152 | ## Optional Languages |
|
152 | ## Optional Languages | |
153 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
153 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh | |
154 | lang = en |
|
154 | lang = en | |
155 |
|
155 | |||
156 | ## perform a full repository scan on each server start, this should be |
|
156 | ## perform a full repository scan on each server start, this should be | |
157 | ## set to false after first startup, to allow faster server restarts. |
|
157 | ## set to false after first startup, to allow faster server restarts. | |
158 | startup.import_repos = false |
|
158 | startup.import_repos = false | |
159 |
|
159 | |||
160 | ## Uncomment and set this path to use archive download cache. |
|
160 | ## Uncomment and set this path to use archive download cache. | |
161 | ## Once enabled, generated archives will be cached at this location |
|
161 | ## Once enabled, generated archives will be cached at this location | |
162 | ## and served from the cache during subsequent requests for the same archive of |
|
162 | ## and served from the cache during subsequent requests for the same archive of | |
163 | ## the repository. |
|
163 | ## the repository. | |
164 | #archive_cache_dir = /tmp/tarballcache |
|
164 | #archive_cache_dir = /tmp/tarballcache | |
165 |
|
165 | |||
166 | ## change this to unique ID for security |
|
166 | ## change this to unique ID for security | |
167 | app_instance_uuid = rc-production |
|
167 | app_instance_uuid = rc-production | |
168 |
|
168 | |||
169 | ## cut off limit for large diffs (size in bytes). If overall diff size on |
|
169 | ## cut off limit for large diffs (size in bytes). If overall diff size on | |
170 | ## commit, or pull request exceeds this limit this diff will be displayed |
|
170 | ## commit, or pull request exceeds this limit this diff will be displayed | |
171 | ## partially. E.g 512000 == 512Kb |
|
171 | ## partially. E.g 512000 == 512Kb | |
172 | cut_off_limit_diff = 512000 |
|
172 | cut_off_limit_diff = 512000 | |
173 |
|
173 | |||
174 | ## cut off limit for large files inside diffs (size in bytes). Each individual |
|
174 | ## cut off limit for large files inside diffs (size in bytes). Each individual | |
175 | ## file inside diff which exceeds this limit will be displayed partially. |
|
175 | ## file inside diff which exceeds this limit will be displayed partially. | |
176 | ## E.g 128000 == 128Kb |
|
176 | ## E.g 128000 == 128Kb | |
177 | cut_off_limit_file = 128000 |
|
177 | cut_off_limit_file = 128000 | |
178 |
|
178 | |||
179 | ## use cache version of scm repo everywhere |
|
179 | ## use cache version of scm repo everywhere | |
180 | vcs_full_cache = true |
|
180 | vcs_full_cache = true | |
181 |
|
181 | |||
182 | ## force https in RhodeCode, fixes https redirects, assumes it's always https |
|
182 | ## force https in RhodeCode, fixes https redirects, assumes it's always https | |
183 | ## Normally this is controlled by proper http flags sent from http server |
|
183 | ## Normally this is controlled by proper http flags sent from http server | |
184 | force_https = false |
|
184 | force_https = false | |
185 |
|
185 | |||
186 | ## use Strict-Transport-Security headers |
|
186 | ## use Strict-Transport-Security headers | |
187 | use_htsts = false |
|
187 | use_htsts = false | |
188 |
|
188 | |||
189 | ## number of commits stats will parse on each iteration |
|
189 | ## number of commits stats will parse on each iteration | |
190 | commit_parse_limit = 25 |
|
190 | commit_parse_limit = 25 | |
191 |
|
191 | |||
192 | ## git rev filter option, --all is the default filter, if you need to |
|
192 | ## git rev filter option, --all is the default filter, if you need to | |
193 | ## hide all refs in changelog switch this to --branches --tags |
|
193 | ## hide all refs in changelog switch this to --branches --tags | |
194 | git_rev_filter = --branches --tags |
|
194 | git_rev_filter = --branches --tags | |
195 |
|
195 | |||
196 | # Set to true if your repos are exposed using the dumb protocol |
|
196 | # Set to true if your repos are exposed using the dumb protocol | |
197 | git_update_server_info = false |
|
197 | git_update_server_info = false | |
198 |
|
198 | |||
199 | ## RSS/ATOM feed options |
|
199 | ## RSS/ATOM feed options | |
200 | rss_cut_off_limit = 256000 |
|
200 | rss_cut_off_limit = 256000 | |
201 | rss_items_per_page = 10 |
|
201 | rss_items_per_page = 10 | |
202 | rss_include_diff = false |
|
202 | rss_include_diff = false | |
203 |
|
203 | |||
204 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
204 | ## gist URL alias, used to create nicer urls for gist. This should be an | |
205 | ## url that does rewrites to _admin/gists/{gistid}. |
|
205 | ## url that does rewrites to _admin/gists/{gistid}. | |
206 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
206 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal | |
207 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
207 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} | |
208 | gist_alias_url = |
|
208 | gist_alias_url = | |
209 |
|
209 | |||
210 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
210 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be | |
211 | ## used for access. |
|
211 | ## used for access. | |
212 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
212 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it | |
213 | ## came from the the logged in user who own this authentication token. |
|
213 | ## came from the the logged in user who own this authentication token. | |
214 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific |
|
214 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific | |
215 | ## authentication token. Such view would be only accessible when used together |
|
215 | ## authentication token. Such view would be only accessible when used together | |
216 | ## with this authentication token |
|
216 | ## with this authentication token | |
217 | ## |
|
217 | ## | |
218 | ## list of all views can be found under `/_admin/permissions/auth_token_access` |
|
218 | ## list of all views can be found under `/_admin/permissions/auth_token_access` | |
219 | ## The list should be "," separated and on a single line. |
|
219 | ## The list should be "," separated and on a single line. | |
220 | ## |
|
220 | ## | |
221 | ## Most common views to enable: |
|
221 | ## Most common views to enable: | |
222 | # RepoCommitsView:repo_commit_download |
|
222 | # RepoCommitsView:repo_commit_download | |
223 | # RepoCommitsView:repo_commit_patch |
|
223 | # RepoCommitsView:repo_commit_patch | |
224 | # RepoCommitsView:repo_commit_raw |
|
224 | # RepoCommitsView:repo_commit_raw | |
225 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
225 | # RepoCommitsView:repo_commit_raw@TOKEN | |
226 | # RepoFilesView:repo_files_diff |
|
226 | # RepoFilesView:repo_files_diff | |
227 | # RepoFilesView:repo_archivefile |
|
227 | # RepoFilesView:repo_archivefile | |
228 | # RepoFilesView:repo_file_raw |
|
228 | # RepoFilesView:repo_file_raw | |
229 | # GistView:* |
|
229 | # GistView:* | |
230 | api_access_controllers_whitelist = |
|
230 | api_access_controllers_whitelist = | |
231 |
|
231 | |||
232 | ## default encoding used to convert from and to unicode |
|
232 | ## default encoding used to convert from and to unicode | |
233 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
233 | ## can be also a comma separated list of encoding in case of mixed encodings | |
234 | default_encoding = UTF-8 |
|
234 | default_encoding = UTF-8 | |
235 |
|
235 | |||
236 | ## instance-id prefix |
|
236 | ## instance-id prefix | |
237 | ## a prefix key for this instance used for cache invalidation when running |
|
237 | ## a prefix key for this instance used for cache invalidation when running | |
238 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
238 | ## multiple instances of rhodecode, make sure it's globally unique for | |
239 | ## all running rhodecode instances. Leave empty if you don't use it |
|
239 | ## all running rhodecode instances. Leave empty if you don't use it | |
240 | instance_id = |
|
240 | instance_id = | |
241 |
|
241 | |||
242 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
242 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage | |
243 | ## of an authentication plugin also if it is disabled by it's settings. |
|
243 | ## of an authentication plugin also if it is disabled by it's settings. | |
244 | ## This could be useful if you are unable to log in to the system due to broken |
|
244 | ## This could be useful if you are unable to log in to the system due to broken | |
245 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
245 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth | |
246 | ## module to log in again and fix the settings. |
|
246 | ## module to log in again and fix the settings. | |
247 | ## |
|
247 | ## | |
248 | ## Available builtin plugin IDs (hash is part of the ID): |
|
248 | ## Available builtin plugin IDs (hash is part of the ID): | |
249 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
249 | ## egg:rhodecode-enterprise-ce#rhodecode | |
250 | ## egg:rhodecode-enterprise-ce#pam |
|
250 | ## egg:rhodecode-enterprise-ce#pam | |
251 | ## egg:rhodecode-enterprise-ce#ldap |
|
251 | ## egg:rhodecode-enterprise-ce#ldap | |
252 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
252 | ## egg:rhodecode-enterprise-ce#jasig_cas | |
253 | ## egg:rhodecode-enterprise-ce#headers |
|
253 | ## egg:rhodecode-enterprise-ce#headers | |
254 | ## egg:rhodecode-enterprise-ce#crowd |
|
254 | ## egg:rhodecode-enterprise-ce#crowd | |
255 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
255 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode | |
256 |
|
256 | |||
257 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
257 | ## alternative return HTTP header for failed authentication. Default HTTP | |
258 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
258 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
259 | ## handling that causing a series of failed authentication calls. |
|
259 | ## handling that causing a series of failed authentication calls. | |
260 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
260 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code | |
261 | ## This will be served instead of default 401 on bad authnetication |
|
261 | ## This will be served instead of default 401 on bad authnetication | |
262 | auth_ret_code = |
|
262 | auth_ret_code = | |
263 |
|
263 | |||
264 | ## use special detection method when serving auth_ret_code, instead of serving |
|
264 | ## use special detection method when serving auth_ret_code, instead of serving | |
265 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
265 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) | |
266 | ## and then serve auth_ret_code to clients |
|
266 | ## and then serve auth_ret_code to clients | |
267 | auth_ret_code_detection = false |
|
267 | auth_ret_code_detection = false | |
268 |
|
268 | |||
269 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
269 | ## locking return code. When repository is locked return this HTTP code. 2XX | |
270 | ## codes don't break the transactions while 4XX codes do |
|
270 | ## codes don't break the transactions while 4XX codes do | |
271 | lock_ret_code = 423 |
|
271 | lock_ret_code = 423 | |
272 |
|
272 | |||
273 | ## allows to change the repository location in settings page |
|
273 | ## allows to change the repository location in settings page | |
274 | allow_repo_location_change = true |
|
274 | allow_repo_location_change = true | |
275 |
|
275 | |||
276 | ## allows to setup custom hooks in settings page |
|
276 | ## allows to setup custom hooks in settings page | |
277 | allow_custom_hooks_settings = true |
|
277 | allow_custom_hooks_settings = true | |
278 |
|
278 | |||
279 | ## generated license token, goto license page in RhodeCode settings to obtain |
|
279 | ## generated license token, goto license page in RhodeCode settings to obtain | |
280 | ## new token |
|
280 | ## new token | |
281 | license_token = |
|
281 | license_token = | |
282 |
|
282 | |||
283 | ## supervisor connection uri, for managing supervisor and logs. |
|
283 | ## supervisor connection uri, for managing supervisor and logs. | |
284 | supervisor.uri = |
|
284 | supervisor.uri = | |
285 | ## supervisord group name/id we only want this RC instance to handle |
|
285 | ## supervisord group name/id we only want this RC instance to handle | |
286 | supervisor.group_id = dev |
|
286 | supervisor.group_id = dev | |
287 |
|
287 | |||
288 | ## Display extended labs settings |
|
288 | ## Display extended labs settings | |
289 | labs_settings_active = true |
|
289 | labs_settings_active = true | |
290 |
|
290 | |||
291 | #################################### |
|
291 | #################################### | |
292 | ### CELERY CONFIG #### |
|
292 | ### CELERY CONFIG #### | |
293 | #################################### |
|
293 | #################################### | |
294 | use_celery = false |
|
294 | use_celery = false | |
295 | broker.host = localhost |
|
295 | broker.host = localhost | |
296 | broker.vhost = rabbitmqhost |
|
296 | broker.vhost = rabbitmqhost | |
297 | broker.port = 5672 |
|
297 | broker.port = 5672 | |
298 | broker.user = rabbitmq |
|
298 | broker.user = rabbitmq | |
299 | broker.password = qweqwe |
|
299 | broker.password = qweqwe | |
300 |
|
300 | |||
301 | celery.imports = rhodecode.lib.celerylib.tasks |
|
301 | celery.imports = rhodecode.lib.celerylib.tasks | |
302 |
|
302 | |||
303 | celery.result.backend = amqp |
|
303 | celery.result.backend = amqp | |
304 | celery.result.dburi = amqp:// |
|
304 | celery.result.dburi = amqp:// | |
305 | celery.result.serialier = json |
|
305 | celery.result.serialier = json | |
306 |
|
306 | |||
307 | #celery.send.task.error.emails = true |
|
307 | #celery.send.task.error.emails = true | |
308 | #celery.amqp.task.result.expires = 18000 |
|
308 | #celery.amqp.task.result.expires = 18000 | |
309 |
|
309 | |||
310 | celeryd.concurrency = 2 |
|
310 | celeryd.concurrency = 2 | |
311 | #celeryd.log.file = celeryd.log |
|
311 | #celeryd.log.file = celeryd.log | |
312 | celeryd.log.level = debug |
|
312 | celeryd.log.level = debug | |
313 | celeryd.max.tasks.per.child = 1 |
|
313 | celeryd.max.tasks.per.child = 1 | |
314 |
|
314 | |||
315 | ## tasks will never be sent to the queue, but executed locally instead. |
|
315 | ## tasks will never be sent to the queue, but executed locally instead. | |
316 | celery.always.eager = false |
|
316 | celery.always.eager = false | |
317 |
|
317 | |||
318 | #################################### |
|
318 | #################################### | |
319 | ### BEAKER CACHE #### |
|
319 | ### BEAKER CACHE #### | |
320 | #################################### |
|
320 | #################################### | |
321 | # default cache dir for templates. Putting this into a ramdisk |
|
321 | # default cache dir for templates. Putting this into a ramdisk | |
322 | ## can boost performance, eg. %(here)s/data_ramdisk |
|
322 | ## can boost performance, eg. %(here)s/data_ramdisk | |
323 | cache_dir = %(here)s/data |
|
323 | cache_dir = %(here)s/data | |
324 |
|
324 | |||
325 | ## locking and default file storage for Beaker. Putting this into a ramdisk |
|
325 | ## locking and default file storage for Beaker. Putting this into a ramdisk | |
326 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data |
|
326 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data | |
327 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data |
|
327 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data | |
328 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock |
|
328 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock | |
329 |
|
329 | |||
330 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long |
|
330 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long | |
331 |
|
331 | |||
332 | beaker.cache.super_short_term.type = memory |
|
332 | beaker.cache.super_short_term.type = memory | |
333 | beaker.cache.super_short_term.expire = 10 |
|
333 | beaker.cache.super_short_term.expire = 10 | |
334 | beaker.cache.super_short_term.key_length = 256 |
|
334 | beaker.cache.super_short_term.key_length = 256 | |
335 |
|
335 | |||
336 | beaker.cache.short_term.type = memory |
|
336 | beaker.cache.short_term.type = memory | |
337 | beaker.cache.short_term.expire = 60 |
|
337 | beaker.cache.short_term.expire = 60 | |
338 | beaker.cache.short_term.key_length = 256 |
|
338 | beaker.cache.short_term.key_length = 256 | |
339 |
|
339 | |||
340 | beaker.cache.long_term.type = memory |
|
340 | beaker.cache.long_term.type = memory | |
341 | beaker.cache.long_term.expire = 36000 |
|
341 | beaker.cache.long_term.expire = 36000 | |
342 | beaker.cache.long_term.key_length = 256 |
|
342 | beaker.cache.long_term.key_length = 256 | |
343 |
|
343 | |||
344 | beaker.cache.sql_cache_short.type = memory |
|
344 | beaker.cache.sql_cache_short.type = memory | |
345 | beaker.cache.sql_cache_short.expire = 10 |
|
345 | beaker.cache.sql_cache_short.expire = 10 | |
346 | beaker.cache.sql_cache_short.key_length = 256 |
|
346 | beaker.cache.sql_cache_short.key_length = 256 | |
347 |
|
347 | |||
348 | ## default is memory cache, configure only if required |
|
348 | ## default is memory cache, configure only if required | |
349 | ## using multi-node or multi-worker setup |
|
349 | ## using multi-node or multi-worker setup | |
350 | #beaker.cache.auth_plugins.type = ext:database |
|
350 | #beaker.cache.auth_plugins.type = ext:database | |
351 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock |
|
351 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock | |
352 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode |
|
352 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode | |
353 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode |
|
353 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode | |
354 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 |
|
354 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 | |
355 | #beaker.cache.auth_plugins.sa.pool_size = 10 |
|
355 | #beaker.cache.auth_plugins.sa.pool_size = 10 | |
356 | #beaker.cache.auth_plugins.sa.max_overflow = 0 |
|
356 | #beaker.cache.auth_plugins.sa.max_overflow = 0 | |
357 |
|
357 | |||
358 | beaker.cache.repo_cache_long.type = memorylru_base |
|
358 | beaker.cache.repo_cache_long.type = memorylru_base | |
359 | beaker.cache.repo_cache_long.max_items = 4096 |
|
359 | beaker.cache.repo_cache_long.max_items = 4096 | |
360 | beaker.cache.repo_cache_long.expire = 2592000 |
|
360 | beaker.cache.repo_cache_long.expire = 2592000 | |
361 |
|
361 | |||
362 | ## default is memorylru_base cache, configure only if required |
|
362 | ## default is memorylru_base cache, configure only if required | |
363 | ## using multi-node or multi-worker setup |
|
363 | ## using multi-node or multi-worker setup | |
364 | #beaker.cache.repo_cache_long.type = ext:memcached |
|
364 | #beaker.cache.repo_cache_long.type = ext:memcached | |
365 | #beaker.cache.repo_cache_long.url = localhost:11211 |
|
365 | #beaker.cache.repo_cache_long.url = localhost:11211 | |
366 | #beaker.cache.repo_cache_long.expire = 1209600 |
|
366 | #beaker.cache.repo_cache_long.expire = 1209600 | |
367 | #beaker.cache.repo_cache_long.key_length = 256 |
|
367 | #beaker.cache.repo_cache_long.key_length = 256 | |
368 |
|
368 | |||
369 | #################################### |
|
369 | #################################### | |
370 | ### BEAKER SESSION #### |
|
370 | ### BEAKER SESSION #### | |
371 | #################################### |
|
371 | #################################### | |
372 |
|
372 | |||
373 | ## .session.type is type of storage options for the session, current allowed |
|
373 | ## .session.type is type of storage options for the session, current allowed | |
374 | ## types are file, ext:memcached, ext:database, and memory (default). |
|
374 | ## types are file, ext:memcached, ext:database, and memory (default). | |
375 | beaker.session.type = file |
|
375 | beaker.session.type = file | |
376 | beaker.session.data_dir = %(here)s/data/sessions/data |
|
376 | beaker.session.data_dir = %(here)s/data/sessions/data | |
377 |
|
377 | |||
378 | ## db based session, fast, and allows easy management over logged in users |
|
378 | ## db based session, fast, and allows easy management over logged in users | |
379 | #beaker.session.type = ext:database |
|
379 | #beaker.session.type = ext:database | |
380 | #beaker.session.table_name = db_session |
|
380 | #beaker.session.table_name = db_session | |
381 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
381 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode | |
382 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
382 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode | |
383 | #beaker.session.sa.pool_recycle = 3600 |
|
383 | #beaker.session.sa.pool_recycle = 3600 | |
384 | #beaker.session.sa.echo = false |
|
384 | #beaker.session.sa.echo = false | |
385 |
|
385 | |||
386 | beaker.session.key = rhodecode |
|
386 | beaker.session.key = rhodecode | |
387 | beaker.session.secret = develop-rc-uytcxaz |
|
387 | beaker.session.secret = develop-rc-uytcxaz | |
388 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
388 | beaker.session.lock_dir = %(here)s/data/sessions/lock | |
389 |
|
389 | |||
390 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
390 | ## Secure encrypted cookie. Requires AES and AES python libraries | |
391 | ## you must disable beaker.session.secret to use this |
|
391 | ## you must disable beaker.session.secret to use this | |
392 | #beaker.session.encrypt_key = key_for_encryption |
|
392 | #beaker.session.encrypt_key = key_for_encryption | |
393 | #beaker.session.validate_key = validation_key |
|
393 | #beaker.session.validate_key = validation_key | |
394 |
|
394 | |||
395 | ## sets session as invalid(also logging out user) if it haven not been |
|
395 | ## sets session as invalid(also logging out user) if it haven not been | |
396 | ## accessed for given amount of time in seconds |
|
396 | ## accessed for given amount of time in seconds | |
397 | beaker.session.timeout = 2592000 |
|
397 | beaker.session.timeout = 2592000 | |
398 | beaker.session.httponly = true |
|
398 | beaker.session.httponly = true | |
399 | ## Path to use for the cookie. Set to prefix if you use prefix middleware |
|
399 | ## Path to use for the cookie. Set to prefix if you use prefix middleware | |
400 | #beaker.session.cookie_path = /custom_prefix |
|
400 | #beaker.session.cookie_path = /custom_prefix | |
401 |
|
401 | |||
402 | ## uncomment for https secure cookie |
|
402 | ## uncomment for https secure cookie | |
403 | beaker.session.secure = false |
|
403 | beaker.session.secure = false | |
404 |
|
404 | |||
405 | ## auto save the session to not to use .save() |
|
405 | ## auto save the session to not to use .save() | |
406 | beaker.session.auto = false |
|
406 | beaker.session.auto = false | |
407 |
|
407 | |||
408 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
408 | ## default cookie expiration time in seconds, set to `true` to set expire | |
409 | ## at browser close |
|
409 | ## at browser close | |
410 | #beaker.session.cookie_expires = 3600 |
|
410 | #beaker.session.cookie_expires = 3600 | |
411 |
|
411 | |||
412 | ################################### |
|
412 | ################################### | |
413 | ## SEARCH INDEXING CONFIGURATION ## |
|
413 | ## SEARCH INDEXING CONFIGURATION ## | |
414 | ################################### |
|
414 | ################################### | |
415 | ## Full text search indexer is available in rhodecode-tools under |
|
415 | ## Full text search indexer is available in rhodecode-tools under | |
416 | ## `rhodecode-tools index` command |
|
416 | ## `rhodecode-tools index` command | |
417 |
|
417 | |||
418 | ## WHOOSH Backend, doesn't require additional services to run |
|
418 | ## WHOOSH Backend, doesn't require additional services to run | |
419 | ## it works good with few dozen repos |
|
419 | ## it works good with few dozen repos | |
420 | search.module = rhodecode.lib.index.whoosh |
|
420 | search.module = rhodecode.lib.index.whoosh | |
421 | search.location = %(here)s/data/index |
|
421 | search.location = %(here)s/data/index | |
422 |
|
422 | |||
423 | ######################################## |
|
423 | ######################################## | |
424 | ### CHANNELSTREAM CONFIG #### |
|
424 | ### CHANNELSTREAM CONFIG #### | |
425 | ######################################## |
|
425 | ######################################## | |
426 | ## channelstream enables persistent connections and live notification |
|
426 | ## channelstream enables persistent connections and live notification | |
427 | ## in the system. It's also used by the chat system |
|
427 | ## in the system. It's also used by the chat system | |
428 | channelstream.enabled = false |
|
428 | channelstream.enabled = false | |
429 |
|
429 | |||
430 | ## server address for channelstream server on the backend |
|
430 | ## server address for channelstream server on the backend | |
431 | channelstream.server = 127.0.0.1:9800 |
|
431 | channelstream.server = 127.0.0.1:9800 | |
432 |
|
432 | |||
433 | ## location of the channelstream server from outside world |
|
433 | ## location of the channelstream server from outside world | |
434 | ## use ws:// for http or wss:// for https. This address needs to be handled |
|
434 | ## use ws:// for http or wss:// for https. This address needs to be handled | |
435 | ## by external HTTP server such as Nginx or Apache |
|
435 | ## by external HTTP server such as Nginx or Apache | |
436 | ## see nginx/apache configuration examples in our docs |
|
436 | ## see nginx/apache configuration examples in our docs | |
437 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
437 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
438 | channelstream.secret = secret |
|
438 | channelstream.secret = secret | |
439 | channelstream.history.location = %(here)s/channelstream_history |
|
439 | channelstream.history.location = %(here)s/channelstream_history | |
440 |
|
440 | |||
441 | ## Internal application path that Javascript uses to connect into. |
|
441 | ## Internal application path that Javascript uses to connect into. | |
442 | ## If you use proxy-prefix the prefix should be added before /_channelstream |
|
442 | ## If you use proxy-prefix the prefix should be added before /_channelstream | |
443 | channelstream.proxy_path = /_channelstream |
|
443 | channelstream.proxy_path = /_channelstream | |
444 |
|
444 | |||
445 |
|
445 | |||
446 | ################################### |
|
446 | ################################### | |
447 | ## APPENLIGHT CONFIG ## |
|
447 | ## APPENLIGHT CONFIG ## | |
448 | ################################### |
|
448 | ################################### | |
449 |
|
449 | |||
450 | ## Appenlight is tailored to work with RhodeCode, see |
|
450 | ## Appenlight is tailored to work with RhodeCode, see | |
451 | ## http://appenlight.com for details how to obtain an account |
|
451 | ## http://appenlight.com for details how to obtain an account | |
452 |
|
452 | |||
453 | ## appenlight integration enabled |
|
453 | ## appenlight integration enabled | |
454 | appenlight = false |
|
454 | appenlight = false | |
455 |
|
455 | |||
456 | appenlight.server_url = https://api.appenlight.com |
|
456 | appenlight.server_url = https://api.appenlight.com | |
457 | appenlight.api_key = YOUR_API_KEY |
|
457 | appenlight.api_key = YOUR_API_KEY | |
458 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
458 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 | |
459 |
|
459 | |||
460 | # used for JS client |
|
460 | # used for JS client | |
461 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
461 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY | |
462 |
|
462 | |||
463 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
463 | ## TWEAK AMOUNT OF INFO SENT HERE | |
464 |
|
464 | |||
465 | ## enables 404 error logging (default False) |
|
465 | ## enables 404 error logging (default False) | |
466 | appenlight.report_404 = false |
|
466 | appenlight.report_404 = false | |
467 |
|
467 | |||
468 | ## time in seconds after request is considered being slow (default 1) |
|
468 | ## time in seconds after request is considered being slow (default 1) | |
469 | appenlight.slow_request_time = 1 |
|
469 | appenlight.slow_request_time = 1 | |
470 |
|
470 | |||
471 | ## record slow requests in application |
|
471 | ## record slow requests in application | |
472 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
472 | ## (needs to be enabled for slow datastore recording and time tracking) | |
473 | appenlight.slow_requests = true |
|
473 | appenlight.slow_requests = true | |
474 |
|
474 | |||
475 | ## enable hooking to application loggers |
|
475 | ## enable hooking to application loggers | |
476 | appenlight.logging = true |
|
476 | appenlight.logging = true | |
477 |
|
477 | |||
478 | ## minimum log level for log capture |
|
478 | ## minimum log level for log capture | |
479 | appenlight.logging.level = WARNING |
|
479 | appenlight.logging.level = WARNING | |
480 |
|
480 | |||
481 | ## send logs only from erroneous/slow requests |
|
481 | ## send logs only from erroneous/slow requests | |
482 | ## (saves API quota for intensive logging) |
|
482 | ## (saves API quota for intensive logging) | |
483 | appenlight.logging_on_error = false |
|
483 | appenlight.logging_on_error = false | |
484 |
|
484 | |||
485 | ## list of additonal keywords that should be grabbed from environ object |
|
485 | ## list of additonal keywords that should be grabbed from environ object | |
486 | ## can be string with comma separated list of words in lowercase |
|
486 | ## can be string with comma separated list of words in lowercase | |
487 | ## (by default client will always send following info: |
|
487 | ## (by default client will always send following info: | |
488 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
488 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that | |
489 | ## start with HTTP* this list be extended with additional keywords here |
|
489 | ## start with HTTP* this list be extended with additional keywords here | |
490 | appenlight.environ_keys_whitelist = |
|
490 | appenlight.environ_keys_whitelist = | |
491 |
|
491 | |||
492 | ## list of keywords that should be blanked from request object |
|
492 | ## list of keywords that should be blanked from request object | |
493 | ## can be string with comma separated list of words in lowercase |
|
493 | ## can be string with comma separated list of words in lowercase | |
494 | ## (by default client will always blank keys that contain following words |
|
494 | ## (by default client will always blank keys that contain following words | |
495 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
495 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' | |
496 | ## this list be extended with additional keywords set here |
|
496 | ## this list be extended with additional keywords set here | |
497 | appenlight.request_keys_blacklist = |
|
497 | appenlight.request_keys_blacklist = | |
498 |
|
498 | |||
499 | ## list of namespaces that should be ignores when gathering log entries |
|
499 | ## list of namespaces that should be ignores when gathering log entries | |
500 | ## can be string with comma separated list of namespaces |
|
500 | ## can be string with comma separated list of namespaces | |
501 | ## (by default the client ignores own entries: appenlight_client.client) |
|
501 | ## (by default the client ignores own entries: appenlight_client.client) | |
502 | appenlight.log_namespace_blacklist = |
|
502 | appenlight.log_namespace_blacklist = | |
503 |
|
503 | |||
504 |
|
504 | |||
505 | ################################################################################ |
|
505 | ################################################################################ | |
506 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
506 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
507 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
507 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
508 | ## execute malicious code after an exception is raised. ## |
|
508 | ## execute malicious code after an exception is raised. ## | |
509 | ################################################################################ |
|
509 | ################################################################################ | |
510 | #set debug = false |
|
510 | #set debug = false | |
511 |
|
511 | |||
512 |
|
512 | |||
513 | ############## |
|
513 | ############## | |
514 | ## STYLING ## |
|
514 | ## STYLING ## | |
515 | ############## |
|
515 | ############## | |
516 | debug_style = true |
|
516 | debug_style = true | |
517 |
|
517 | |||
518 | ########################################### |
|
518 | ########################################### | |
519 | ### MAIN RHODECODE DATABASE CONFIG ### |
|
519 | ### MAIN RHODECODE DATABASE CONFIG ### | |
520 | ########################################### |
|
520 | ########################################### | |
521 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
521 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
522 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
522 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
523 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode |
|
523 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode | |
524 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
524 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
525 |
|
525 | |||
526 | # see sqlalchemy docs for other advanced settings |
|
526 | # see sqlalchemy docs for other advanced settings | |
527 |
|
527 | |||
528 | ## print the sql statements to output |
|
528 | ## print the sql statements to output | |
529 | sqlalchemy.db1.echo = false |
|
529 | sqlalchemy.db1.echo = false | |
530 | ## recycle the connections after this amount of seconds |
|
530 | ## recycle the connections after this amount of seconds | |
531 | sqlalchemy.db1.pool_recycle = 3600 |
|
531 | sqlalchemy.db1.pool_recycle = 3600 | |
532 | sqlalchemy.db1.convert_unicode = true |
|
532 | sqlalchemy.db1.convert_unicode = true | |
533 |
|
533 | |||
534 | ## the number of connections to keep open inside the connection pool. |
|
534 | ## the number of connections to keep open inside the connection pool. | |
535 | ## 0 indicates no limit |
|
535 | ## 0 indicates no limit | |
536 | #sqlalchemy.db1.pool_size = 5 |
|
536 | #sqlalchemy.db1.pool_size = 5 | |
537 |
|
537 | |||
538 | ## the number of connections to allow in connection pool "overflow", that is |
|
538 | ## the number of connections to allow in connection pool "overflow", that is | |
539 | ## connections that can be opened above and beyond the pool_size setting, |
|
539 | ## connections that can be opened above and beyond the pool_size setting, | |
540 | ## which defaults to five. |
|
540 | ## which defaults to five. | |
541 | #sqlalchemy.db1.max_overflow = 10 |
|
541 | #sqlalchemy.db1.max_overflow = 10 | |
542 |
|
542 | |||
543 |
|
543 | |||
544 | ################## |
|
544 | ################## | |
545 | ### VCS CONFIG ### |
|
545 | ### VCS CONFIG ### | |
546 | ################## |
|
546 | ################## | |
547 | vcs.server.enable = true |
|
547 | vcs.server.enable = true | |
548 | vcs.server = localhost:9900 |
|
548 | vcs.server = localhost:9900 | |
549 |
|
549 | |||
550 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
550 | ## Web server connectivity protocol, responsible for web based VCS operatations | |
551 | ## Available protocols are: |
|
551 | ## Available protocols are: | |
552 | ## `http` - use http-rpc backend (default) |
|
552 | ## `http` - use http-rpc backend (default) | |
553 | vcs.server.protocol = http |
|
553 | vcs.server.protocol = http | |
554 |
|
554 | |||
555 | ## Push/Pull operations protocol, available options are: |
|
555 | ## Push/Pull operations protocol, available options are: | |
556 | ## `http` - use http-rpc backend (default) |
|
556 | ## `http` - use http-rpc backend (default) | |
557 | ## |
|
557 | ## | |
558 | vcs.scm_app_implementation = http |
|
558 | vcs.scm_app_implementation = http | |
559 |
|
559 | |||
560 | ## Push/Pull operations hooks protocol, available options are: |
|
560 | ## Push/Pull operations hooks protocol, available options are: | |
561 | ## `http` - use http-rpc backend (default) |
|
561 | ## `http` - use http-rpc backend (default) | |
562 | vcs.hooks.protocol = http |
|
562 | vcs.hooks.protocol = http | |
563 |
|
563 | |||
564 | vcs.server.log_level = debug |
|
564 | vcs.server.log_level = debug | |
565 | ## Start VCSServer with this instance as a subprocess, usefull for development |
|
565 | ## Start VCSServer with this instance as a subprocess, usefull for development | |
566 | vcs.start_server = true |
|
566 | vcs.start_server = true | |
567 |
|
567 | |||
568 | ## List of enabled VCS backends, available options are: |
|
568 | ## List of enabled VCS backends, available options are: | |
569 | ## `hg` - mercurial |
|
569 | ## `hg` - mercurial | |
570 | ## `git` - git |
|
570 | ## `git` - git | |
571 | ## `svn` - subversion |
|
571 | ## `svn` - subversion | |
572 | vcs.backends = hg, git, svn |
|
572 | vcs.backends = hg, git, svn | |
573 |
|
573 | |||
574 | vcs.connection_timeout = 3600 |
|
574 | vcs.connection_timeout = 3600 | |
575 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
575 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. | |
576 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
576 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible | |
577 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
577 | #vcs.svn.compatible_version = pre-1.8-compatible | |
578 |
|
578 | |||
579 |
|
579 | |||
580 | ############################################################ |
|
580 | ############################################################ | |
581 | ### Subversion proxy support (mod_dav_svn) ### |
|
581 | ### Subversion proxy support (mod_dav_svn) ### | |
582 | ### Maps RhodeCode repo groups into SVN paths for Apache ### |
|
582 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |
583 | ############################################################ |
|
583 | ############################################################ | |
584 | ## Enable or disable the config file generation. |
|
584 | ## Enable or disable the config file generation. | |
585 | svn.proxy.generate_config = false |
|
585 | svn.proxy.generate_config = false | |
586 | ## Generate config file with `SVNListParentPath` set to `On`. |
|
586 | ## Generate config file with `SVNListParentPath` set to `On`. | |
587 | svn.proxy.list_parent_path = true |
|
587 | svn.proxy.list_parent_path = true | |
588 | ## Set location and file name of generated config file. |
|
588 | ## Set location and file name of generated config file. | |
589 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf |
|
589 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
590 | ## alternative mod_dav config template. This needs to be a mako template | |||
|
591 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako | |||
590 | ## Used as a prefix to the `Location` block in the generated config file. |
|
592 | ## Used as a prefix to the `Location` block in the generated config file. | |
591 | ## In most cases it should be set to `/`. |
|
593 | ## In most cases it should be set to `/`. | |
592 | svn.proxy.location_root = / |
|
594 | svn.proxy.location_root = / | |
593 | ## Command to reload the mod dav svn configuration on change. |
|
595 | ## Command to reload the mod dav svn configuration on change. | |
594 | ## Example: `/etc/init.d/apache2 reload` |
|
596 | ## Example: `/etc/init.d/apache2 reload` | |
595 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
597 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
596 | ## If the timeout expires before the reload command finishes, the command will |
|
598 | ## If the timeout expires before the reload command finishes, the command will | |
597 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
599 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
598 | #svn.proxy.reload_timeout = 10 |
|
600 | #svn.proxy.reload_timeout = 10 | |
599 |
|
601 | |||
600 | ############################################################ |
|
602 | ############################################################ | |
601 | ### SSH Support Settings ### |
|
603 | ### SSH Support Settings ### | |
602 | ############################################################ |
|
604 | ############################################################ | |
603 |
|
605 | |||
604 | ## Defines if a custom authorized_keys file should be created and written on |
|
606 | ## Defines if a custom authorized_keys file should be created and written on | |
605 | ## any change user ssh keys. Setting this to false also disables posibility |
|
607 | ## any change user ssh keys. Setting this to false also disables posibility | |
606 | ## of adding SSH keys by users from web interface. Super admins can still |
|
608 | ## of adding SSH keys by users from web interface. Super admins can still | |
607 | ## manage SSH Keys. |
|
609 | ## manage SSH Keys. | |
608 | ssh.generate_authorized_keyfile = false |
|
610 | ssh.generate_authorized_keyfile = false | |
609 |
|
611 | |||
610 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
612 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` | |
611 | # ssh.authorized_keys_ssh_opts = |
|
613 | # ssh.authorized_keys_ssh_opts = | |
612 |
|
614 | |||
613 | ## Path to the authrozied_keys file where the generate entries are placed. |
|
615 | ## Path to the authrozied_keys file where the generate entries are placed. | |
614 | ## It is possible to have multiple key files specified in `sshd_config` e.g. |
|
616 | ## It is possible to have multiple key files specified in `sshd_config` e.g. | |
615 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
617 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode | |
616 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode |
|
618 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode | |
617 |
|
619 | |||
618 | ## Command to execute the SSH wrapper. The binary is available in the |
|
620 | ## Command to execute the SSH wrapper. The binary is available in the | |
619 | ## rhodecode installation directory. |
|
621 | ## rhodecode installation directory. | |
620 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper |
|
622 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper | |
621 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper |
|
623 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper | |
622 |
|
624 | |||
623 | ## Allow shell when executing the ssh-wrapper command |
|
625 | ## Allow shell when executing the ssh-wrapper command | |
624 | ssh.wrapper_cmd_allow_shell = false |
|
626 | ssh.wrapper_cmd_allow_shell = false | |
625 |
|
627 | |||
626 | ## Enables logging, and detailed output send back to the client during SSH |
|
628 | ## Enables logging, and detailed output send back to the client during SSH | |
627 | ## operations. Usefull for debugging, shouldn't be used in production. |
|
629 | ## operations. Usefull for debugging, shouldn't be used in production. | |
628 | ssh.enable_debug_logging = true |
|
630 | ssh.enable_debug_logging = true | |
629 |
|
631 | |||
630 | ## API KEY for user who has access to fetch other user permission information |
|
632 | ## API KEY for user who has access to fetch other user permission information | |
631 | ## most likely an super-admin account with some IP restrictions. |
|
633 | ## most likely an super-admin account with some IP restrictions. | |
632 | ssh.api_key = |
|
634 | ssh.api_key = | |
633 |
|
635 | |||
634 | ## API Host, the server address of RhodeCode instance that the api_key will |
|
636 | ## API Host, the server address of RhodeCode instance that the api_key will | |
635 | ## access |
|
637 | ## access | |
636 | ssh.api_host = http://localhost |
|
638 | ssh.api_host = http://localhost | |
637 |
|
639 | |||
638 | ## Paths to binary executable, by default they are the names, but we can |
|
640 | ## Paths to binary executable, by default they are the names, but we can | |
639 | ## override them if we want to use a custom one |
|
641 | ## override them if we want to use a custom one | |
640 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg |
|
642 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg | |
641 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git |
|
643 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git | |
642 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve |
|
644 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve | |
643 |
|
645 | |||
644 |
|
646 | |||
645 | ## Dummy marker to add new entries after. |
|
647 | ## Dummy marker to add new entries after. | |
646 | ## Add any custom entries below. Please don't remove. |
|
648 | ## Add any custom entries below. Please don't remove. | |
647 | custom.conf = 1 |
|
649 | custom.conf = 1 | |
648 |
|
650 | |||
649 |
|
651 | |||
650 | ################################ |
|
652 | ################################ | |
651 | ### LOGGING CONFIGURATION #### |
|
653 | ### LOGGING CONFIGURATION #### | |
652 | ################################ |
|
654 | ################################ | |
653 | [loggers] |
|
655 | [loggers] | |
654 | keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper |
|
656 | keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper | |
655 |
|
657 | |||
656 | [handlers] |
|
658 | [handlers] | |
657 | keys = console, console_sql |
|
659 | keys = console, console_sql | |
658 |
|
660 | |||
659 | [formatters] |
|
661 | [formatters] | |
660 | keys = generic, color_formatter, color_formatter_sql |
|
662 | keys = generic, color_formatter, color_formatter_sql | |
661 |
|
663 | |||
662 | ############# |
|
664 | ############# | |
663 | ## LOGGERS ## |
|
665 | ## LOGGERS ## | |
664 | ############# |
|
666 | ############# | |
665 | [logger_root] |
|
667 | [logger_root] | |
666 | level = NOTSET |
|
668 | level = NOTSET | |
667 | handlers = console |
|
669 | handlers = console | |
668 |
|
670 | |||
669 | [logger_sqlalchemy] |
|
671 | [logger_sqlalchemy] | |
670 | level = INFO |
|
672 | level = INFO | |
671 | handlers = console_sql |
|
673 | handlers = console_sql | |
672 | qualname = sqlalchemy.engine |
|
674 | qualname = sqlalchemy.engine | |
673 | propagate = 0 |
|
675 | propagate = 0 | |
674 |
|
676 | |||
675 | [logger_beaker] |
|
677 | [logger_beaker] | |
676 | level = DEBUG |
|
678 | level = DEBUG | |
677 | handlers = |
|
679 | handlers = | |
678 | qualname = beaker.container |
|
680 | qualname = beaker.container | |
679 | propagate = 1 |
|
681 | propagate = 1 | |
680 |
|
682 | |||
681 | [logger_rhodecode] |
|
683 | [logger_rhodecode] | |
682 | level = DEBUG |
|
684 | level = DEBUG | |
683 | handlers = |
|
685 | handlers = | |
684 | qualname = rhodecode |
|
686 | qualname = rhodecode | |
685 | propagate = 1 |
|
687 | propagate = 1 | |
686 |
|
688 | |||
687 | [logger_ssh_wrapper] |
|
689 | [logger_ssh_wrapper] | |
688 | level = DEBUG |
|
690 | level = DEBUG | |
689 | handlers = |
|
691 | handlers = | |
690 | qualname = ssh_wrapper |
|
692 | qualname = ssh_wrapper | |
691 | propagate = 1 |
|
693 | propagate = 1 | |
692 |
|
694 | |||
693 |
|
695 | |||
694 | ############## |
|
696 | ############## | |
695 | ## HANDLERS ## |
|
697 | ## HANDLERS ## | |
696 | ############## |
|
698 | ############## | |
697 |
|
699 | |||
698 | [handler_console] |
|
700 | [handler_console] | |
699 | class = StreamHandler |
|
701 | class = StreamHandler | |
700 | args = (sys.stderr, ) |
|
702 | args = (sys.stderr, ) | |
701 | level = DEBUG |
|
703 | level = DEBUG | |
702 | formatter = color_formatter |
|
704 | formatter = color_formatter | |
703 |
|
705 | |||
704 | [handler_console_sql] |
|
706 | [handler_console_sql] | |
705 | class = StreamHandler |
|
707 | class = StreamHandler | |
706 | args = (sys.stderr, ) |
|
708 | args = (sys.stderr, ) | |
707 | level = DEBUG |
|
709 | level = DEBUG | |
708 | formatter = color_formatter_sql |
|
710 | formatter = color_formatter_sql | |
709 |
|
711 | |||
710 | ################ |
|
712 | ################ | |
711 | ## FORMATTERS ## |
|
713 | ## FORMATTERS ## | |
712 | ################ |
|
714 | ################ | |
713 |
|
715 | |||
714 | [formatter_generic] |
|
716 | [formatter_generic] | |
715 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
717 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
716 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
718 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
717 | datefmt = %Y-%m-%d %H:%M:%S |
|
719 | datefmt = %Y-%m-%d %H:%M:%S | |
718 |
|
720 | |||
719 | [formatter_color_formatter] |
|
721 | [formatter_color_formatter] | |
720 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
722 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
721 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
723 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
722 | datefmt = %Y-%m-%d %H:%M:%S |
|
724 | datefmt = %Y-%m-%d %H:%M:%S | |
723 |
|
725 | |||
724 | [formatter_color_formatter_sql] |
|
726 | [formatter_color_formatter_sql] | |
725 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
727 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
726 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
728 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
727 | datefmt = %Y-%m-%d %H:%M:%S |
|
729 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,696 +1,698 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | ################################################################################ |
|
3 | ################################################################################ | |
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## |
|
4 | ## RHODECODE COMMUNITY EDITION CONFIGURATION ## | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 |
|
10 | |||
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## EMAIL CONFIGURATION ## |
|
12 | ## EMAIL CONFIGURATION ## | |
13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | ## Uncomment and replace with the email address which should receive ## | |
14 | ## any error reports after an application crash ## |
|
14 | ## any error reports after an application crash ## | |
15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | ## Additionally these settings will be used by the RhodeCode mailing system ## | |
16 | ################################################################################ |
|
16 | ################################################################################ | |
17 |
|
17 | |||
18 | ## prefix all emails subjects with given prefix, helps filtering out emails |
|
18 | ## prefix all emails subjects with given prefix, helps filtering out emails | |
19 | #email_prefix = [RhodeCode] |
|
19 | #email_prefix = [RhodeCode] | |
20 |
|
20 | |||
21 | ## email FROM address all mails will be sent |
|
21 | ## email FROM address all mails will be sent | |
22 | #app_email_from = rhodecode-noreply@localhost |
|
22 | #app_email_from = rhodecode-noreply@localhost | |
23 |
|
23 | |||
24 | ## Uncomment and replace with the address which should receive any error report |
|
24 | ## Uncomment and replace with the address which should receive any error report | |
25 | ## note: using appenlight for error handling doesn't need this to be uncommented |
|
25 | ## note: using appenlight for error handling doesn't need this to be uncommented | |
26 | #email_to = admin@localhost |
|
26 | #email_to = admin@localhost | |
27 |
|
27 | |||
28 | ## in case of Application errors, sent an error email form |
|
28 | ## in case of Application errors, sent an error email form | |
29 | #error_email_from = rhodecode_error@localhost |
|
29 | #error_email_from = rhodecode_error@localhost | |
30 |
|
30 | |||
31 | ## additional error message to be send in case of server crash |
|
31 | ## additional error message to be send in case of server crash | |
32 | #error_message = |
|
32 | #error_message = | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | #smtp_server = mail.server.com |
|
35 | #smtp_server = mail.server.com | |
36 | #smtp_username = |
|
36 | #smtp_username = | |
37 | #smtp_password = |
|
37 | #smtp_password = | |
38 | #smtp_port = |
|
38 | #smtp_port = | |
39 | #smtp_use_tls = false |
|
39 | #smtp_use_tls = false | |
40 | #smtp_use_ssl = true |
|
40 | #smtp_use_ssl = true | |
41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
42 | #smtp_auth = |
|
42 | #smtp_auth = | |
43 |
|
43 | |||
44 | [server:main] |
|
44 | [server:main] | |
45 | ## COMMON ## |
|
45 | ## COMMON ## | |
46 | host = 127.0.0.1 |
|
46 | host = 127.0.0.1 | |
47 | port = 5000 |
|
47 | port = 5000 | |
48 |
|
48 | |||
49 | ################################## |
|
49 | ################################## | |
50 | ## WAITRESS WSGI SERVER ## |
|
50 | ## WAITRESS WSGI SERVER ## | |
51 | ## Recommended for Development ## |
|
51 | ## Recommended for Development ## | |
52 | ################################## |
|
52 | ################################## | |
53 |
|
53 | |||
54 | #use = egg:waitress#main |
|
54 | #use = egg:waitress#main | |
55 | ## number of worker threads |
|
55 | ## number of worker threads | |
56 | #threads = 5 |
|
56 | #threads = 5 | |
57 | ## MAX BODY SIZE 100GB |
|
57 | ## MAX BODY SIZE 100GB | |
58 | #max_request_body_size = 107374182400 |
|
58 | #max_request_body_size = 107374182400 | |
59 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
59 | ## Use poll instead of select, fixes file descriptors limits problems. | |
60 | ## May not work on old windows systems. |
|
60 | ## May not work on old windows systems. | |
61 | #asyncore_use_poll = true |
|
61 | #asyncore_use_poll = true | |
62 |
|
62 | |||
63 |
|
63 | |||
64 | ########################## |
|
64 | ########################## | |
65 | ## GUNICORN WSGI SERVER ## |
|
65 | ## GUNICORN WSGI SERVER ## | |
66 | ########################## |
|
66 | ########################## | |
67 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
67 | ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini | |
68 |
|
68 | |||
69 | use = egg:gunicorn#main |
|
69 | use = egg:gunicorn#main | |
70 | ## Sets the number of process workers. You must set `instance_id = *` |
|
70 | ## Sets the number of process workers. You must set `instance_id = *` | |
71 | ## when this option is set to more than one worker, recommended |
|
71 | ## when this option is set to more than one worker, recommended | |
72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers |
|
72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers | |
73 | ## The `instance_id = *` must be set in the [app:main] section below |
|
73 | ## The `instance_id = *` must be set in the [app:main] section below | |
74 | workers = 2 |
|
74 | workers = 2 | |
75 | ## number of threads for each of the worker, must be set to 1 for gevent |
|
75 | ## number of threads for each of the worker, must be set to 1 for gevent | |
76 | ## generally recommended to be at 1 |
|
76 | ## generally recommended to be at 1 | |
77 | #threads = 1 |
|
77 | #threads = 1 | |
78 | ## process name |
|
78 | ## process name | |
79 | proc_name = rhodecode |
|
79 | proc_name = rhodecode | |
80 | ## type of worker class, one of sync, gevent |
|
80 | ## type of worker class, one of sync, gevent | |
81 | ## recommended for bigger setup is using of of other than sync one |
|
81 | ## recommended for bigger setup is using of of other than sync one | |
82 | worker_class = sync |
|
82 | worker_class = sync | |
83 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
83 | ## The maximum number of simultaneous clients. Valid only for Gevent | |
84 | #worker_connections = 10 |
|
84 | #worker_connections = 10 | |
85 | ## max number of requests that worker will handle before being gracefully |
|
85 | ## max number of requests that worker will handle before being gracefully | |
86 | ## restarted, could prevent memory leaks |
|
86 | ## restarted, could prevent memory leaks | |
87 | max_requests = 1000 |
|
87 | max_requests = 1000 | |
88 | max_requests_jitter = 30 |
|
88 | max_requests_jitter = 30 | |
89 | ## amount of time a worker can spend with handling a request before it |
|
89 | ## amount of time a worker can spend with handling a request before it | |
90 | ## gets killed and restarted. Set to 6hrs |
|
90 | ## gets killed and restarted. Set to 6hrs | |
91 | timeout = 21600 |
|
91 | timeout = 21600 | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | ## prefix middleware for RhodeCode. |
|
94 | ## prefix middleware for RhodeCode. | |
95 | ## recommended when using proxy setup. |
|
95 | ## recommended when using proxy setup. | |
96 | ## allows to set RhodeCode under a prefix in server. |
|
96 | ## allows to set RhodeCode under a prefix in server. | |
97 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
97 | ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. | |
98 | ## And set your prefix like: `prefix = /custom_prefix` |
|
98 | ## And set your prefix like: `prefix = /custom_prefix` | |
99 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
99 | ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need | |
100 | ## to make your cookies only work on prefix url |
|
100 | ## to make your cookies only work on prefix url | |
101 | [filter:proxy-prefix] |
|
101 | [filter:proxy-prefix] | |
102 | use = egg:PasteDeploy#prefix |
|
102 | use = egg:PasteDeploy#prefix | |
103 | prefix = / |
|
103 | prefix = / | |
104 |
|
104 | |||
105 | [app:main] |
|
105 | [app:main] | |
106 | use = egg:rhodecode-enterprise-ce |
|
106 | use = egg:rhodecode-enterprise-ce | |
107 |
|
107 | |||
108 | ## enable proxy prefix middleware, defined above |
|
108 | ## enable proxy prefix middleware, defined above | |
109 | #filter-with = proxy-prefix |
|
109 | #filter-with = proxy-prefix | |
110 |
|
110 | |||
111 | ## encryption key used to encrypt social plugin tokens, |
|
111 | ## encryption key used to encrypt social plugin tokens, | |
112 | ## remote_urls with credentials etc, if not set it defaults to |
|
112 | ## remote_urls with credentials etc, if not set it defaults to | |
113 | ## `beaker.session.secret` |
|
113 | ## `beaker.session.secret` | |
114 | #rhodecode.encrypted_values.secret = |
|
114 | #rhodecode.encrypted_values.secret = | |
115 |
|
115 | |||
116 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
116 | ## decryption strict mode (enabled by default). It controls if decryption raises | |
117 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
117 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. | |
118 | #rhodecode.encrypted_values.strict = false |
|
118 | #rhodecode.encrypted_values.strict = false | |
119 |
|
119 | |||
120 | ## return gzipped responses from Rhodecode (static files/application) |
|
120 | ## return gzipped responses from Rhodecode (static files/application) | |
121 | gzip_responses = false |
|
121 | gzip_responses = false | |
122 |
|
122 | |||
123 | ## autogenerate javascript routes file on startup |
|
123 | ## autogenerate javascript routes file on startup | |
124 | generate_js_files = false |
|
124 | generate_js_files = false | |
125 |
|
125 | |||
126 | ## Optional Languages |
|
126 | ## Optional Languages | |
127 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
127 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh | |
128 | lang = en |
|
128 | lang = en | |
129 |
|
129 | |||
130 | ## perform a full repository scan on each server start, this should be |
|
130 | ## perform a full repository scan on each server start, this should be | |
131 | ## set to false after first startup, to allow faster server restarts. |
|
131 | ## set to false after first startup, to allow faster server restarts. | |
132 | startup.import_repos = false |
|
132 | startup.import_repos = false | |
133 |
|
133 | |||
134 | ## Uncomment and set this path to use archive download cache. |
|
134 | ## Uncomment and set this path to use archive download cache. | |
135 | ## Once enabled, generated archives will be cached at this location |
|
135 | ## Once enabled, generated archives will be cached at this location | |
136 | ## and served from the cache during subsequent requests for the same archive of |
|
136 | ## and served from the cache during subsequent requests for the same archive of | |
137 | ## the repository. |
|
137 | ## the repository. | |
138 | #archive_cache_dir = /tmp/tarballcache |
|
138 | #archive_cache_dir = /tmp/tarballcache | |
139 |
|
139 | |||
140 | ## change this to unique ID for security |
|
140 | ## change this to unique ID for security | |
141 | app_instance_uuid = rc-production |
|
141 | app_instance_uuid = rc-production | |
142 |
|
142 | |||
143 | ## cut off limit for large diffs (size in bytes). If overall diff size on |
|
143 | ## cut off limit for large diffs (size in bytes). If overall diff size on | |
144 | ## commit, or pull request exceeds this limit this diff will be displayed |
|
144 | ## commit, or pull request exceeds this limit this diff will be displayed | |
145 | ## partially. E.g 512000 == 512Kb |
|
145 | ## partially. E.g 512000 == 512Kb | |
146 | cut_off_limit_diff = 512000 |
|
146 | cut_off_limit_diff = 512000 | |
147 |
|
147 | |||
148 | ## cut off limit for large files inside diffs (size in bytes). Each individual |
|
148 | ## cut off limit for large files inside diffs (size in bytes). Each individual | |
149 | ## file inside diff which exceeds this limit will be displayed partially. |
|
149 | ## file inside diff which exceeds this limit will be displayed partially. | |
150 | ## E.g 128000 == 128Kb |
|
150 | ## E.g 128000 == 128Kb | |
151 | cut_off_limit_file = 128000 |
|
151 | cut_off_limit_file = 128000 | |
152 |
|
152 | |||
153 | ## use cache version of scm repo everywhere |
|
153 | ## use cache version of scm repo everywhere | |
154 | vcs_full_cache = true |
|
154 | vcs_full_cache = true | |
155 |
|
155 | |||
156 | ## force https in RhodeCode, fixes https redirects, assumes it's always https |
|
156 | ## force https in RhodeCode, fixes https redirects, assumes it's always https | |
157 | ## Normally this is controlled by proper http flags sent from http server |
|
157 | ## Normally this is controlled by proper http flags sent from http server | |
158 | force_https = false |
|
158 | force_https = false | |
159 |
|
159 | |||
160 | ## use Strict-Transport-Security headers |
|
160 | ## use Strict-Transport-Security headers | |
161 | use_htsts = false |
|
161 | use_htsts = false | |
162 |
|
162 | |||
163 | ## number of commits stats will parse on each iteration |
|
163 | ## number of commits stats will parse on each iteration | |
164 | commit_parse_limit = 25 |
|
164 | commit_parse_limit = 25 | |
165 |
|
165 | |||
166 | ## git rev filter option, --all is the default filter, if you need to |
|
166 | ## git rev filter option, --all is the default filter, if you need to | |
167 | ## hide all refs in changelog switch this to --branches --tags |
|
167 | ## hide all refs in changelog switch this to --branches --tags | |
168 | git_rev_filter = --branches --tags |
|
168 | git_rev_filter = --branches --tags | |
169 |
|
169 | |||
170 | # Set to true if your repos are exposed using the dumb protocol |
|
170 | # Set to true if your repos are exposed using the dumb protocol | |
171 | git_update_server_info = false |
|
171 | git_update_server_info = false | |
172 |
|
172 | |||
173 | ## RSS/ATOM feed options |
|
173 | ## RSS/ATOM feed options | |
174 | rss_cut_off_limit = 256000 |
|
174 | rss_cut_off_limit = 256000 | |
175 | rss_items_per_page = 10 |
|
175 | rss_items_per_page = 10 | |
176 | rss_include_diff = false |
|
176 | rss_include_diff = false | |
177 |
|
177 | |||
178 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
178 | ## gist URL alias, used to create nicer urls for gist. This should be an | |
179 | ## url that does rewrites to _admin/gists/{gistid}. |
|
179 | ## url that does rewrites to _admin/gists/{gistid}. | |
180 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
180 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal | |
181 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
181 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} | |
182 | gist_alias_url = |
|
182 | gist_alias_url = | |
183 |
|
183 | |||
184 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
184 | ## List of views (using glob pattern syntax) that AUTH TOKENS could be | |
185 | ## used for access. |
|
185 | ## used for access. | |
186 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
186 | ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it | |
187 | ## came from the the logged in user who own this authentication token. |
|
187 | ## came from the the logged in user who own this authentication token. | |
188 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific |
|
188 | ## Additionally @TOKEN syntaxt can be used to bound the view to specific | |
189 | ## authentication token. Such view would be only accessible when used together |
|
189 | ## authentication token. Such view would be only accessible when used together | |
190 | ## with this authentication token |
|
190 | ## with this authentication token | |
191 | ## |
|
191 | ## | |
192 | ## list of all views can be found under `/_admin/permissions/auth_token_access` |
|
192 | ## list of all views can be found under `/_admin/permissions/auth_token_access` | |
193 | ## The list should be "," separated and on a single line. |
|
193 | ## The list should be "," separated and on a single line. | |
194 | ## |
|
194 | ## | |
195 | ## Most common views to enable: |
|
195 | ## Most common views to enable: | |
196 | # RepoCommitsView:repo_commit_download |
|
196 | # RepoCommitsView:repo_commit_download | |
197 | # RepoCommitsView:repo_commit_patch |
|
197 | # RepoCommitsView:repo_commit_patch | |
198 | # RepoCommitsView:repo_commit_raw |
|
198 | # RepoCommitsView:repo_commit_raw | |
199 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
199 | # RepoCommitsView:repo_commit_raw@TOKEN | |
200 | # RepoFilesView:repo_files_diff |
|
200 | # RepoFilesView:repo_files_diff | |
201 | # RepoFilesView:repo_archivefile |
|
201 | # RepoFilesView:repo_archivefile | |
202 | # RepoFilesView:repo_file_raw |
|
202 | # RepoFilesView:repo_file_raw | |
203 | # GistView:* |
|
203 | # GistView:* | |
204 | api_access_controllers_whitelist = |
|
204 | api_access_controllers_whitelist = | |
205 |
|
205 | |||
206 | ## default encoding used to convert from and to unicode |
|
206 | ## default encoding used to convert from and to unicode | |
207 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
207 | ## can be also a comma separated list of encoding in case of mixed encodings | |
208 | default_encoding = UTF-8 |
|
208 | default_encoding = UTF-8 | |
209 |
|
209 | |||
210 | ## instance-id prefix |
|
210 | ## instance-id prefix | |
211 | ## a prefix key for this instance used for cache invalidation when running |
|
211 | ## a prefix key for this instance used for cache invalidation when running | |
212 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
212 | ## multiple instances of rhodecode, make sure it's globally unique for | |
213 | ## all running rhodecode instances. Leave empty if you don't use it |
|
213 | ## all running rhodecode instances. Leave empty if you don't use it | |
214 | instance_id = |
|
214 | instance_id = | |
215 |
|
215 | |||
216 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
216 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage | |
217 | ## of an authentication plugin also if it is disabled by it's settings. |
|
217 | ## of an authentication plugin also if it is disabled by it's settings. | |
218 | ## This could be useful if you are unable to log in to the system due to broken |
|
218 | ## This could be useful if you are unable to log in to the system due to broken | |
219 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
219 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth | |
220 | ## module to log in again and fix the settings. |
|
220 | ## module to log in again and fix the settings. | |
221 | ## |
|
221 | ## | |
222 | ## Available builtin plugin IDs (hash is part of the ID): |
|
222 | ## Available builtin plugin IDs (hash is part of the ID): | |
223 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
223 | ## egg:rhodecode-enterprise-ce#rhodecode | |
224 | ## egg:rhodecode-enterprise-ce#pam |
|
224 | ## egg:rhodecode-enterprise-ce#pam | |
225 | ## egg:rhodecode-enterprise-ce#ldap |
|
225 | ## egg:rhodecode-enterprise-ce#ldap | |
226 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
226 | ## egg:rhodecode-enterprise-ce#jasig_cas | |
227 | ## egg:rhodecode-enterprise-ce#headers |
|
227 | ## egg:rhodecode-enterprise-ce#headers | |
228 | ## egg:rhodecode-enterprise-ce#crowd |
|
228 | ## egg:rhodecode-enterprise-ce#crowd | |
229 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
229 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode | |
230 |
|
230 | |||
231 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
231 | ## alternative return HTTP header for failed authentication. Default HTTP | |
232 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
232 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
233 | ## handling that causing a series of failed authentication calls. |
|
233 | ## handling that causing a series of failed authentication calls. | |
234 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
234 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code | |
235 | ## This will be served instead of default 401 on bad authnetication |
|
235 | ## This will be served instead of default 401 on bad authnetication | |
236 | auth_ret_code = |
|
236 | auth_ret_code = | |
237 |
|
237 | |||
238 | ## use special detection method when serving auth_ret_code, instead of serving |
|
238 | ## use special detection method when serving auth_ret_code, instead of serving | |
239 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
239 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) | |
240 | ## and then serve auth_ret_code to clients |
|
240 | ## and then serve auth_ret_code to clients | |
241 | auth_ret_code_detection = false |
|
241 | auth_ret_code_detection = false | |
242 |
|
242 | |||
243 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
243 | ## locking return code. When repository is locked return this HTTP code. 2XX | |
244 | ## codes don't break the transactions while 4XX codes do |
|
244 | ## codes don't break the transactions while 4XX codes do | |
245 | lock_ret_code = 423 |
|
245 | lock_ret_code = 423 | |
246 |
|
246 | |||
247 | ## allows to change the repository location in settings page |
|
247 | ## allows to change the repository location in settings page | |
248 | allow_repo_location_change = true |
|
248 | allow_repo_location_change = true | |
249 |
|
249 | |||
250 | ## allows to setup custom hooks in settings page |
|
250 | ## allows to setup custom hooks in settings page | |
251 | allow_custom_hooks_settings = true |
|
251 | allow_custom_hooks_settings = true | |
252 |
|
252 | |||
253 | ## generated license token, goto license page in RhodeCode settings to obtain |
|
253 | ## generated license token, goto license page in RhodeCode settings to obtain | |
254 | ## new token |
|
254 | ## new token | |
255 | license_token = |
|
255 | license_token = | |
256 |
|
256 | |||
257 | ## supervisor connection uri, for managing supervisor and logs. |
|
257 | ## supervisor connection uri, for managing supervisor and logs. | |
258 | supervisor.uri = |
|
258 | supervisor.uri = | |
259 | ## supervisord group name/id we only want this RC instance to handle |
|
259 | ## supervisord group name/id we only want this RC instance to handle | |
260 | supervisor.group_id = prod |
|
260 | supervisor.group_id = prod | |
261 |
|
261 | |||
262 | ## Display extended labs settings |
|
262 | ## Display extended labs settings | |
263 | labs_settings_active = true |
|
263 | labs_settings_active = true | |
264 |
|
264 | |||
265 | #################################### |
|
265 | #################################### | |
266 | ### CELERY CONFIG #### |
|
266 | ### CELERY CONFIG #### | |
267 | #################################### |
|
267 | #################################### | |
268 | use_celery = false |
|
268 | use_celery = false | |
269 | broker.host = localhost |
|
269 | broker.host = localhost | |
270 | broker.vhost = rabbitmqhost |
|
270 | broker.vhost = rabbitmqhost | |
271 | broker.port = 5672 |
|
271 | broker.port = 5672 | |
272 | broker.user = rabbitmq |
|
272 | broker.user = rabbitmq | |
273 | broker.password = qweqwe |
|
273 | broker.password = qweqwe | |
274 |
|
274 | |||
275 | celery.imports = rhodecode.lib.celerylib.tasks |
|
275 | celery.imports = rhodecode.lib.celerylib.tasks | |
276 |
|
276 | |||
277 | celery.result.backend = amqp |
|
277 | celery.result.backend = amqp | |
278 | celery.result.dburi = amqp:// |
|
278 | celery.result.dburi = amqp:// | |
279 | celery.result.serialier = json |
|
279 | celery.result.serialier = json | |
280 |
|
280 | |||
281 | #celery.send.task.error.emails = true |
|
281 | #celery.send.task.error.emails = true | |
282 | #celery.amqp.task.result.expires = 18000 |
|
282 | #celery.amqp.task.result.expires = 18000 | |
283 |
|
283 | |||
284 | celeryd.concurrency = 2 |
|
284 | celeryd.concurrency = 2 | |
285 | #celeryd.log.file = celeryd.log |
|
285 | #celeryd.log.file = celeryd.log | |
286 | celeryd.log.level = debug |
|
286 | celeryd.log.level = debug | |
287 | celeryd.max.tasks.per.child = 1 |
|
287 | celeryd.max.tasks.per.child = 1 | |
288 |
|
288 | |||
289 | ## tasks will never be sent to the queue, but executed locally instead. |
|
289 | ## tasks will never be sent to the queue, but executed locally instead. | |
290 | celery.always.eager = false |
|
290 | celery.always.eager = false | |
291 |
|
291 | |||
292 | #################################### |
|
292 | #################################### | |
293 | ### BEAKER CACHE #### |
|
293 | ### BEAKER CACHE #### | |
294 | #################################### |
|
294 | #################################### | |
295 | # default cache dir for templates. Putting this into a ramdisk |
|
295 | # default cache dir for templates. Putting this into a ramdisk | |
296 | ## can boost performance, eg. %(here)s/data_ramdisk |
|
296 | ## can boost performance, eg. %(here)s/data_ramdisk | |
297 | cache_dir = %(here)s/data |
|
297 | cache_dir = %(here)s/data | |
298 |
|
298 | |||
299 | ## locking and default file storage for Beaker. Putting this into a ramdisk |
|
299 | ## locking and default file storage for Beaker. Putting this into a ramdisk | |
300 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data |
|
300 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data | |
301 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data |
|
301 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data | |
302 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock |
|
302 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock | |
303 |
|
303 | |||
304 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long |
|
304 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long | |
305 |
|
305 | |||
306 | beaker.cache.super_short_term.type = memory |
|
306 | beaker.cache.super_short_term.type = memory | |
307 | beaker.cache.super_short_term.expire = 10 |
|
307 | beaker.cache.super_short_term.expire = 10 | |
308 | beaker.cache.super_short_term.key_length = 256 |
|
308 | beaker.cache.super_short_term.key_length = 256 | |
309 |
|
309 | |||
310 | beaker.cache.short_term.type = memory |
|
310 | beaker.cache.short_term.type = memory | |
311 | beaker.cache.short_term.expire = 60 |
|
311 | beaker.cache.short_term.expire = 60 | |
312 | beaker.cache.short_term.key_length = 256 |
|
312 | beaker.cache.short_term.key_length = 256 | |
313 |
|
313 | |||
314 | beaker.cache.long_term.type = memory |
|
314 | beaker.cache.long_term.type = memory | |
315 | beaker.cache.long_term.expire = 36000 |
|
315 | beaker.cache.long_term.expire = 36000 | |
316 | beaker.cache.long_term.key_length = 256 |
|
316 | beaker.cache.long_term.key_length = 256 | |
317 |
|
317 | |||
318 | beaker.cache.sql_cache_short.type = memory |
|
318 | beaker.cache.sql_cache_short.type = memory | |
319 | beaker.cache.sql_cache_short.expire = 10 |
|
319 | beaker.cache.sql_cache_short.expire = 10 | |
320 | beaker.cache.sql_cache_short.key_length = 256 |
|
320 | beaker.cache.sql_cache_short.key_length = 256 | |
321 |
|
321 | |||
322 | ## default is memory cache, configure only if required |
|
322 | ## default is memory cache, configure only if required | |
323 | ## using multi-node or multi-worker setup |
|
323 | ## using multi-node or multi-worker setup | |
324 | #beaker.cache.auth_plugins.type = ext:database |
|
324 | #beaker.cache.auth_plugins.type = ext:database | |
325 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock |
|
325 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock | |
326 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode |
|
326 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode | |
327 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode |
|
327 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode | |
328 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 |
|
328 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 | |
329 | #beaker.cache.auth_plugins.sa.pool_size = 10 |
|
329 | #beaker.cache.auth_plugins.sa.pool_size = 10 | |
330 | #beaker.cache.auth_plugins.sa.max_overflow = 0 |
|
330 | #beaker.cache.auth_plugins.sa.max_overflow = 0 | |
331 |
|
331 | |||
332 | beaker.cache.repo_cache_long.type = memorylru_base |
|
332 | beaker.cache.repo_cache_long.type = memorylru_base | |
333 | beaker.cache.repo_cache_long.max_items = 4096 |
|
333 | beaker.cache.repo_cache_long.max_items = 4096 | |
334 | beaker.cache.repo_cache_long.expire = 2592000 |
|
334 | beaker.cache.repo_cache_long.expire = 2592000 | |
335 |
|
335 | |||
336 | ## default is memorylru_base cache, configure only if required |
|
336 | ## default is memorylru_base cache, configure only if required | |
337 | ## using multi-node or multi-worker setup |
|
337 | ## using multi-node or multi-worker setup | |
338 | #beaker.cache.repo_cache_long.type = ext:memcached |
|
338 | #beaker.cache.repo_cache_long.type = ext:memcached | |
339 | #beaker.cache.repo_cache_long.url = localhost:11211 |
|
339 | #beaker.cache.repo_cache_long.url = localhost:11211 | |
340 | #beaker.cache.repo_cache_long.expire = 1209600 |
|
340 | #beaker.cache.repo_cache_long.expire = 1209600 | |
341 | #beaker.cache.repo_cache_long.key_length = 256 |
|
341 | #beaker.cache.repo_cache_long.key_length = 256 | |
342 |
|
342 | |||
343 | #################################### |
|
343 | #################################### | |
344 | ### BEAKER SESSION #### |
|
344 | ### BEAKER SESSION #### | |
345 | #################################### |
|
345 | #################################### | |
346 |
|
346 | |||
347 | ## .session.type is type of storage options for the session, current allowed |
|
347 | ## .session.type is type of storage options for the session, current allowed | |
348 | ## types are file, ext:memcached, ext:database, and memory (default). |
|
348 | ## types are file, ext:memcached, ext:database, and memory (default). | |
349 | beaker.session.type = file |
|
349 | beaker.session.type = file | |
350 | beaker.session.data_dir = %(here)s/data/sessions/data |
|
350 | beaker.session.data_dir = %(here)s/data/sessions/data | |
351 |
|
351 | |||
352 | ## db based session, fast, and allows easy management over logged in users |
|
352 | ## db based session, fast, and allows easy management over logged in users | |
353 | #beaker.session.type = ext:database |
|
353 | #beaker.session.type = ext:database | |
354 | #beaker.session.table_name = db_session |
|
354 | #beaker.session.table_name = db_session | |
355 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
355 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode | |
356 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
356 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode | |
357 | #beaker.session.sa.pool_recycle = 3600 |
|
357 | #beaker.session.sa.pool_recycle = 3600 | |
358 | #beaker.session.sa.echo = false |
|
358 | #beaker.session.sa.echo = false | |
359 |
|
359 | |||
360 | beaker.session.key = rhodecode |
|
360 | beaker.session.key = rhodecode | |
361 | beaker.session.secret = production-rc-uytcxaz |
|
361 | beaker.session.secret = production-rc-uytcxaz | |
362 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
362 | beaker.session.lock_dir = %(here)s/data/sessions/lock | |
363 |
|
363 | |||
364 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
364 | ## Secure encrypted cookie. Requires AES and AES python libraries | |
365 | ## you must disable beaker.session.secret to use this |
|
365 | ## you must disable beaker.session.secret to use this | |
366 | #beaker.session.encrypt_key = key_for_encryption |
|
366 | #beaker.session.encrypt_key = key_for_encryption | |
367 | #beaker.session.validate_key = validation_key |
|
367 | #beaker.session.validate_key = validation_key | |
368 |
|
368 | |||
369 | ## sets session as invalid(also logging out user) if it haven not been |
|
369 | ## sets session as invalid(also logging out user) if it haven not been | |
370 | ## accessed for given amount of time in seconds |
|
370 | ## accessed for given amount of time in seconds | |
371 | beaker.session.timeout = 2592000 |
|
371 | beaker.session.timeout = 2592000 | |
372 | beaker.session.httponly = true |
|
372 | beaker.session.httponly = true | |
373 | ## Path to use for the cookie. Set to prefix if you use prefix middleware |
|
373 | ## Path to use for the cookie. Set to prefix if you use prefix middleware | |
374 | #beaker.session.cookie_path = /custom_prefix |
|
374 | #beaker.session.cookie_path = /custom_prefix | |
375 |
|
375 | |||
376 | ## uncomment for https secure cookie |
|
376 | ## uncomment for https secure cookie | |
377 | beaker.session.secure = false |
|
377 | beaker.session.secure = false | |
378 |
|
378 | |||
379 | ## auto save the session to not to use .save() |
|
379 | ## auto save the session to not to use .save() | |
380 | beaker.session.auto = false |
|
380 | beaker.session.auto = false | |
381 |
|
381 | |||
382 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
382 | ## default cookie expiration time in seconds, set to `true` to set expire | |
383 | ## at browser close |
|
383 | ## at browser close | |
384 | #beaker.session.cookie_expires = 3600 |
|
384 | #beaker.session.cookie_expires = 3600 | |
385 |
|
385 | |||
386 | ################################### |
|
386 | ################################### | |
387 | ## SEARCH INDEXING CONFIGURATION ## |
|
387 | ## SEARCH INDEXING CONFIGURATION ## | |
388 | ################################### |
|
388 | ################################### | |
389 | ## Full text search indexer is available in rhodecode-tools under |
|
389 | ## Full text search indexer is available in rhodecode-tools under | |
390 | ## `rhodecode-tools index` command |
|
390 | ## `rhodecode-tools index` command | |
391 |
|
391 | |||
392 | ## WHOOSH Backend, doesn't require additional services to run |
|
392 | ## WHOOSH Backend, doesn't require additional services to run | |
393 | ## it works good with few dozen repos |
|
393 | ## it works good with few dozen repos | |
394 | search.module = rhodecode.lib.index.whoosh |
|
394 | search.module = rhodecode.lib.index.whoosh | |
395 | search.location = %(here)s/data/index |
|
395 | search.location = %(here)s/data/index | |
396 |
|
396 | |||
397 | ######################################## |
|
397 | ######################################## | |
398 | ### CHANNELSTREAM CONFIG #### |
|
398 | ### CHANNELSTREAM CONFIG #### | |
399 | ######################################## |
|
399 | ######################################## | |
400 | ## channelstream enables persistent connections and live notification |
|
400 | ## channelstream enables persistent connections and live notification | |
401 | ## in the system. It's also used by the chat system |
|
401 | ## in the system. It's also used by the chat system | |
402 | channelstream.enabled = false |
|
402 | channelstream.enabled = false | |
403 |
|
403 | |||
404 | ## server address for channelstream server on the backend |
|
404 | ## server address for channelstream server on the backend | |
405 | channelstream.server = 127.0.0.1:9800 |
|
405 | channelstream.server = 127.0.0.1:9800 | |
406 |
|
406 | |||
407 | ## location of the channelstream server from outside world |
|
407 | ## location of the channelstream server from outside world | |
408 | ## use ws:// for http or wss:// for https. This address needs to be handled |
|
408 | ## use ws:// for http or wss:// for https. This address needs to be handled | |
409 | ## by external HTTP server such as Nginx or Apache |
|
409 | ## by external HTTP server such as Nginx or Apache | |
410 | ## see nginx/apache configuration examples in our docs |
|
410 | ## see nginx/apache configuration examples in our docs | |
411 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
411 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
412 | channelstream.secret = secret |
|
412 | channelstream.secret = secret | |
413 | channelstream.history.location = %(here)s/channelstream_history |
|
413 | channelstream.history.location = %(here)s/channelstream_history | |
414 |
|
414 | |||
415 | ## Internal application path that Javascript uses to connect into. |
|
415 | ## Internal application path that Javascript uses to connect into. | |
416 | ## If you use proxy-prefix the prefix should be added before /_channelstream |
|
416 | ## If you use proxy-prefix the prefix should be added before /_channelstream | |
417 | channelstream.proxy_path = /_channelstream |
|
417 | channelstream.proxy_path = /_channelstream | |
418 |
|
418 | |||
419 |
|
419 | |||
420 | ################################### |
|
420 | ################################### | |
421 | ## APPENLIGHT CONFIG ## |
|
421 | ## APPENLIGHT CONFIG ## | |
422 | ################################### |
|
422 | ################################### | |
423 |
|
423 | |||
424 | ## Appenlight is tailored to work with RhodeCode, see |
|
424 | ## Appenlight is tailored to work with RhodeCode, see | |
425 | ## http://appenlight.com for details how to obtain an account |
|
425 | ## http://appenlight.com for details how to obtain an account | |
426 |
|
426 | |||
427 | ## appenlight integration enabled |
|
427 | ## appenlight integration enabled | |
428 | appenlight = false |
|
428 | appenlight = false | |
429 |
|
429 | |||
430 | appenlight.server_url = https://api.appenlight.com |
|
430 | appenlight.server_url = https://api.appenlight.com | |
431 | appenlight.api_key = YOUR_API_KEY |
|
431 | appenlight.api_key = YOUR_API_KEY | |
432 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
432 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 | |
433 |
|
433 | |||
434 | # used for JS client |
|
434 | # used for JS client | |
435 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
435 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY | |
436 |
|
436 | |||
437 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
437 | ## TWEAK AMOUNT OF INFO SENT HERE | |
438 |
|
438 | |||
439 | ## enables 404 error logging (default False) |
|
439 | ## enables 404 error logging (default False) | |
440 | appenlight.report_404 = false |
|
440 | appenlight.report_404 = false | |
441 |
|
441 | |||
442 | ## time in seconds after request is considered being slow (default 1) |
|
442 | ## time in seconds after request is considered being slow (default 1) | |
443 | appenlight.slow_request_time = 1 |
|
443 | appenlight.slow_request_time = 1 | |
444 |
|
444 | |||
445 | ## record slow requests in application |
|
445 | ## record slow requests in application | |
446 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
446 | ## (needs to be enabled for slow datastore recording and time tracking) | |
447 | appenlight.slow_requests = true |
|
447 | appenlight.slow_requests = true | |
448 |
|
448 | |||
449 | ## enable hooking to application loggers |
|
449 | ## enable hooking to application loggers | |
450 | appenlight.logging = true |
|
450 | appenlight.logging = true | |
451 |
|
451 | |||
452 | ## minimum log level for log capture |
|
452 | ## minimum log level for log capture | |
453 | appenlight.logging.level = WARNING |
|
453 | appenlight.logging.level = WARNING | |
454 |
|
454 | |||
455 | ## send logs only from erroneous/slow requests |
|
455 | ## send logs only from erroneous/slow requests | |
456 | ## (saves API quota for intensive logging) |
|
456 | ## (saves API quota for intensive logging) | |
457 | appenlight.logging_on_error = false |
|
457 | appenlight.logging_on_error = false | |
458 |
|
458 | |||
459 | ## list of additonal keywords that should be grabbed from environ object |
|
459 | ## list of additonal keywords that should be grabbed from environ object | |
460 | ## can be string with comma separated list of words in lowercase |
|
460 | ## can be string with comma separated list of words in lowercase | |
461 | ## (by default client will always send following info: |
|
461 | ## (by default client will always send following info: | |
462 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
462 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that | |
463 | ## start with HTTP* this list be extended with additional keywords here |
|
463 | ## start with HTTP* this list be extended with additional keywords here | |
464 | appenlight.environ_keys_whitelist = |
|
464 | appenlight.environ_keys_whitelist = | |
465 |
|
465 | |||
466 | ## list of keywords that should be blanked from request object |
|
466 | ## list of keywords that should be blanked from request object | |
467 | ## can be string with comma separated list of words in lowercase |
|
467 | ## can be string with comma separated list of words in lowercase | |
468 | ## (by default client will always blank keys that contain following words |
|
468 | ## (by default client will always blank keys that contain following words | |
469 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
469 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' | |
470 | ## this list be extended with additional keywords set here |
|
470 | ## this list be extended with additional keywords set here | |
471 | appenlight.request_keys_blacklist = |
|
471 | appenlight.request_keys_blacklist = | |
472 |
|
472 | |||
473 | ## list of namespaces that should be ignores when gathering log entries |
|
473 | ## list of namespaces that should be ignores when gathering log entries | |
474 | ## can be string with comma separated list of namespaces |
|
474 | ## can be string with comma separated list of namespaces | |
475 | ## (by default the client ignores own entries: appenlight_client.client) |
|
475 | ## (by default the client ignores own entries: appenlight_client.client) | |
476 | appenlight.log_namespace_blacklist = |
|
476 | appenlight.log_namespace_blacklist = | |
477 |
|
477 | |||
478 |
|
478 | |||
479 | ################################################################################ |
|
479 | ################################################################################ | |
480 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
480 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
481 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
481 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
482 | ## execute malicious code after an exception is raised. ## |
|
482 | ## execute malicious code after an exception is raised. ## | |
483 | ################################################################################ |
|
483 | ################################################################################ | |
484 | set debug = false |
|
484 | set debug = false | |
485 |
|
485 | |||
486 |
|
486 | |||
487 | ########################################### |
|
487 | ########################################### | |
488 | ### MAIN RHODECODE DATABASE CONFIG ### |
|
488 | ### MAIN RHODECODE DATABASE CONFIG ### | |
489 | ########################################### |
|
489 | ########################################### | |
490 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
490 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
491 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
491 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
492 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode |
|
492 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode | |
493 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
493 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
494 |
|
494 | |||
495 | # see sqlalchemy docs for other advanced settings |
|
495 | # see sqlalchemy docs for other advanced settings | |
496 |
|
496 | |||
497 | ## print the sql statements to output |
|
497 | ## print the sql statements to output | |
498 | sqlalchemy.db1.echo = false |
|
498 | sqlalchemy.db1.echo = false | |
499 | ## recycle the connections after this amount of seconds |
|
499 | ## recycle the connections after this amount of seconds | |
500 | sqlalchemy.db1.pool_recycle = 3600 |
|
500 | sqlalchemy.db1.pool_recycle = 3600 | |
501 | sqlalchemy.db1.convert_unicode = true |
|
501 | sqlalchemy.db1.convert_unicode = true | |
502 |
|
502 | |||
503 | ## the number of connections to keep open inside the connection pool. |
|
503 | ## the number of connections to keep open inside the connection pool. | |
504 | ## 0 indicates no limit |
|
504 | ## 0 indicates no limit | |
505 | #sqlalchemy.db1.pool_size = 5 |
|
505 | #sqlalchemy.db1.pool_size = 5 | |
506 |
|
506 | |||
507 | ## the number of connections to allow in connection pool "overflow", that is |
|
507 | ## the number of connections to allow in connection pool "overflow", that is | |
508 | ## connections that can be opened above and beyond the pool_size setting, |
|
508 | ## connections that can be opened above and beyond the pool_size setting, | |
509 | ## which defaults to five. |
|
509 | ## which defaults to five. | |
510 | #sqlalchemy.db1.max_overflow = 10 |
|
510 | #sqlalchemy.db1.max_overflow = 10 | |
511 |
|
511 | |||
512 |
|
512 | |||
513 | ################## |
|
513 | ################## | |
514 | ### VCS CONFIG ### |
|
514 | ### VCS CONFIG ### | |
515 | ################## |
|
515 | ################## | |
516 | vcs.server.enable = true |
|
516 | vcs.server.enable = true | |
517 | vcs.server = localhost:9900 |
|
517 | vcs.server = localhost:9900 | |
518 |
|
518 | |||
519 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
519 | ## Web server connectivity protocol, responsible for web based VCS operatations | |
520 | ## Available protocols are: |
|
520 | ## Available protocols are: | |
521 | ## `http` - use http-rpc backend (default) |
|
521 | ## `http` - use http-rpc backend (default) | |
522 | vcs.server.protocol = http |
|
522 | vcs.server.protocol = http | |
523 |
|
523 | |||
524 | ## Push/Pull operations protocol, available options are: |
|
524 | ## Push/Pull operations protocol, available options are: | |
525 | ## `http` - use http-rpc backend (default) |
|
525 | ## `http` - use http-rpc backend (default) | |
526 | ## |
|
526 | ## | |
527 | vcs.scm_app_implementation = http |
|
527 | vcs.scm_app_implementation = http | |
528 |
|
528 | |||
529 | ## Push/Pull operations hooks protocol, available options are: |
|
529 | ## Push/Pull operations hooks protocol, available options are: | |
530 | ## `http` - use http-rpc backend (default) |
|
530 | ## `http` - use http-rpc backend (default) | |
531 | vcs.hooks.protocol = http |
|
531 | vcs.hooks.protocol = http | |
532 |
|
532 | |||
533 | vcs.server.log_level = info |
|
533 | vcs.server.log_level = info | |
534 | ## Start VCSServer with this instance as a subprocess, usefull for development |
|
534 | ## Start VCSServer with this instance as a subprocess, usefull for development | |
535 | vcs.start_server = false |
|
535 | vcs.start_server = false | |
536 |
|
536 | |||
537 | ## List of enabled VCS backends, available options are: |
|
537 | ## List of enabled VCS backends, available options are: | |
538 | ## `hg` - mercurial |
|
538 | ## `hg` - mercurial | |
539 | ## `git` - git |
|
539 | ## `git` - git | |
540 | ## `svn` - subversion |
|
540 | ## `svn` - subversion | |
541 | vcs.backends = hg, git, svn |
|
541 | vcs.backends = hg, git, svn | |
542 |
|
542 | |||
543 | vcs.connection_timeout = 3600 |
|
543 | vcs.connection_timeout = 3600 | |
544 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
544 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. | |
545 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
545 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible | |
546 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
546 | #vcs.svn.compatible_version = pre-1.8-compatible | |
547 |
|
547 | |||
548 |
|
548 | |||
549 | ############################################################ |
|
549 | ############################################################ | |
550 | ### Subversion proxy support (mod_dav_svn) ### |
|
550 | ### Subversion proxy support (mod_dav_svn) ### | |
551 | ### Maps RhodeCode repo groups into SVN paths for Apache ### |
|
551 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |
552 | ############################################################ |
|
552 | ############################################################ | |
553 | ## Enable or disable the config file generation. |
|
553 | ## Enable or disable the config file generation. | |
554 | svn.proxy.generate_config = false |
|
554 | svn.proxy.generate_config = false | |
555 | ## Generate config file with `SVNListParentPath` set to `On`. |
|
555 | ## Generate config file with `SVNListParentPath` set to `On`. | |
556 | svn.proxy.list_parent_path = true |
|
556 | svn.proxy.list_parent_path = true | |
557 | ## Set location and file name of generated config file. |
|
557 | ## Set location and file name of generated config file. | |
558 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf |
|
558 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
559 | ## alternative mod_dav config template. This needs to be a mako template | |||
|
560 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako | |||
559 | ## Used as a prefix to the `Location` block in the generated config file. |
|
561 | ## Used as a prefix to the `Location` block in the generated config file. | |
560 | ## In most cases it should be set to `/`. |
|
562 | ## In most cases it should be set to `/`. | |
561 | svn.proxy.location_root = / |
|
563 | svn.proxy.location_root = / | |
562 | ## Command to reload the mod dav svn configuration on change. |
|
564 | ## Command to reload the mod dav svn configuration on change. | |
563 | ## Example: `/etc/init.d/apache2 reload` |
|
565 | ## Example: `/etc/init.d/apache2 reload` | |
564 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
566 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
565 | ## If the timeout expires before the reload command finishes, the command will |
|
567 | ## If the timeout expires before the reload command finishes, the command will | |
566 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
568 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
567 | #svn.proxy.reload_timeout = 10 |
|
569 | #svn.proxy.reload_timeout = 10 | |
568 |
|
570 | |||
569 | ############################################################ |
|
571 | ############################################################ | |
570 | ### SSH Support Settings ### |
|
572 | ### SSH Support Settings ### | |
571 | ############################################################ |
|
573 | ############################################################ | |
572 |
|
574 | |||
573 | ## Defines if a custom authorized_keys file should be created and written on |
|
575 | ## Defines if a custom authorized_keys file should be created and written on | |
574 | ## any change user ssh keys. Setting this to false also disables posibility |
|
576 | ## any change user ssh keys. Setting this to false also disables posibility | |
575 | ## of adding SSH keys by users from web interface. Super admins can still |
|
577 | ## of adding SSH keys by users from web interface. Super admins can still | |
576 | ## manage SSH Keys. |
|
578 | ## manage SSH Keys. | |
577 | ssh.generate_authorized_keyfile = false |
|
579 | ssh.generate_authorized_keyfile = false | |
578 |
|
580 | |||
579 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
581 | ## Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` | |
580 | # ssh.authorized_keys_ssh_opts = |
|
582 | # ssh.authorized_keys_ssh_opts = | |
581 |
|
583 | |||
582 | ## Path to the authrozied_keys file where the generate entries are placed. |
|
584 | ## Path to the authrozied_keys file where the generate entries are placed. | |
583 | ## It is possible to have multiple key files specified in `sshd_config` e.g. |
|
585 | ## It is possible to have multiple key files specified in `sshd_config` e.g. | |
584 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
586 | ## AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode | |
585 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode |
|
587 | ssh.authorized_keys_file_path = ~/.ssh/authorized_keys_rhodecode | |
586 |
|
588 | |||
587 | ## Command to execute the SSH wrapper. The binary is available in the |
|
589 | ## Command to execute the SSH wrapper. The binary is available in the | |
588 | ## rhodecode installation directory. |
|
590 | ## rhodecode installation directory. | |
589 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper |
|
591 | ## e.g ~/.rccontrol/community-1/profile/bin/rc-ssh-wrapper | |
590 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper |
|
592 | ssh.wrapper_cmd = ~/.rccontrol/community-1/rc-ssh-wrapper | |
591 |
|
593 | |||
592 | ## Allow shell when executing the ssh-wrapper command |
|
594 | ## Allow shell when executing the ssh-wrapper command | |
593 | ssh.wrapper_cmd_allow_shell = false |
|
595 | ssh.wrapper_cmd_allow_shell = false | |
594 |
|
596 | |||
595 | ## Enables logging, and detailed output send back to the client during SSH |
|
597 | ## Enables logging, and detailed output send back to the client during SSH | |
596 | ## operations. Usefull for debugging, shouldn't be used in production. |
|
598 | ## operations. Usefull for debugging, shouldn't be used in production. | |
597 | ssh.enable_debug_logging = false |
|
599 | ssh.enable_debug_logging = false | |
598 |
|
600 | |||
599 | ## API KEY for user who has access to fetch other user permission information |
|
601 | ## API KEY for user who has access to fetch other user permission information | |
600 | ## most likely an super-admin account with some IP restrictions. |
|
602 | ## most likely an super-admin account with some IP restrictions. | |
601 | ssh.api_key = |
|
603 | ssh.api_key = | |
602 |
|
604 | |||
603 | ## API Host, the server address of RhodeCode instance that the api_key will |
|
605 | ## API Host, the server address of RhodeCode instance that the api_key will | |
604 | ## access |
|
606 | ## access | |
605 | ssh.api_host = http://localhost |
|
607 | ssh.api_host = http://localhost | |
606 |
|
608 | |||
607 | ## Paths to binary executable, by default they are the names, but we can |
|
609 | ## Paths to binary executable, by default they are the names, but we can | |
608 | ## override them if we want to use a custom one |
|
610 | ## override them if we want to use a custom one | |
609 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg |
|
611 | ssh.executable.hg = ~/.rccontrol/vcsserver-1/profile/bin/hg | |
610 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git |
|
612 | ssh.executable.git = ~/.rccontrol/vcsserver-1/profile/bin/git | |
611 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve |
|
613 | ssh.executable.svn = ~/.rccontrol/vcsserver-1/profile/bin/svnserve | |
612 |
|
614 | |||
613 |
|
615 | |||
614 | ## Dummy marker to add new entries after. |
|
616 | ## Dummy marker to add new entries after. | |
615 | ## Add any custom entries below. Please don't remove. |
|
617 | ## Add any custom entries below. Please don't remove. | |
616 | custom.conf = 1 |
|
618 | custom.conf = 1 | |
617 |
|
619 | |||
618 |
|
620 | |||
619 | ################################ |
|
621 | ################################ | |
620 | ### LOGGING CONFIGURATION #### |
|
622 | ### LOGGING CONFIGURATION #### | |
621 | ################################ |
|
623 | ################################ | |
622 | [loggers] |
|
624 | [loggers] | |
623 | keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper |
|
625 | keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper | |
624 |
|
626 | |||
625 | [handlers] |
|
627 | [handlers] | |
626 | keys = console, console_sql |
|
628 | keys = console, console_sql | |
627 |
|
629 | |||
628 | [formatters] |
|
630 | [formatters] | |
629 | keys = generic, color_formatter, color_formatter_sql |
|
631 | keys = generic, color_formatter, color_formatter_sql | |
630 |
|
632 | |||
631 | ############# |
|
633 | ############# | |
632 | ## LOGGERS ## |
|
634 | ## LOGGERS ## | |
633 | ############# |
|
635 | ############# | |
634 | [logger_root] |
|
636 | [logger_root] | |
635 | level = NOTSET |
|
637 | level = NOTSET | |
636 | handlers = console |
|
638 | handlers = console | |
637 |
|
639 | |||
638 | [logger_sqlalchemy] |
|
640 | [logger_sqlalchemy] | |
639 | level = INFO |
|
641 | level = INFO | |
640 | handlers = console_sql |
|
642 | handlers = console_sql | |
641 | qualname = sqlalchemy.engine |
|
643 | qualname = sqlalchemy.engine | |
642 | propagate = 0 |
|
644 | propagate = 0 | |
643 |
|
645 | |||
644 | [logger_beaker] |
|
646 | [logger_beaker] | |
645 | level = DEBUG |
|
647 | level = DEBUG | |
646 | handlers = |
|
648 | handlers = | |
647 | qualname = beaker.container |
|
649 | qualname = beaker.container | |
648 | propagate = 1 |
|
650 | propagate = 1 | |
649 |
|
651 | |||
650 | [logger_rhodecode] |
|
652 | [logger_rhodecode] | |
651 | level = DEBUG |
|
653 | level = DEBUG | |
652 | handlers = |
|
654 | handlers = | |
653 | qualname = rhodecode |
|
655 | qualname = rhodecode | |
654 | propagate = 1 |
|
656 | propagate = 1 | |
655 |
|
657 | |||
656 | [logger_ssh_wrapper] |
|
658 | [logger_ssh_wrapper] | |
657 | level = DEBUG |
|
659 | level = DEBUG | |
658 | handlers = |
|
660 | handlers = | |
659 | qualname = ssh_wrapper |
|
661 | qualname = ssh_wrapper | |
660 | propagate = 1 |
|
662 | propagate = 1 | |
661 |
|
663 | |||
662 |
|
664 | |||
663 | ############## |
|
665 | ############## | |
664 | ## HANDLERS ## |
|
666 | ## HANDLERS ## | |
665 | ############## |
|
667 | ############## | |
666 |
|
668 | |||
667 | [handler_console] |
|
669 | [handler_console] | |
668 | class = StreamHandler |
|
670 | class = StreamHandler | |
669 | args = (sys.stderr, ) |
|
671 | args = (sys.stderr, ) | |
670 | level = INFO |
|
672 | level = INFO | |
671 | formatter = generic |
|
673 | formatter = generic | |
672 |
|
674 | |||
673 | [handler_console_sql] |
|
675 | [handler_console_sql] | |
674 | class = StreamHandler |
|
676 | class = StreamHandler | |
675 | args = (sys.stderr, ) |
|
677 | args = (sys.stderr, ) | |
676 | level = WARN |
|
678 | level = WARN | |
677 | formatter = generic |
|
679 | formatter = generic | |
678 |
|
680 | |||
679 | ################ |
|
681 | ################ | |
680 | ## FORMATTERS ## |
|
682 | ## FORMATTERS ## | |
681 | ################ |
|
683 | ################ | |
682 |
|
684 | |||
683 | [formatter_generic] |
|
685 | [formatter_generic] | |
684 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
686 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
685 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
687 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
686 | datefmt = %Y-%m-%d %H:%M:%S |
|
688 | datefmt = %Y-%m-%d %H:%M:%S | |
687 |
|
689 | |||
688 | [formatter_color_formatter] |
|
690 | [formatter_color_formatter] | |
689 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
691 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
690 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
692 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
691 | datefmt = %Y-%m-%d %H:%M:%S |
|
693 | datefmt = %Y-%m-%d %H:%M:%S | |
692 |
|
694 | |||
693 | [formatter_color_formatter_sql] |
|
695 | [formatter_color_formatter_sql] | |
694 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
696 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
695 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
697 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
696 | datefmt = %Y-%m-%d %H:%M:%S |
|
698 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,89 +1,90 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | import logging |
|
21 | import logging | |
22 | import os |
|
22 | import os | |
23 | import shlex |
|
23 | import shlex | |
24 |
|
24 | |||
25 | # Do not use `from rhodecode import events` here, it will be overridden by the |
|
25 | # Do not use `from rhodecode import events` here, it will be overridden by the | |
26 | # events module in this package due to pythons import mechanism. |
|
26 | # events module in this package due to pythons import mechanism. | |
27 | from rhodecode.events import RepoGroupEvent |
|
27 | from rhodecode.events import RepoGroupEvent | |
28 | from rhodecode.subscribers import AsyncSubprocessSubscriber |
|
28 | from rhodecode.subscribers import AsyncSubprocessSubscriber | |
29 | from rhodecode.config.middleware import ( |
|
29 | from rhodecode.config.middleware import ( | |
30 | _bool_setting, _string_setting, _int_setting) |
|
30 | _bool_setting, _string_setting, _int_setting) | |
31 |
|
31 | |||
32 | from .events import ModDavSvnConfigChange |
|
32 | from .events import ModDavSvnConfigChange | |
33 | from .subscribers import generate_config_subscriber |
|
33 | from .subscribers import generate_config_subscriber | |
34 | from . import config_keys |
|
34 | from . import config_keys | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | log = logging.getLogger(__name__) |
|
37 | log = logging.getLogger(__name__) | |
38 |
|
38 | |||
39 |
|
39 | |||
40 | def includeme(config): |
|
40 | def includeme(config): | |
41 | settings = config.registry.settings |
|
41 | settings = config.registry.settings | |
42 | _sanitize_settings_and_apply_defaults(settings) |
|
42 | _sanitize_settings_and_apply_defaults(settings) | |
43 |
|
43 | |||
44 | if settings[config_keys.generate_config]: |
|
44 | if settings[config_keys.generate_config]: | |
45 | # Add subscriber to generate the Apache mod dav svn configuration on |
|
45 | # Add subscriber to generate the Apache mod dav svn configuration on | |
46 | # repository group events. |
|
46 | # repository group events. | |
47 | config.add_subscriber(generate_config_subscriber, RepoGroupEvent) |
|
47 | config.add_subscriber(generate_config_subscriber, RepoGroupEvent) | |
48 |
|
48 | |||
49 | # If a reload command is set add a subscriber to execute it on |
|
49 | # If a reload command is set add a subscriber to execute it on | |
50 | # configuration changes. |
|
50 | # configuration changes. | |
51 | reload_cmd = shlex.split(settings[config_keys.reload_command]) |
|
51 | reload_cmd = shlex.split(settings[config_keys.reload_command]) | |
52 | if reload_cmd: |
|
52 | if reload_cmd: | |
53 | reload_timeout = settings[config_keys.reload_timeout] or None |
|
53 | reload_timeout = settings[config_keys.reload_timeout] or None | |
54 | reload_subscriber = AsyncSubprocessSubscriber( |
|
54 | reload_subscriber = AsyncSubprocessSubscriber( | |
55 | cmd=reload_cmd, timeout=reload_timeout) |
|
55 | cmd=reload_cmd, timeout=reload_timeout) | |
56 | config.add_subscriber(reload_subscriber, ModDavSvnConfigChange) |
|
56 | config.add_subscriber(reload_subscriber, ModDavSvnConfigChange) | |
57 |
|
57 | |||
58 |
|
58 | |||
59 | def _sanitize_settings_and_apply_defaults(settings): |
|
59 | def _sanitize_settings_and_apply_defaults(settings): | |
60 | """ |
|
60 | """ | |
61 | Set defaults, convert to python types and validate settings. |
|
61 | Set defaults, convert to python types and validate settings. | |
62 | """ |
|
62 | """ | |
63 | _bool_setting(settings, config_keys.generate_config, 'false') |
|
63 | _bool_setting(settings, config_keys.generate_config, 'false') | |
64 | _bool_setting(settings, config_keys.list_parent_path, 'true') |
|
64 | _bool_setting(settings, config_keys.list_parent_path, 'true') | |
65 | _int_setting(settings, config_keys.reload_timeout, 10) |
|
65 | _int_setting(settings, config_keys.reload_timeout, 10) | |
66 | _string_setting(settings, config_keys.config_file_path, '', lower=False) |
|
66 | _string_setting(settings, config_keys.config_file_path, '', lower=False) | |
67 | _string_setting(settings, config_keys.location_root, '/', lower=False) |
|
67 | _string_setting(settings, config_keys.location_root, '/', lower=False) | |
68 | _string_setting(settings, config_keys.reload_command, '', lower=False) |
|
68 | _string_setting(settings, config_keys.reload_command, '', lower=False) | |
|
69 | _string_setting(settings, config_keys.template, '', lower=False) | |||
69 |
|
70 | |||
70 | # Convert negative timeout values to zero. |
|
71 | # Convert negative timeout values to zero. | |
71 | if settings[config_keys.reload_timeout] < 0: |
|
72 | if settings[config_keys.reload_timeout] < 0: | |
72 | settings[config_keys.reload_timeout] = 0 |
|
73 | settings[config_keys.reload_timeout] = 0 | |
73 |
|
74 | |||
74 | # Append path separator to location root. |
|
75 | # Append path separator to location root. | |
75 | settings[config_keys.location_root] = _append_path_sep( |
|
76 | settings[config_keys.location_root] = _append_path_sep( | |
76 | settings[config_keys.location_root]) |
|
77 | settings[config_keys.location_root]) | |
77 |
|
78 | |||
78 | # Validate settings. |
|
79 | # Validate settings. | |
79 | if settings[config_keys.generate_config]: |
|
80 | if settings[config_keys.generate_config]: | |
80 | assert len(settings[config_keys.config_file_path]) > 0 |
|
81 | assert len(settings[config_keys.config_file_path]) > 0 | |
81 |
|
82 | |||
82 |
|
83 | |||
83 | def _append_path_sep(path): |
|
84 | def _append_path_sep(path): | |
84 | """ |
|
85 | """ | |
85 | Append the path separator if missing. |
|
86 | Append the path separator if missing. | |
86 | """ |
|
87 | """ | |
87 | if isinstance(path, basestring) and not path.endswith(os.path.sep): |
|
88 | if isinstance(path, basestring) and not path.endswith(os.path.sep): | |
88 | path += os.path.sep |
|
89 | path += os.path.sep | |
89 | return path |
|
90 | return path |
@@ -1,29 +1,30 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 |
|
21 | |||
22 | # Definition of setting keys used to configure this module. Defined here to |
|
22 | # Definition of setting keys used to configure this module. Defined here to | |
23 | # avoid repetition of keys throughout the module. |
|
23 | # avoid repetition of keys throughout the module. | |
24 | config_file_path = 'svn.proxy.config_file_path' |
|
24 | config_file_path = 'svn.proxy.config_file_path' | |
25 | generate_config = 'svn.proxy.generate_config' |
|
25 | generate_config = 'svn.proxy.generate_config' | |
26 | list_parent_path = 'svn.proxy.list_parent_path' |
|
26 | list_parent_path = 'svn.proxy.list_parent_path' | |
27 | location_root = 'svn.proxy.location_root' |
|
27 | location_root = 'svn.proxy.location_root' | |
28 | reload_command = 'svn.proxy.reload_cmd' |
|
28 | reload_command = 'svn.proxy.reload_cmd' | |
29 | reload_timeout = 'svn.proxy.reload_timeout' |
|
29 | reload_timeout = 'svn.proxy.reload_timeout' | |
|
30 | template = 'svn.proxy.config_template' |
@@ -1,88 +1,88 b'' | |||||
1 | # Auto generated configuration for use with the Apache mod_dav_svn module. |
|
1 | # Auto generated configuration for use with the Apache mod_dav_svn module. | |
2 | # |
|
2 | # | |
3 | # WARNING: Make sure your Apache instance which runs the mod_dav_svn module is |
|
3 | # WARNING: Make sure your Apache instance which runs the mod_dav_svn module is | |
4 | # only accessible by RhodeCode. Otherwise everyone is able to browse |
|
4 | # only accessible by RhodeCode. Otherwise everyone is able to browse | |
5 | # the repositories or run subversion operations (checkout/commit/etc.). |
|
5 | # the repositories or run subversion operations (checkout/commit/etc.). | |
6 | # |
|
6 | # | |
7 | # The mod_dav_svn module does not support subversion repositories which are |
|
7 | # The mod_dav_svn module does not support subversion repositories which are | |
8 | # organized in subfolders. To support the repository groups of RhodeCode it is |
|
8 | # organized in subfolders. To support the repository groups of RhodeCode it is | |
9 | # required to provide a <Location> block for each group pointing to the |
|
9 | # required to provide a <Location> block for each group pointing to the | |
10 | # repository group sub folder. To ease the configuration RhodeCode auto |
|
10 | # repository group sub folder. To ease the configuration RhodeCode auto | |
11 | # generates this file whenever a repository group is created/changed/deleted. |
|
11 | # generates this file whenever a repository group is created/changed/deleted. | |
12 | # Auto generation can be configured in the ini file. Settings are prefixed with |
|
12 | # Auto generation can be configured in the ini file. Settings are prefixed with | |
13 | # ``svn.proxy``. |
|
13 | # ``svn.proxy``. | |
14 | # |
|
14 | # | |
15 | # To include this configuration into your apache config you can use the |
|
15 | # To include this configuration into your apache config you can use the | |
16 | # `Include` directive. See the following example snippet of a virtual host how |
|
16 | # `Include` directive. See the following example snippet of a virtual host how | |
17 | # to include this configuration file. |
|
17 | # to include this configuration file. | |
18 | # |
|
18 | # | |
19 | # <VirtualHost *:8090> |
|
19 | # <VirtualHost *:8090> | |
20 | # ServerAdmin webmaster@localhost |
|
20 | # ServerAdmin webmaster@localhost | |
21 | # DocumentRoot /var/www/html |
|
21 | # DocumentRoot /var/www/html | |
22 | # ErrorLog ${'${APACHE_LOG_DIR}'}/error.log |
|
22 | # ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |
23 | # CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined |
|
23 | # CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |
24 | # LogLevel info |
|
24 | # LogLevel info | |
25 | # # allows custom host names, prevents 400 errors on checkout |
|
25 | # # allows custom host names, prevents 400 errors on checkout | |
26 | # HttpProtocolOptions Unsafe |
|
26 | # HttpProtocolOptions Unsafe | |
27 | # Include /path/to/generated/mod_dav_svn.conf |
|
27 | # Include /path/to/generated/mod_dav_svn.conf | |
28 | # </VirtualHost> |
|
28 | # </VirtualHost> | |
29 | # |
|
29 | # | |
30 | # Depending on the apache configuration you may encounter the following error if |
|
30 | # Depending on the apache configuration you may encounter the following error if | |
31 |
# you are using spe |
|
31 | # you are using special characters in your repository or repository group | |
32 | # names. |
|
32 | # names. | |
33 | # |
|
33 | # | |
34 | # ``Error converting entry in directory '/path/to/repo' to UTF-8`` |
|
34 | # ``Error converting entry in directory '/path/to/repo' to UTF-8`` | |
35 | # |
|
35 | # | |
36 | # In this case you have to change the LANG environment variable in the apache |
|
36 | # In this case you have to change the LANG environment variable in the apache | |
37 | # configuration. This setting is typically located at ``/etc/apache2/envvars``. |
|
37 | # configuration. This setting is typically located at ``/etc/apache2/envvars``. | |
38 | # You have to change it to an UTF-8 value like ``export LANG="en_US.UTF-8"``. |
|
38 | # You have to change it to an UTF-8 value like ``export LANG="en_US.UTF-8"``. | |
39 | # After changing this a stop and start of Apache is required (using restart |
|
39 | # After changing this a stop and start of Apache is required (using restart | |
40 | # doesn't work). |
|
40 | # doesn't work). | |
41 |
|
41 | |||
42 | # fix https -> http downgrade with DAV. It requires an header downgrade for |
|
42 | # fix https -> http downgrade with DAV. It requires an header downgrade for | |
43 | # https -> http reverse proxy to work properly |
|
43 | # https -> http reverse proxy to work properly | |
44 | % if use_https: |
|
44 | % if use_https: | |
45 | RequestHeader edit Destination ^https: http: early |
|
45 | RequestHeader edit Destination ^https: http: early | |
46 | % else: |
|
46 | % else: | |
47 | #RequestHeader edit Destination ^https: http: early |
|
47 | #RequestHeader edit Destination ^https: http: early | |
48 | % endif |
|
48 | % endif | |
49 |
|
49 | |||
50 | <Location "${location_root|n}"> |
|
50 | <Location "${location_root|n}"> | |
51 | # The mod_dav_svn module takes the username from the apache request object. |
|
51 | # The mod_dav_svn module takes the username from the apache request object. | |
52 | # Without authorization this will be empty and no username is logged for the |
|
52 | # Without authorization this will be empty and no username is logged for the | |
53 | # transactions. This will result in "(no author)" for each revision. The |
|
53 | # transactions. This will result in "(no author)" for each revision. The | |
54 | # following directives implement a fake authentication that allows every |
|
54 | # following directives implement a fake authentication that allows every | |
55 | # username/password combination. |
|
55 | # username/password combination. | |
56 | AuthType Basic |
|
56 | AuthType Basic | |
57 | AuthName "${rhodecode_realm|n}" |
|
57 | AuthName "${rhodecode_realm|n}" | |
58 | AuthBasicProvider anon |
|
58 | AuthBasicProvider anon | |
59 | Anonymous * |
|
59 | Anonymous * | |
60 | Anonymous_LogEmail off |
|
60 | Anonymous_LogEmail off | |
61 | Require valid-user |
|
61 | Require valid-user | |
62 |
|
62 | |||
63 | DAV svn |
|
63 | DAV svn | |
64 | SVNParentPath "${parent_path_root|n}" |
|
64 | SVNParentPath "${parent_path_root|n}" | |
65 | SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n} |
|
65 | SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n} | |
66 |
|
66 | |||
67 | Allow from all |
|
67 | Allow from all | |
68 | Order allow,deny |
|
68 | Order allow,deny | |
69 | </Location> |
|
69 | </Location> | |
70 |
|
70 | |||
71 | % for location, parent_path in repo_group_paths: |
|
71 | % for location, parent_path in repo_group_paths: | |
72 |
|
72 | |||
73 | <Location "${location|n}"> |
|
73 | <Location "${location|n}"> | |
74 | AuthType Basic |
|
74 | AuthType Basic | |
75 | AuthName "${rhodecode_realm|n}" |
|
75 | AuthName "${rhodecode_realm|n}" | |
76 | AuthBasicProvider anon |
|
76 | AuthBasicProvider anon | |
77 | Anonymous * |
|
77 | Anonymous * | |
78 | Anonymous_LogEmail off |
|
78 | Anonymous_LogEmail off | |
79 | Require valid-user |
|
79 | Require valid-user | |
80 |
|
80 | |||
81 | DAV svn |
|
81 | DAV svn | |
82 | SVNParentPath "${parent_path|n}" |
|
82 | SVNParentPath "${parent_path|n}" | |
83 | SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n} |
|
83 | SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n} | |
84 |
|
84 | |||
85 | Allow from all |
|
85 | Allow from all | |
86 | Order allow,deny |
|
86 | Order allow,deny | |
87 | </Location> |
|
87 | </Location> | |
88 | % endfor |
|
88 | % endfor |
@@ -1,107 +1,126 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 |
|
21 | import re | ||
|
22 | import os | |||
22 | import mock |
|
23 | import mock | |
23 | import pytest |
|
24 | import pytest | |
24 | import re |
|
|||
25 |
|
25 | |||
26 | from pyramid import testing |
|
26 | from pyramid import testing | |
27 |
|
27 | |||
28 | from rhodecode.apps.svn_support import utils |
|
28 | from rhodecode.apps.svn_support import utils | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | class TestModDavSvnConfig(object): |
|
31 | class TestModDavSvnConfig(object): | |
32 |
|
32 | |||
33 | @classmethod |
|
33 | @classmethod | |
34 | def setup_class(cls): |
|
34 | def setup_class(cls): | |
35 | # Make mako renderer available in tests. |
|
35 | # Make mako renderer available in tests. | |
36 | config = testing.setUp() |
|
36 | config = testing.setUp() | |
37 | config.include('pyramid_mako') |
|
37 | config.include('pyramid_mako') | |
38 |
|
38 | |||
39 | cls.location_root = u'/location/root/ç¡Àâ' |
|
39 | cls.location_root = u'/location/root/ç¡Àâ' | |
40 | cls.parent_path_root = u'/parent/path/ç¡Àâ' |
|
40 | cls.parent_path_root = u'/parent/path/ç¡Àâ' | |
41 | cls.realm = u'Dummy Realm (Àâüç¡)' |
|
41 | cls.realm = u'Dummy Realm (Àâüç¡)' | |
42 |
|
42 | |||
43 | @classmethod |
|
43 | @classmethod | |
44 | def get_repo_group_mocks(cls, count=1): |
|
44 | def get_repo_group_mocks(cls, count=1): | |
45 | repo_groups = [] |
|
45 | repo_groups = [] | |
46 | for num in range(0, count): |
|
46 | for num in range(0, count): | |
47 | full_path = u'/path/to/RepâGrâúp-°¡ {}'.format(num) |
|
47 | full_path = u'/path/to/RepâGrâúp-°¡ {}'.format(num) | |
48 | repo_group_mock = mock.MagicMock() |
|
48 | repo_group_mock = mock.MagicMock() | |
49 | repo_group_mock.full_path = full_path |
|
49 | repo_group_mock.full_path = full_path | |
50 | repo_group_mock.full_path_splitted = full_path.split('/') |
|
50 | repo_group_mock.full_path_splitted = full_path.split('/') | |
51 | repo_groups.append(repo_group_mock) |
|
51 | repo_groups.append(repo_group_mock) | |
52 | return repo_groups |
|
52 | return repo_groups | |
53 |
|
53 | |||
54 | def assert_root_location_directive(self, config): |
|
54 | def assert_root_location_directive(self, config): | |
55 | pattern = u'<Location "{location}">'.format( |
|
55 | pattern = u'<Location "{location}">'.format( | |
56 | location=self.location_root) |
|
56 | location=self.location_root) | |
57 | assert len(re.findall(pattern, config)) == 1 |
|
57 | assert len(re.findall(pattern, config)) == 1 | |
58 |
|
58 | |||
59 | def assert_group_location_directive(self, config, group_path): |
|
59 | def assert_group_location_directive(self, config, group_path): | |
60 | pattern = u'<Location "{location}{group_path}">'.format( |
|
60 | pattern = u'<Location "{location}{group_path}">'.format( | |
61 | location=self.location_root, group_path=group_path) |
|
61 | location=self.location_root, group_path=group_path) | |
62 | assert len(re.findall(pattern, config)) == 1 |
|
62 | assert len(re.findall(pattern, config)) == 1 | |
63 |
|
63 | |||
64 | def test_render_mod_dav_svn_config(self): |
|
64 | def test_render_mod_dav_svn_config(self): | |
65 | repo_groups = self.get_repo_group_mocks(count=10) |
|
65 | repo_groups = self.get_repo_group_mocks(count=10) | |
66 | generated_config = utils._render_mod_dav_svn_config( |
|
66 | generated_config = utils._render_mod_dav_svn_config( | |
67 | parent_path_root=self.parent_path_root, |
|
67 | parent_path_root=self.parent_path_root, | |
68 | list_parent_path=True, |
|
68 | list_parent_path=True, | |
69 | location_root=self.location_root, |
|
69 | location_root=self.location_root, | |
70 | repo_groups=repo_groups, |
|
70 | repo_groups=repo_groups, | |
71 | realm=self.realm, |
|
71 | realm=self.realm, | |
72 | use_ssl=True |
|
72 | use_ssl=True, | |
|
73 | template='' | |||
73 | ) |
|
74 | ) | |
74 | # Assert that one location directive exists for each repository group. |
|
75 | # Assert that one location directive exists for each repository group. | |
75 | for group in repo_groups: |
|
76 | for group in repo_groups: | |
76 | self.assert_group_location_directive( |
|
77 | self.assert_group_location_directive( | |
77 | generated_config, group.full_path) |
|
78 | generated_config, group.full_path) | |
78 |
|
79 | |||
79 | # Assert that the root location directive exists. |
|
80 | # Assert that the root location directive exists. | |
80 | self.assert_root_location_directive(generated_config) |
|
81 | self.assert_root_location_directive(generated_config) | |
81 |
|
82 | |||
|
83 | def test_render_mod_dav_svn_config_with_alternative_template(self, tmpdir): | |||
|
84 | repo_groups = self.get_repo_group_mocks(count=10) | |||
|
85 | test_file_path = os.path.join(str(tmpdir), 'example.mako') | |||
|
86 | with open(test_file_path, 'wb') as f: | |||
|
87 | f.write('TEST_EXAMPLE\n') | |||
|
88 | ||||
|
89 | generated_config = utils._render_mod_dav_svn_config( | |||
|
90 | parent_path_root=self.parent_path_root, | |||
|
91 | list_parent_path=True, | |||
|
92 | location_root=self.location_root, | |||
|
93 | repo_groups=repo_groups, | |||
|
94 | realm=self.realm, | |||
|
95 | use_ssl=True, | |||
|
96 | template=test_file_path | |||
|
97 | ) | |||
|
98 | assert 'TEST_EXAMPLE' in generated_config | |||
|
99 | ||||
82 | @pytest.mark.parametrize('list_parent_path', [True, False]) |
|
100 | @pytest.mark.parametrize('list_parent_path', [True, False]) | |
83 | @pytest.mark.parametrize('use_ssl', [True, False]) |
|
101 | @pytest.mark.parametrize('use_ssl', [True, False]) | |
84 | def test_list_parent_path(self, list_parent_path, use_ssl): |
|
102 | def test_list_parent_path(self, list_parent_path, use_ssl): | |
85 | generated_config = utils._render_mod_dav_svn_config( |
|
103 | generated_config = utils._render_mod_dav_svn_config( | |
86 | parent_path_root=self.parent_path_root, |
|
104 | parent_path_root=self.parent_path_root, | |
87 | list_parent_path=list_parent_path, |
|
105 | list_parent_path=list_parent_path, | |
88 | location_root=self.location_root, |
|
106 | location_root=self.location_root, | |
89 | repo_groups=self.get_repo_group_mocks(count=10), |
|
107 | repo_groups=self.get_repo_group_mocks(count=10), | |
90 | realm=self.realm, |
|
108 | realm=self.realm, | |
91 | use_ssl=use_ssl |
|
109 | use_ssl=use_ssl, | |
|
110 | template='' | |||
92 | ) |
|
111 | ) | |
93 |
|
112 | |||
94 | # Assert that correct configuration directive is present. |
|
113 | # Assert that correct configuration directive is present. | |
95 | if list_parent_path: |
|
114 | if list_parent_path: | |
96 | assert not re.search('SVNListParentPath\s+Off', generated_config) |
|
115 | assert not re.search('SVNListParentPath\s+Off', generated_config) | |
97 | assert re.search('SVNListParentPath\s+On', generated_config) |
|
116 | assert re.search('SVNListParentPath\s+On', generated_config) | |
98 | else: |
|
117 | else: | |
99 | assert re.search('SVNListParentPath\s+Off', generated_config) |
|
118 | assert re.search('SVNListParentPath\s+Off', generated_config) | |
100 | assert not re.search('SVNListParentPath\s+On', generated_config) |
|
119 | assert not re.search('SVNListParentPath\s+On', generated_config) | |
101 |
|
120 | |||
102 | if use_ssl: |
|
121 | if use_ssl: | |
103 | assert 'RequestHeader edit Destination ^https: http: early' \ |
|
122 | assert 'RequestHeader edit Destination ^https: http: early' \ | |
104 | in generated_config |
|
123 | in generated_config | |
105 | else: |
|
124 | else: | |
106 | assert '#RequestHeader edit Destination ^https: http: early' \ |
|
125 | assert '#RequestHeader edit Destination ^https: http: early' \ | |
107 | in generated_config |
|
126 | in generated_config |
@@ -1,93 +1,93 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | import codecs |
|
21 | import codecs | |
22 | import logging |
|
22 | import logging | |
23 | import os |
|
23 | import os | |
24 | from pyramid.renderers import render |
|
24 | from pyramid.renderers import render | |
25 |
|
25 | |||
26 | from rhodecode.events import trigger |
|
26 | from rhodecode.events import trigger | |
27 | from rhodecode.lib.utils import get_rhodecode_realm, get_rhodecode_base_path |
|
27 | from rhodecode.lib.utils import get_rhodecode_realm, get_rhodecode_base_path | |
28 | from rhodecode.lib.utils2 import str2bool |
|
28 | from rhodecode.lib.utils2 import str2bool | |
29 | from rhodecode.model.db import RepoGroup |
|
29 | from rhodecode.model.db import RepoGroup | |
30 |
|
30 | |||
31 | from . import config_keys |
|
31 | from . import config_keys | |
32 | from .events import ModDavSvnConfigChange |
|
32 | from .events import ModDavSvnConfigChange | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | log = logging.getLogger(__name__) |
|
35 | log = logging.getLogger(__name__) | |
36 |
|
36 | |||
37 |
|
37 | |||
38 | def generate_mod_dav_svn_config(registry): |
|
38 | def generate_mod_dav_svn_config(registry): | |
39 | """ |
|
39 | """ | |
40 | Generate the configuration file for use with subversion's mod_dav_svn |
|
40 | Generate the configuration file for use with subversion's mod_dav_svn | |
41 | module. The configuration has to contain a <Location> block for each |
|
41 | module. The configuration has to contain a <Location> block for each | |
42 | available repository group because the mod_dav_svn module does not support |
|
42 | available repository group because the mod_dav_svn module does not support | |
43 | repositories organized in sub folders. |
|
43 | repositories organized in sub folders. | |
44 | """ |
|
44 | """ | |
45 | settings = registry.settings |
|
45 | settings = registry.settings | |
46 | use_ssl = str2bool(registry.settings['force_https']) |
|
46 | use_ssl = str2bool(registry.settings['force_https']) | |
47 |
|
47 | |||
48 | config = _render_mod_dav_svn_config( |
|
48 | config = _render_mod_dav_svn_config( | |
49 | use_ssl=use_ssl, |
|
49 | use_ssl=use_ssl, | |
50 | parent_path_root=get_rhodecode_base_path(), |
|
50 | parent_path_root=get_rhodecode_base_path(), | |
51 | list_parent_path=settings[config_keys.list_parent_path], |
|
51 | list_parent_path=settings[config_keys.list_parent_path], | |
52 | location_root=settings[config_keys.location_root], |
|
52 | location_root=settings[config_keys.location_root], | |
53 | repo_groups=RepoGroup.get_all_repo_groups(), |
|
53 | repo_groups=RepoGroup.get_all_repo_groups(), | |
54 | realm=get_rhodecode_realm()) |
|
54 | realm=get_rhodecode_realm(), template=settings[config_keys.template]) | |
55 | _write_mod_dav_svn_config(config, settings[config_keys.config_file_path]) |
|
55 | _write_mod_dav_svn_config(config, settings[config_keys.config_file_path]) | |
56 |
|
56 | |||
57 | # Trigger an event on mod dav svn configuration change. |
|
57 | # Trigger an event on mod dav svn configuration change. | |
58 | trigger(ModDavSvnConfigChange(), registry) |
|
58 | trigger(ModDavSvnConfigChange(), registry) | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | def _render_mod_dav_svn_config( |
|
61 | def _render_mod_dav_svn_config( | |
62 | parent_path_root, list_parent_path, location_root, repo_groups, realm, |
|
62 | parent_path_root, list_parent_path, location_root, repo_groups, realm, | |
63 | use_ssl): |
|
63 | use_ssl, template): | |
64 | """ |
|
64 | """ | |
65 | Render mod_dav_svn configuration to string. |
|
65 | Render mod_dav_svn configuration to string. | |
66 | """ |
|
66 | """ | |
67 | repo_group_paths = [] |
|
67 | repo_group_paths = [] | |
68 | for repo_group in repo_groups: |
|
68 | for repo_group in repo_groups: | |
69 | group_path = repo_group.full_path_splitted |
|
69 | group_path = repo_group.full_path_splitted | |
70 | location = os.path.join(location_root, *group_path) |
|
70 | location = os.path.join(location_root, *group_path) | |
71 | parent_path = os.path.join(parent_path_root, *group_path) |
|
71 | parent_path = os.path.join(parent_path_root, *group_path) | |
72 | repo_group_paths.append((location, parent_path)) |
|
72 | repo_group_paths.append((location, parent_path)) | |
73 |
|
73 | |||
74 | context = { |
|
74 | context = { | |
75 | 'location_root': location_root, |
|
75 | 'location_root': location_root, | |
76 | 'parent_path_root': parent_path_root, |
|
76 | 'parent_path_root': parent_path_root, | |
77 | 'repo_group_paths': repo_group_paths, |
|
77 | 'repo_group_paths': repo_group_paths, | |
78 | 'svn_list_parent_path': list_parent_path, |
|
78 | 'svn_list_parent_path': list_parent_path, | |
79 | 'rhodecode_realm': realm, |
|
79 | 'rhodecode_realm': realm, | |
80 | 'use_https': use_ssl |
|
80 | 'use_https': use_ssl, | |
81 | } |
|
81 | } | |
82 |
|
82 | template = template or \ | ||
|
83 | 'rhodecode:apps/svn_support/templates/mod-dav-svn.conf.mako' | |||
83 | # Render the configuration template to string. |
|
84 | # Render the configuration template to string. | |
84 | template = 'rhodecode:apps/svn_support/templates/mod-dav-svn.conf.mako' |
|
|||
85 | return render(template, context) |
|
85 | return render(template, context) | |
86 |
|
86 | |||
87 |
|
87 | |||
88 | def _write_mod_dav_svn_config(config, filepath): |
|
88 | def _write_mod_dav_svn_config(config, filepath): | |
89 | """ |
|
89 | """ | |
90 | Write mod_dav_svn config to file. |
|
90 | Write mod_dav_svn config to file. | |
91 | """ |
|
91 | """ | |
92 | with codecs.open(filepath, 'w', encoding='utf-8') as f: |
|
92 | with codecs.open(filepath, 'w', encoding='utf-8') as f: | |
93 | f.write(config) |
|
93 | f.write(config) |
General Comments 0
You need to be logged in to leave comments.
Login now