Show More
@@ -1,849 +1,852 b'' | |||||
1 |
|
1 | |||
2 | ; ######################################### |
|
2 | ; ######################################### | |
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION |
|
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION | |
4 | ; ######################################### |
|
4 | ; ######################################### | |
5 |
|
5 | |||
6 | [DEFAULT] |
|
6 | [DEFAULT] | |
7 | ; Debug flag sets all loggers to debug, and enables request tracking |
|
7 | ; Debug flag sets all loggers to debug, and enables request tracking | |
8 | debug = true |
|
8 | debug = true | |
9 |
|
9 | |||
10 | ; ######################################################################## |
|
10 | ; ######################################################################## | |
11 | ; EMAIL CONFIGURATION |
|
11 | ; EMAIL CONFIGURATION | |
12 | ; These settings will be used by the RhodeCode mailing system |
|
12 | ; These settings will be used by the RhodeCode mailing system | |
13 | ; ######################################################################## |
|
13 | ; ######################################################################## | |
14 |
|
14 | |||
15 | ; prefix all emails subjects with given prefix, helps filtering out emails |
|
15 | ; prefix all emails subjects with given prefix, helps filtering out emails | |
16 | #email_prefix = [RhodeCode] |
|
16 | #email_prefix = [RhodeCode] | |
17 |
|
17 | |||
18 | ; email FROM address all mails will be sent |
|
18 | ; email FROM address all mails will be sent | |
19 | #app_email_from = rhodecode-noreply@localhost |
|
19 | #app_email_from = rhodecode-noreply@localhost | |
20 |
|
20 | |||
21 | #smtp_server = mail.server.com |
|
21 | #smtp_server = mail.server.com | |
22 | #smtp_username = |
|
22 | #smtp_username = | |
23 | #smtp_password = |
|
23 | #smtp_password = | |
24 | #smtp_port = |
|
24 | #smtp_port = | |
25 | #smtp_use_tls = false |
|
25 | #smtp_use_tls = false | |
26 | #smtp_use_ssl = true |
|
26 | #smtp_use_ssl = true | |
27 |
|
27 | |||
28 | [server:main] |
|
28 | [server:main] | |
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, |
|
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, | |
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py |
|
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py | |
31 | host = 127.0.0.1 |
|
31 | host = 127.0.0.1 | |
32 | port = 10020 |
|
32 | port = 10020 | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | ; ########################### |
|
35 | ; ########################### | |
36 | ; GUNICORN APPLICATION SERVER |
|
36 | ; GUNICORN APPLICATION SERVER | |
37 | ; ########################### |
|
37 | ; ########################### | |
38 |
|
38 | |||
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py |
|
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py | |
40 |
|
40 | |||
41 | ; Module to use, this setting shouldn't be changed |
|
41 | ; Module to use, this setting shouldn't be changed | |
42 | use = egg:gunicorn#main |
|
42 | use = egg:gunicorn#main | |
43 |
|
43 | |||
44 | ; Prefix middleware for RhodeCode. |
|
44 | ; Prefix middleware for RhodeCode. | |
45 | ; recommended when using proxy setup. |
|
45 | ; recommended when using proxy setup. | |
46 | ; allows to set RhodeCode under a prefix in server. |
|
46 | ; allows to set RhodeCode under a prefix in server. | |
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. | |
48 | ; And set your prefix like: `prefix = /custom_prefix` |
|
48 | ; And set your prefix like: `prefix = /custom_prefix` | |
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need | |
50 | ; to make your cookies only work on prefix url |
|
50 | ; to make your cookies only work on prefix url | |
51 | [filter:proxy-prefix] |
|
51 | [filter:proxy-prefix] | |
52 | use = egg:PasteDeploy#prefix |
|
52 | use = egg:PasteDeploy#prefix | |
53 | prefix = / |
|
53 | prefix = / | |
54 |
|
54 | |||
55 | [app:main] |
|
55 | [app:main] | |
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory |
|
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory | |
57 | ; of this file |
|
57 | ; of this file | |
58 | ; Each option in the app:main can be override by an environmental variable |
|
58 | ; Each option in the app:main can be override by an environmental variable | |
59 | ; |
|
59 | ; | |
60 | ;To override an option: |
|
60 | ;To override an option: | |
61 | ; |
|
61 | ; | |
62 | ;RC_<KeyName> |
|
62 | ;RC_<KeyName> | |
63 | ;Everything should be uppercase, . and - should be replaced by _. |
|
63 | ;Everything should be uppercase, . and - should be replaced by _. | |
64 | ;For example, if you have these configuration settings: |
|
64 | ;For example, if you have these configuration settings: | |
65 | ;rc_cache.repo_object.backend = foo |
|
65 | ;rc_cache.repo_object.backend = foo | |
66 | ;can be overridden by |
|
66 | ;can be overridden by | |
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo |
|
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo | |
68 |
|
68 | |||
69 | use = egg:rhodecode-enterprise-ce |
|
69 | use = egg:rhodecode-enterprise-ce | |
70 |
|
70 | |||
71 | ; enable proxy prefix middleware, defined above |
|
71 | ; enable proxy prefix middleware, defined above | |
72 | #filter-with = proxy-prefix |
|
72 | #filter-with = proxy-prefix | |
73 |
|
73 | |||
74 | ; ############# |
|
74 | ; ############# | |
75 | ; DEBUG OPTIONS |
|
75 | ; DEBUG OPTIONS | |
76 | ; ############# |
|
76 | ; ############# | |
77 |
|
77 | |||
78 | pyramid.reload_templates = true |
|
78 | pyramid.reload_templates = true | |
79 |
|
79 | |||
80 | # During development the we want to have the debug toolbar enabled |
|
80 | # During development the we want to have the debug toolbar enabled | |
81 | pyramid.includes = |
|
81 | pyramid.includes = | |
82 | pyramid_debugtoolbar |
|
82 | pyramid_debugtoolbar | |
83 |
|
83 | |||
84 | debugtoolbar.hosts = 0.0.0.0/0 |
|
84 | debugtoolbar.hosts = 0.0.0.0/0 | |
85 | debugtoolbar.exclude_prefixes = |
|
85 | debugtoolbar.exclude_prefixes = | |
86 | /css |
|
86 | /css | |
87 | /fonts |
|
87 | /fonts | |
88 | /images |
|
88 | /images | |
89 | /js |
|
89 | /js | |
90 |
|
90 | |||
91 | ## RHODECODE PLUGINS ## |
|
91 | ## RHODECODE PLUGINS ## | |
92 | rhodecode.includes = |
|
92 | rhodecode.includes = | |
93 | rhodecode.api |
|
93 | rhodecode.api | |
94 |
|
94 | |||
95 |
|
95 | |||
96 | # api prefix url |
|
96 | # api prefix url | |
97 | rhodecode.api.url = /_admin/api |
|
97 | rhodecode.api.url = /_admin/api | |
98 |
|
98 | |||
99 | ; enable debug style page |
|
99 | ; enable debug style page | |
100 | debug_style = true |
|
100 | debug_style = true | |
101 |
|
101 | |||
102 | ; ################# |
|
102 | ; ################# | |
103 | ; END DEBUG OPTIONS |
|
103 | ; END DEBUG OPTIONS | |
104 | ; ################# |
|
104 | ; ################# | |
105 |
|
105 | |||
106 | ; encryption key used to encrypt social plugin tokens, |
|
106 | ; encryption key used to encrypt social plugin tokens, | |
107 | ; remote_urls with credentials etc, if not set it defaults to |
|
107 | ; remote_urls with credentials etc, if not set it defaults to | |
108 | ; `beaker.session.secret` |
|
108 | ; `beaker.session.secret` | |
109 | #rhodecode.encrypted_values.secret = |
|
109 | #rhodecode.encrypted_values.secret = | |
110 |
|
110 | |||
111 | ; decryption strict mode (enabled by default). It controls if decryption raises |
|
111 | ; decryption strict mode (enabled by default). It controls if decryption raises | |
112 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
112 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. | |
113 | #rhodecode.encrypted_values.strict = false |
|
113 | #rhodecode.encrypted_values.strict = false | |
114 |
|
114 | |||
115 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) |
|
115 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) | |
116 | ; fernet is safer, and we strongly recommend switching to it. |
|
116 | ; fernet is safer, and we strongly recommend switching to it. | |
117 | ; Due to backward compatibility aes is used as default. |
|
117 | ; Due to backward compatibility aes is used as default. | |
118 | #rhodecode.encrypted_values.algorithm = fernet |
|
118 | #rhodecode.encrypted_values.algorithm = fernet | |
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 | ; Auto-generate javascript routes file on startup |
|
123 | ; Auto-generate javascript routes file on startup | |
124 | generate_js_files = false |
|
124 | generate_js_files = false | |
125 |
|
125 | |||
126 | ; System global default language. |
|
126 | ; System global default language. | |
127 | ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
127 | ; All available languages: 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 and import on each server start. |
|
130 | ; Perform a full repository scan and import on each server start. | |
131 | ; Settings this to true could lead to very long startup time. |
|
131 | ; Settings this to true could lead to very long startup time. | |
132 | startup.import_repos = false |
|
132 | startup.import_repos = false | |
133 |
|
133 | |||
134 | ; URL at which the application is running. This is used for Bootstrapping |
|
134 | ; URL at which the application is running. This is used for Bootstrapping | |
135 | ; requests in context when no web request is available. Used in ishell, or |
|
135 | ; requests in context when no web request is available. Used in ishell, or | |
136 | ; SSH calls. Set this for events to receive proper url for SSH calls. |
|
136 | ; SSH calls. Set this for events to receive proper url for SSH calls. | |
137 | app.base_url = http://rhodecode.local |
|
137 | app.base_url = http://rhodecode.local | |
138 |
|
138 | |||
139 | ; Host at which the Service API is running. |
|
139 | ; Host at which the Service API is running. | |
140 | app.service_api.host = http://rhodecode.local:10020 |
|
140 | app.service_api.host = http://rhodecode.local:10020 | |
141 |
|
141 | |||
142 | ; Secret for Service API authentication. |
|
142 | ; Secret for Service API authentication. | |
143 | app.service_api.token = |
|
143 | app.service_api.token = | |
144 |
|
144 | |||
145 | ; Unique application ID. Should be a random unique string for security. |
|
145 | ; Unique application ID. Should be a random unique string for security. | |
146 | app_instance_uuid = rc-production |
|
146 | app_instance_uuid = rc-production | |
147 |
|
147 | |||
148 | ; Cut off limit for large diffs (size in bytes). If overall diff size on |
|
148 | ; Cut off limit for large diffs (size in bytes). If overall diff size on | |
149 | ; commit, or pull request exceeds this limit this diff will be displayed |
|
149 | ; commit, or pull request exceeds this limit this diff will be displayed | |
150 | ; partially. E.g 512000 == 512Kb |
|
150 | ; partially. E.g 512000 == 512Kb | |
151 | cut_off_limit_diff = 512000 |
|
151 | cut_off_limit_diff = 512000 | |
152 |
|
152 | |||
153 | ; Cut off limit for large files inside diffs (size in bytes). Each individual |
|
153 | ; Cut off limit for large files inside diffs (size in bytes). Each individual | |
154 | ; file inside diff which exceeds this limit will be displayed partially. |
|
154 | ; file inside diff which exceeds this limit will be displayed partially. | |
155 | ; E.g 128000 == 128Kb |
|
155 | ; E.g 128000 == 128Kb | |
156 | cut_off_limit_file = 128000 |
|
156 | cut_off_limit_file = 128000 | |
157 |
|
157 | |||
158 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` |
|
158 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` | |
159 | vcs_full_cache = true |
|
159 | vcs_full_cache = true | |
160 |
|
160 | |||
161 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. |
|
161 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. | |
162 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache |
|
162 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache | |
163 | force_https = false |
|
163 | force_https = false | |
164 |
|
164 | |||
165 | ; use Strict-Transport-Security headers |
|
165 | ; use Strict-Transport-Security headers | |
166 | use_htsts = false |
|
166 | use_htsts = false | |
167 |
|
167 | |||
168 | ; Set to true if your repos are exposed using the dumb protocol |
|
168 | ; Set to true if your repos are exposed using the dumb protocol | |
169 | git_update_server_info = false |
|
169 | git_update_server_info = false | |
170 |
|
170 | |||
171 | ; RSS/ATOM feed options |
|
171 | ; RSS/ATOM feed options | |
172 | rss_cut_off_limit = 256000 |
|
172 | rss_cut_off_limit = 256000 | |
173 | rss_items_per_page = 10 |
|
173 | rss_items_per_page = 10 | |
174 | rss_include_diff = false |
|
174 | rss_include_diff = false | |
175 |
|
175 | |||
176 | ; gist URL alias, used to create nicer urls for gist. This should be an |
|
176 | ; gist URL alias, used to create nicer urls for gist. This should be an | |
177 | ; url that does rewrites to _admin/gists/{gistid}. |
|
177 | ; url that does rewrites to _admin/gists/{gistid}. | |
178 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
178 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal | |
179 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
179 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} | |
180 | gist_alias_url = |
|
180 | gist_alias_url = | |
181 |
|
181 | |||
182 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
182 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be | |
183 | ; used for access. |
|
183 | ; used for access. | |
184 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
184 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it | |
185 | ; came from the the logged in user who own this authentication token. |
|
185 | ; came from the the logged in user who own this authentication token. | |
186 | ; Additionally @TOKEN syntax can be used to bound the view to specific |
|
186 | ; Additionally @TOKEN syntax can be used to bound the view to specific | |
187 | ; authentication token. Such view would be only accessible when used together |
|
187 | ; authentication token. Such view would be only accessible when used together | |
188 | ; with this authentication token |
|
188 | ; with this authentication token | |
189 | ; list of all views can be found under `/_admin/permissions/auth_token_access` |
|
189 | ; list of all views can be found under `/_admin/permissions/auth_token_access` | |
190 | ; The list should be "," separated and on a single line. |
|
190 | ; The list should be "," separated and on a single line. | |
191 | ; Most common views to enable: |
|
191 | ; Most common views to enable: | |
192 |
|
192 | |||
193 | # RepoCommitsView:repo_commit_download |
|
193 | # RepoCommitsView:repo_commit_download | |
194 | # RepoCommitsView:repo_commit_patch |
|
194 | # RepoCommitsView:repo_commit_patch | |
195 | # RepoCommitsView:repo_commit_raw |
|
195 | # RepoCommitsView:repo_commit_raw | |
196 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
196 | # RepoCommitsView:repo_commit_raw@TOKEN | |
197 | # RepoFilesView:repo_files_diff |
|
197 | # RepoFilesView:repo_files_diff | |
198 | # RepoFilesView:repo_archivefile |
|
198 | # RepoFilesView:repo_archivefile | |
199 | # RepoFilesView:repo_file_raw |
|
199 | # RepoFilesView:repo_file_raw | |
200 | # GistView:* |
|
200 | # GistView:* | |
201 | api_access_controllers_whitelist = |
|
201 | api_access_controllers_whitelist = | |
202 |
|
202 | |||
203 | ; Default encoding used to convert from and to unicode |
|
203 | ; Default encoding used to convert from and to unicode | |
204 | ; can be also a comma separated list of encoding in case of mixed encodings |
|
204 | ; can be also a comma separated list of encoding in case of mixed encodings | |
205 | default_encoding = UTF-8 |
|
205 | default_encoding = UTF-8 | |
206 |
|
206 | |||
207 | ; instance-id prefix |
|
207 | ; instance-id prefix | |
208 | ; a prefix key for this instance used for cache invalidation when running |
|
208 | ; a prefix key for this instance used for cache invalidation when running | |
209 | ; multiple instances of RhodeCode, make sure it's globally unique for |
|
209 | ; multiple instances of RhodeCode, make sure it's globally unique for | |
210 | ; all running RhodeCode instances. Leave empty if you don't use it |
|
210 | ; all running RhodeCode instances. Leave empty if you don't use it | |
211 | instance_id = |
|
211 | instance_id = | |
212 |
|
212 | |||
213 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
213 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage | |
214 | ; of an authentication plugin also if it is disabled by it's settings. |
|
214 | ; of an authentication plugin also if it is disabled by it's settings. | |
215 | ; This could be useful if you are unable to log in to the system due to broken |
|
215 | ; This could be useful if you are unable to log in to the system due to broken | |
216 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth |
|
216 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth | |
217 | ; module to log in again and fix the settings. |
|
217 | ; module to log in again and fix the settings. | |
218 | ; Available builtin plugin IDs (hash is part of the ID): |
|
218 | ; Available builtin plugin IDs (hash is part of the ID): | |
219 | ; egg:rhodecode-enterprise-ce#rhodecode |
|
219 | ; egg:rhodecode-enterprise-ce#rhodecode | |
220 | ; egg:rhodecode-enterprise-ce#pam |
|
220 | ; egg:rhodecode-enterprise-ce#pam | |
221 | ; egg:rhodecode-enterprise-ce#ldap |
|
221 | ; egg:rhodecode-enterprise-ce#ldap | |
222 | ; egg:rhodecode-enterprise-ce#jasig_cas |
|
222 | ; egg:rhodecode-enterprise-ce#jasig_cas | |
223 | ; egg:rhodecode-enterprise-ce#headers |
|
223 | ; egg:rhodecode-enterprise-ce#headers | |
224 | ; egg:rhodecode-enterprise-ce#crowd |
|
224 | ; egg:rhodecode-enterprise-ce#crowd | |
225 |
|
225 | |||
226 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
226 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode | |
227 |
|
227 | |||
228 | ; Flag to control loading of legacy plugins in py:/path format |
|
228 | ; Flag to control loading of legacy plugins in py:/path format | |
229 | auth_plugin.import_legacy_plugins = true |
|
229 | auth_plugin.import_legacy_plugins = true | |
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 authentication |
|
235 | ; This will be served instead of default 401 on bad authentication | |
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 | ; Filesystem location were repositories should be stored |
|
247 | ; Filesystem location were repositories should be stored | |
248 | repo_store.path = /var/opt/rhodecode_repo_store |
|
248 | repo_store.path = /var/opt/rhodecode_repo_store | |
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 required for EE edition license. |
|
253 | ; Generated license token required for EE edition license. | |
254 | ; New generated token value can be found in Admin > settings > license page. |
|
254 | ; New generated token value can be found in Admin > settings > license page. | |
255 | license_token = |
|
255 | license_token = | |
256 |
|
256 | |||
257 | ; This flag hides sensitive information on the license page such as token, and license data |
|
257 | ; This flag hides sensitive information on the license page such as token, and license data | |
258 | license.hide_license_info = false |
|
258 | license.hide_license_info = false | |
259 |
|
259 | |||
260 | ; supervisor connection uri, for managing supervisor and logs. |
|
260 | ; supervisor connection uri, for managing supervisor and logs. | |
261 | supervisor.uri = |
|
261 | supervisor.uri = | |
262 |
|
262 | |||
263 | ; supervisord group name/id we only want this RC instance to handle |
|
263 | ; supervisord group name/id we only want this RC instance to handle | |
264 | supervisor.group_id = dev |
|
264 | supervisor.group_id = dev | |
265 |
|
265 | |||
266 | ; Display extended labs settings |
|
266 | ; Display extended labs settings | |
267 | labs_settings_active = true |
|
267 | labs_settings_active = true | |
268 |
|
268 | |||
269 | ; Custom exception store path, defaults to TMPDIR |
|
269 | ; Custom exception store path, defaults to TMPDIR | |
270 | ; This is used to store exception from RhodeCode in shared directory |
|
270 | ; This is used to store exception from RhodeCode in shared directory | |
271 | #exception_tracker.store_path = |
|
271 | #exception_tracker.store_path = | |
272 |
|
272 | |||
273 | ; Send email with exception details when it happens |
|
273 | ; Send email with exception details when it happens | |
274 | #exception_tracker.send_email = false |
|
274 | #exception_tracker.send_email = false | |
275 |
|
275 | |||
276 | ; Comma separated list of recipients for exception emails, |
|
276 | ; Comma separated list of recipients for exception emails, | |
277 | ; e.g admin@rhodecode.com,devops@rhodecode.com |
|
277 | ; e.g admin@rhodecode.com,devops@rhodecode.com | |
278 | ; Can be left empty, then emails will be sent to ALL super-admins |
|
278 | ; Can be left empty, then emails will be sent to ALL super-admins | |
279 | #exception_tracker.send_email_recipients = |
|
279 | #exception_tracker.send_email_recipients = | |
280 |
|
280 | |||
281 | ; optional prefix to Add to email Subject |
|
281 | ; optional prefix to Add to email Subject | |
282 | #exception_tracker.email_prefix = [RHODECODE ERROR] |
|
282 | #exception_tracker.email_prefix = [RHODECODE ERROR] | |
283 |
|
283 | |||
284 | ; File store configuration. This is used to store and serve uploaded files |
|
284 | ; File store configuration. This is used to store and serve uploaded files | |
285 | file_store.enabled = true |
|
285 | file_store.enabled = true | |
286 |
|
286 | |||
287 | ; Storage backend, available options are: local |
|
287 | ; Storage backend, available options are: local | |
288 | file_store.backend = local |
|
288 | file_store.backend = local | |
289 |
|
289 | |||
290 | ; path to store the uploaded binaries and artifacts |
|
290 | ; path to store the uploaded binaries and artifacts | |
291 | file_store.storage_path = /var/opt/rhodecode_data/file_store |
|
291 | file_store.storage_path = /var/opt/rhodecode_data/file_store | |
292 |
|
292 | |||
293 |
|
293 | |||
294 | ; Redis url to acquire/check generation of archives locks |
|
294 | ; Redis url to acquire/check generation of archives locks | |
295 | archive_cache.locking.url = redis://redis:6379/1 |
|
295 | archive_cache.locking.url = redis://redis:6379/1 | |
296 |
|
296 | |||
297 | ; Storage backend, only 'filesystem' and 'objectstore' are available now |
|
297 | ; Storage backend, only 'filesystem' and 'objectstore' are available now | |
298 | archive_cache.backend.type = filesystem |
|
298 | archive_cache.backend.type = filesystem | |
299 |
|
299 | |||
300 | ; url for s3 compatible storage that allows to upload artifacts |
|
300 | ; url for s3 compatible storage that allows to upload artifacts | |
301 | ; e.g http://minio:9000 |
|
301 | ; e.g http://minio:9000 | |
302 | archive_cache.objectstore.url = http://s3-minio:9000 |
|
302 | archive_cache.objectstore.url = http://s3-minio:9000 | |
303 |
|
303 | |||
304 | ; key for s3 auth |
|
304 | ; key for s3 auth | |
305 | archive_cache.objectstore.key = key |
|
305 | archive_cache.objectstore.key = key | |
306 |
|
306 | |||
307 | ; secret for s3 auth |
|
307 | ; secret for s3 auth | |
308 | archive_cache.objectstore.secret = secret |
|
308 | archive_cache.objectstore.secret = secret | |
309 |
|
309 | |||
|
310 | ;region for s3 storage | |||
|
311 | archive_cache.objectstore.region = eu-central-1 | |||
|
312 | ||||
310 | ; number of sharded buckets to create to distribute archives across |
|
313 | ; number of sharded buckets to create to distribute archives across | |
311 | ; default is 8 shards |
|
314 | ; default is 8 shards | |
312 | archive_cache.objectstore.bucket_shards = 8 |
|
315 | archive_cache.objectstore.bucket_shards = 8 | |
313 |
|
316 | |||
314 | ; a top-level bucket to put all other shards in |
|
317 | ; a top-level bucket to put all other shards in | |
315 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number |
|
318 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number | |
316 | archive_cache.objectstore.bucket = rhodecode-archive-cache |
|
319 | archive_cache.objectstore.bucket = rhodecode-archive-cache | |
317 |
|
320 | |||
318 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
321 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
319 | archive_cache.objectstore.retry = false |
|
322 | archive_cache.objectstore.retry = false | |
320 |
|
323 | |||
321 | ; number of seconds to wait for next try using retry |
|
324 | ; number of seconds to wait for next try using retry | |
322 | archive_cache.objectstore.retry_backoff = 1 |
|
325 | archive_cache.objectstore.retry_backoff = 1 | |
323 |
|
326 | |||
324 | ; how many tries do do a retry fetch from this backend |
|
327 | ; how many tries do do a retry fetch from this backend | |
325 | archive_cache.objectstore.retry_attempts = 10 |
|
328 | archive_cache.objectstore.retry_attempts = 10 | |
326 |
|
329 | |||
327 | ; Default is $cache_dir/archive_cache if not set |
|
330 | ; Default is $cache_dir/archive_cache if not set | |
328 | ; Generated repo archives will be cached at this location |
|
331 | ; Generated repo archives will be cached at this location | |
329 | ; and served from the cache during subsequent requests for the same archive of |
|
332 | ; and served from the cache during subsequent requests for the same archive of | |
330 | ; the repository. This path is important to be shared across filesystems and with |
|
333 | ; the repository. This path is important to be shared across filesystems and with | |
331 | ; RhodeCode and vcsserver |
|
334 | ; RhodeCode and vcsserver | |
332 | archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache |
|
335 | archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache | |
333 |
|
336 | |||
334 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb |
|
337 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb | |
335 | archive_cache.filesystem.cache_size_gb = 1 |
|
338 | archive_cache.filesystem.cache_size_gb = 1 | |
336 |
|
339 | |||
337 | ; Eviction policy used to clear out after cache_size_gb limit is reached |
|
340 | ; Eviction policy used to clear out after cache_size_gb limit is reached | |
338 | archive_cache.filesystem.eviction_policy = least-recently-stored |
|
341 | archive_cache.filesystem.eviction_policy = least-recently-stored | |
339 |
|
342 | |||
340 | ; By default cache uses sharding technique, this specifies how many shards are there |
|
343 | ; By default cache uses sharding technique, this specifies how many shards are there | |
341 | ; default is 8 shards |
|
344 | ; default is 8 shards | |
342 | archive_cache.filesystem.cache_shards = 8 |
|
345 | archive_cache.filesystem.cache_shards = 8 | |
343 |
|
346 | |||
344 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
347 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
345 | archive_cache.filesystem.retry = false |
|
348 | archive_cache.filesystem.retry = false | |
346 |
|
349 | |||
347 | ; number of seconds to wait for next try using retry |
|
350 | ; number of seconds to wait for next try using retry | |
348 | archive_cache.filesystem.retry_backoff = 1 |
|
351 | archive_cache.filesystem.retry_backoff = 1 | |
349 |
|
352 | |||
350 | ; how many tries do do a retry fetch from this backend |
|
353 | ; how many tries do do a retry fetch from this backend | |
351 | archive_cache.filesystem.retry_attempts = 10 |
|
354 | archive_cache.filesystem.retry_attempts = 10 | |
352 |
|
355 | |||
353 |
|
356 | |||
354 | ; ############# |
|
357 | ; ############# | |
355 | ; CELERY CONFIG |
|
358 | ; CELERY CONFIG | |
356 | ; ############# |
|
359 | ; ############# | |
357 |
|
360 | |||
358 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini |
|
361 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini | |
359 |
|
362 | |||
360 | use_celery = true |
|
363 | use_celery = true | |
361 |
|
364 | |||
362 | ; path to store schedule database |
|
365 | ; path to store schedule database | |
363 | #celerybeat-schedule.path = |
|
366 | #celerybeat-schedule.path = | |
364 |
|
367 | |||
365 | ; connection url to the message broker (default redis) |
|
368 | ; connection url to the message broker (default redis) | |
366 | celery.broker_url = redis://redis:6379/8 |
|
369 | celery.broker_url = redis://redis:6379/8 | |
367 |
|
370 | |||
368 | ; results backend to get results for (default redis) |
|
371 | ; results backend to get results for (default redis) | |
369 | celery.result_backend = redis://redis:6379/8 |
|
372 | celery.result_backend = redis://redis:6379/8 | |
370 |
|
373 | |||
371 | ; rabbitmq example |
|
374 | ; rabbitmq example | |
372 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost |
|
375 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost | |
373 |
|
376 | |||
374 | ; maximum tasks to execute before worker restart |
|
377 | ; maximum tasks to execute before worker restart | |
375 | celery.max_tasks_per_child = 20 |
|
378 | celery.max_tasks_per_child = 20 | |
376 |
|
379 | |||
377 | ; tasks will never be sent to the queue, but executed locally instead. |
|
380 | ; tasks will never be sent to the queue, but executed locally instead. | |
378 | celery.task_always_eager = false |
|
381 | celery.task_always_eager = false | |
379 |
|
382 | |||
380 | ; ############# |
|
383 | ; ############# | |
381 | ; DOGPILE CACHE |
|
384 | ; DOGPILE CACHE | |
382 | ; ############# |
|
385 | ; ############# | |
383 |
|
386 | |||
384 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. |
|
387 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. | |
385 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space |
|
388 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space | |
386 | cache_dir = /var/opt/rhodecode_data |
|
389 | cache_dir = /var/opt/rhodecode_data | |
387 |
|
390 | |||
388 | ; ********************************************* |
|
391 | ; ********************************************* | |
389 | ; `sql_cache_short` cache for heavy SQL queries |
|
392 | ; `sql_cache_short` cache for heavy SQL queries | |
390 | ; Only supported backend is `memory_lru` |
|
393 | ; Only supported backend is `memory_lru` | |
391 | ; ********************************************* |
|
394 | ; ********************************************* | |
392 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru |
|
395 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru | |
393 | rc_cache.sql_cache_short.expiration_time = 30 |
|
396 | rc_cache.sql_cache_short.expiration_time = 30 | |
394 |
|
397 | |||
395 |
|
398 | |||
396 | ; ***************************************************** |
|
399 | ; ***************************************************** | |
397 | ; `cache_repo_longterm` cache for repo object instances |
|
400 | ; `cache_repo_longterm` cache for repo object instances | |
398 | ; Only supported backend is `memory_lru` |
|
401 | ; Only supported backend is `memory_lru` | |
399 | ; ***************************************************** |
|
402 | ; ***************************************************** | |
400 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru |
|
403 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru | |
401 | ; by default we use 30 Days, cache is still invalidated on push |
|
404 | ; by default we use 30 Days, cache is still invalidated on push | |
402 | rc_cache.cache_repo_longterm.expiration_time = 2592000 |
|
405 | rc_cache.cache_repo_longterm.expiration_time = 2592000 | |
403 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches |
|
406 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches | |
404 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
407 | rc_cache.cache_repo_longterm.max_size = 10000 | |
405 |
|
408 | |||
406 |
|
409 | |||
407 | ; ********************************************* |
|
410 | ; ********************************************* | |
408 | ; `cache_general` cache for general purpose use |
|
411 | ; `cache_general` cache for general purpose use | |
409 | ; for simplicity use rc.file_namespace backend, |
|
412 | ; for simplicity use rc.file_namespace backend, | |
410 | ; for performance and scale use rc.redis |
|
413 | ; for performance and scale use rc.redis | |
411 | ; ********************************************* |
|
414 | ; ********************************************* | |
412 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace |
|
415 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace | |
413 | rc_cache.cache_general.expiration_time = 43200 |
|
416 | rc_cache.cache_general.expiration_time = 43200 | |
414 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
417 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
415 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general_db |
|
418 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general_db | |
416 |
|
419 | |||
417 | ; alternative `cache_general` redis backend with distributed lock |
|
420 | ; alternative `cache_general` redis backend with distributed lock | |
418 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis |
|
421 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis | |
419 | #rc_cache.cache_general.expiration_time = 300 |
|
422 | #rc_cache.cache_general.expiration_time = 300 | |
420 |
|
423 | |||
421 | ; redis_expiration_time needs to be greater then expiration_time |
|
424 | ; redis_expiration_time needs to be greater then expiration_time | |
422 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 |
|
425 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 | |
423 |
|
426 | |||
424 | #rc_cache.cache_general.arguments.host = localhost |
|
427 | #rc_cache.cache_general.arguments.host = localhost | |
425 | #rc_cache.cache_general.arguments.port = 6379 |
|
428 | #rc_cache.cache_general.arguments.port = 6379 | |
426 | #rc_cache.cache_general.arguments.db = 0 |
|
429 | #rc_cache.cache_general.arguments.db = 0 | |
427 | #rc_cache.cache_general.arguments.socket_timeout = 30 |
|
430 | #rc_cache.cache_general.arguments.socket_timeout = 30 | |
428 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
431 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
429 | #rc_cache.cache_general.arguments.distributed_lock = true |
|
432 | #rc_cache.cache_general.arguments.distributed_lock = true | |
430 |
|
433 | |||
431 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
434 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
432 | #rc_cache.cache_general.arguments.lock_auto_renewal = true |
|
435 | #rc_cache.cache_general.arguments.lock_auto_renewal = true | |
433 |
|
436 | |||
434 | ; ************************************************* |
|
437 | ; ************************************************* | |
435 | ; `cache_perms` cache for permission tree, auth TTL |
|
438 | ; `cache_perms` cache for permission tree, auth TTL | |
436 | ; for simplicity use rc.file_namespace backend, |
|
439 | ; for simplicity use rc.file_namespace backend, | |
437 | ; for performance and scale use rc.redis |
|
440 | ; for performance and scale use rc.redis | |
438 | ; ************************************************* |
|
441 | ; ************************************************* | |
439 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
442 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace | |
440 | rc_cache.cache_perms.expiration_time = 3600 |
|
443 | rc_cache.cache_perms.expiration_time = 3600 | |
441 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
444 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
442 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms_db |
|
445 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms_db | |
443 |
|
446 | |||
444 | ; alternative `cache_perms` redis backend with distributed lock |
|
447 | ; alternative `cache_perms` redis backend with distributed lock | |
445 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis |
|
448 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis | |
446 | #rc_cache.cache_perms.expiration_time = 300 |
|
449 | #rc_cache.cache_perms.expiration_time = 300 | |
447 |
|
450 | |||
448 | ; redis_expiration_time needs to be greater then expiration_time |
|
451 | ; redis_expiration_time needs to be greater then expiration_time | |
449 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 |
|
452 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 | |
450 |
|
453 | |||
451 | #rc_cache.cache_perms.arguments.host = localhost |
|
454 | #rc_cache.cache_perms.arguments.host = localhost | |
452 | #rc_cache.cache_perms.arguments.port = 6379 |
|
455 | #rc_cache.cache_perms.arguments.port = 6379 | |
453 | #rc_cache.cache_perms.arguments.db = 0 |
|
456 | #rc_cache.cache_perms.arguments.db = 0 | |
454 | #rc_cache.cache_perms.arguments.socket_timeout = 30 |
|
457 | #rc_cache.cache_perms.arguments.socket_timeout = 30 | |
455 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
458 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
456 | #rc_cache.cache_perms.arguments.distributed_lock = true |
|
459 | #rc_cache.cache_perms.arguments.distributed_lock = true | |
457 |
|
460 | |||
458 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
461 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
459 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true |
|
462 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true | |
460 |
|
463 | |||
461 | ; *************************************************** |
|
464 | ; *************************************************** | |
462 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS |
|
465 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS | |
463 | ; for simplicity use rc.file_namespace backend, |
|
466 | ; for simplicity use rc.file_namespace backend, | |
464 | ; for performance and scale use rc.redis |
|
467 | ; for performance and scale use rc.redis | |
465 | ; *************************************************** |
|
468 | ; *************************************************** | |
466 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
469 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace | |
467 | rc_cache.cache_repo.expiration_time = 2592000 |
|
470 | rc_cache.cache_repo.expiration_time = 2592000 | |
468 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
471 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
469 | #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo_db |
|
472 | #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo_db | |
470 |
|
473 | |||
471 | ; alternative `cache_repo` redis backend with distributed lock |
|
474 | ; alternative `cache_repo` redis backend with distributed lock | |
472 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis |
|
475 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis | |
473 | #rc_cache.cache_repo.expiration_time = 2592000 |
|
476 | #rc_cache.cache_repo.expiration_time = 2592000 | |
474 |
|
477 | |||
475 | ; redis_expiration_time needs to be greater then expiration_time |
|
478 | ; redis_expiration_time needs to be greater then expiration_time | |
476 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 |
|
479 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 | |
477 |
|
480 | |||
478 | #rc_cache.cache_repo.arguments.host = localhost |
|
481 | #rc_cache.cache_repo.arguments.host = localhost | |
479 | #rc_cache.cache_repo.arguments.port = 6379 |
|
482 | #rc_cache.cache_repo.arguments.port = 6379 | |
480 | #rc_cache.cache_repo.arguments.db = 1 |
|
483 | #rc_cache.cache_repo.arguments.db = 1 | |
481 | #rc_cache.cache_repo.arguments.socket_timeout = 30 |
|
484 | #rc_cache.cache_repo.arguments.socket_timeout = 30 | |
482 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
485 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
483 | #rc_cache.cache_repo.arguments.distributed_lock = true |
|
486 | #rc_cache.cache_repo.arguments.distributed_lock = true | |
484 |
|
487 | |||
485 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
488 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
486 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true |
|
489 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true | |
487 |
|
490 | |||
488 | ; ############## |
|
491 | ; ############## | |
489 | ; BEAKER SESSION |
|
492 | ; BEAKER SESSION | |
490 | ; ############## |
|
493 | ; ############## | |
491 |
|
494 | |||
492 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed |
|
495 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed | |
493 | ; types are file, ext:redis, ext:database, ext:memcached |
|
496 | ; types are file, ext:redis, ext:database, ext:memcached | |
494 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session |
|
497 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session | |
495 | #beaker.session.type = file |
|
498 | #beaker.session.type = file | |
496 | #beaker.session.data_dir = %(here)s/data/sessions |
|
499 | #beaker.session.data_dir = %(here)s/data/sessions | |
497 |
|
500 | |||
498 | ; Redis based sessions |
|
501 | ; Redis based sessions | |
499 | beaker.session.type = ext:redis |
|
502 | beaker.session.type = ext:redis | |
500 | beaker.session.url = redis://redis:6379/2 |
|
503 | beaker.session.url = redis://redis:6379/2 | |
501 |
|
504 | |||
502 | ; DB based session, fast, and allows easy management over logged in users |
|
505 | ; DB based session, fast, and allows easy management over logged in users | |
503 | #beaker.session.type = ext:database |
|
506 | #beaker.session.type = ext:database | |
504 | #beaker.session.table_name = db_session |
|
507 | #beaker.session.table_name = db_session | |
505 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
508 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode | |
506 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
509 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode | |
507 | #beaker.session.sa.pool_recycle = 3600 |
|
510 | #beaker.session.sa.pool_recycle = 3600 | |
508 | #beaker.session.sa.echo = false |
|
511 | #beaker.session.sa.echo = false | |
509 |
|
512 | |||
510 | beaker.session.key = rhodecode |
|
513 | beaker.session.key = rhodecode | |
511 | beaker.session.secret = develop-rc-uytcxaz |
|
514 | beaker.session.secret = develop-rc-uytcxaz | |
512 | beaker.session.lock_dir = /data_ramdisk/lock |
|
515 | beaker.session.lock_dir = /data_ramdisk/lock | |
513 |
|
516 | |||
514 | ; Secure encrypted cookie. Requires AES and AES python libraries |
|
517 | ; Secure encrypted cookie. Requires AES and AES python libraries | |
515 | ; you must disable beaker.session.secret to use this |
|
518 | ; you must disable beaker.session.secret to use this | |
516 | #beaker.session.encrypt_key = key_for_encryption |
|
519 | #beaker.session.encrypt_key = key_for_encryption | |
517 | #beaker.session.validate_key = validation_key |
|
520 | #beaker.session.validate_key = validation_key | |
518 |
|
521 | |||
519 | ; Sets session as invalid (also logging out user) if it haven not been |
|
522 | ; Sets session as invalid (also logging out user) if it haven not been | |
520 | ; accessed for given amount of time in seconds |
|
523 | ; accessed for given amount of time in seconds | |
521 | beaker.session.timeout = 2592000 |
|
524 | beaker.session.timeout = 2592000 | |
522 | beaker.session.httponly = true |
|
525 | beaker.session.httponly = true | |
523 |
|
526 | |||
524 | ; Path to use for the cookie. Set to prefix if you use prefix middleware |
|
527 | ; Path to use for the cookie. Set to prefix if you use prefix middleware | |
525 | #beaker.session.cookie_path = /custom_prefix |
|
528 | #beaker.session.cookie_path = /custom_prefix | |
526 |
|
529 | |||
527 | ; Set https secure cookie |
|
530 | ; Set https secure cookie | |
528 | beaker.session.secure = false |
|
531 | beaker.session.secure = false | |
529 |
|
532 | |||
530 | ; default cookie expiration time in seconds, set to `true` to set expire |
|
533 | ; default cookie expiration time in seconds, set to `true` to set expire | |
531 | ; at browser close |
|
534 | ; at browser close | |
532 | #beaker.session.cookie_expires = 3600 |
|
535 | #beaker.session.cookie_expires = 3600 | |
533 |
|
536 | |||
534 | ; ############################# |
|
537 | ; ############################# | |
535 | ; SEARCH INDEXING CONFIGURATION |
|
538 | ; SEARCH INDEXING CONFIGURATION | |
536 | ; ############################# |
|
539 | ; ############################# | |
537 |
|
540 | |||
538 | ; Full text search indexer is available in rhodecode-tools under |
|
541 | ; Full text search indexer is available in rhodecode-tools under | |
539 | ; `rhodecode-tools index` command |
|
542 | ; `rhodecode-tools index` command | |
540 |
|
543 | |||
541 | ; WHOOSH Backend, doesn't require additional services to run |
|
544 | ; WHOOSH Backend, doesn't require additional services to run | |
542 | ; it works good with few dozen repos |
|
545 | ; it works good with few dozen repos | |
543 | search.module = rhodecode.lib.index.whoosh |
|
546 | search.module = rhodecode.lib.index.whoosh | |
544 | search.location = %(here)s/data/index |
|
547 | search.location = %(here)s/data/index | |
545 |
|
548 | |||
546 | ; #################### |
|
549 | ; #################### | |
547 | ; CHANNELSTREAM CONFIG |
|
550 | ; CHANNELSTREAM CONFIG | |
548 | ; #################### |
|
551 | ; #################### | |
549 |
|
552 | |||
550 | ; channelstream enables persistent connections and live notification |
|
553 | ; channelstream enables persistent connections and live notification | |
551 | ; in the system. It's also used by the chat system |
|
554 | ; in the system. It's also used by the chat system | |
552 |
|
555 | |||
553 | channelstream.enabled = true |
|
556 | channelstream.enabled = true | |
554 |
|
557 | |||
555 | ; server address for channelstream server on the backend |
|
558 | ; server address for channelstream server on the backend | |
556 | channelstream.server = channelstream:9800 |
|
559 | channelstream.server = channelstream:9800 | |
557 |
|
560 | |||
558 | ; location of the channelstream server from outside world |
|
561 | ; location of the channelstream server from outside world | |
559 | ; use ws:// for http or wss:// for https. This address needs to be handled |
|
562 | ; use ws:// for http or wss:// for https. This address needs to be handled | |
560 | ; by external HTTP server such as Nginx or Apache |
|
563 | ; by external HTTP server such as Nginx or Apache | |
561 | ; see Nginx/Apache configuration examples in our docs |
|
564 | ; see Nginx/Apache configuration examples in our docs | |
562 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
565 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
563 | channelstream.secret = ENV_GENERATED |
|
566 | channelstream.secret = ENV_GENERATED | |
564 | channelstream.history.location = /var/opt/rhodecode_data/channelstream_history |
|
567 | channelstream.history.location = /var/opt/rhodecode_data/channelstream_history | |
565 |
|
568 | |||
566 | ; Internal application path that Javascript uses to connect into. |
|
569 | ; Internal application path that Javascript uses to connect into. | |
567 | ; If you use proxy-prefix the prefix should be added before /_channelstream |
|
570 | ; If you use proxy-prefix the prefix should be added before /_channelstream | |
568 | channelstream.proxy_path = /_channelstream |
|
571 | channelstream.proxy_path = /_channelstream | |
569 |
|
572 | |||
570 |
|
573 | |||
571 | ; ############################## |
|
574 | ; ############################## | |
572 | ; MAIN RHODECODE DATABASE CONFIG |
|
575 | ; MAIN RHODECODE DATABASE CONFIG | |
573 | ; ############################## |
|
576 | ; ############################## | |
574 |
|
577 | |||
575 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
578 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
576 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
579 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
577 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 |
|
580 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 | |
578 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one |
|
581 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one | |
579 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode |
|
582 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode | |
580 |
|
583 | |||
581 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
584 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
582 |
|
585 | |||
583 | ; see sqlalchemy docs for other advanced settings |
|
586 | ; see sqlalchemy docs for other advanced settings | |
584 | ; print the sql statements to output |
|
587 | ; print the sql statements to output | |
585 | sqlalchemy.db1.echo = false |
|
588 | sqlalchemy.db1.echo = false | |
586 |
|
589 | |||
587 | ; recycle the connections after this amount of seconds |
|
590 | ; recycle the connections after this amount of seconds | |
588 | sqlalchemy.db1.pool_recycle = 3600 |
|
591 | sqlalchemy.db1.pool_recycle = 3600 | |
589 |
|
592 | |||
590 | ; the number of connections to keep open inside the connection pool. |
|
593 | ; the number of connections to keep open inside the connection pool. | |
591 | ; 0 indicates no limit |
|
594 | ; 0 indicates no limit | |
592 | ; the general calculus with gevent is: |
|
595 | ; the general calculus with gevent is: | |
593 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, |
|
596 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, | |
594 | ; then increase pool size + max overflow so that they add up to 500. |
|
597 | ; then increase pool size + max overflow so that they add up to 500. | |
595 | #sqlalchemy.db1.pool_size = 5 |
|
598 | #sqlalchemy.db1.pool_size = 5 | |
596 |
|
599 | |||
597 | ; The number of connections to allow in connection pool "overflow", that is |
|
600 | ; The number of connections to allow in connection pool "overflow", that is | |
598 | ; connections that can be opened above and beyond the pool_size setting, |
|
601 | ; connections that can be opened above and beyond the pool_size setting, | |
599 | ; which defaults to five. |
|
602 | ; which defaults to five. | |
600 | #sqlalchemy.db1.max_overflow = 10 |
|
603 | #sqlalchemy.db1.max_overflow = 10 | |
601 |
|
604 | |||
602 | ; Connection check ping, used to detect broken database connections |
|
605 | ; Connection check ping, used to detect broken database connections | |
603 | ; could be enabled to better handle cases if MySQL has gone away errors |
|
606 | ; could be enabled to better handle cases if MySQL has gone away errors | |
604 | #sqlalchemy.db1.ping_connection = true |
|
607 | #sqlalchemy.db1.ping_connection = true | |
605 |
|
608 | |||
606 | ; ########## |
|
609 | ; ########## | |
607 | ; VCS CONFIG |
|
610 | ; VCS CONFIG | |
608 | ; ########## |
|
611 | ; ########## | |
609 | vcs.server.enable = true |
|
612 | vcs.server.enable = true | |
610 | vcs.server = vcsserver:10010 |
|
613 | vcs.server = vcsserver:10010 | |
611 |
|
614 | |||
612 | ; Web server connectivity protocol, responsible for web based VCS operations |
|
615 | ; Web server connectivity protocol, responsible for web based VCS operations | |
613 | ; Available protocols are: |
|
616 | ; Available protocols are: | |
614 | ; `http` - use http-rpc backend (default) |
|
617 | ; `http` - use http-rpc backend (default) | |
615 | vcs.server.protocol = http |
|
618 | vcs.server.protocol = http | |
616 |
|
619 | |||
617 | ; Push/Pull operations protocol, available options are: |
|
620 | ; Push/Pull operations protocol, available options are: | |
618 | ; `http` - use http-rpc backend (default) |
|
621 | ; `http` - use http-rpc backend (default) | |
619 | vcs.scm_app_implementation = http |
|
622 | vcs.scm_app_implementation = http | |
620 |
|
623 | |||
621 | ; Push/Pull operations hooks protocol, available options are: |
|
624 | ; Push/Pull operations hooks protocol, available options are: | |
622 | ; `http` - use http-rpc backend (default) |
|
625 | ; `http` - use http-rpc backend (default) | |
623 | ; `celery` - use celery based hooks |
|
626 | ; `celery` - use celery based hooks | |
624 | vcs.hooks.protocol = http |
|
627 | vcs.hooks.protocol = http | |
625 |
|
628 | |||
626 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be |
|
629 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be | |
627 | ; accessible via network. |
|
630 | ; accessible via network. | |
628 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) |
|
631 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) | |
629 | vcs.hooks.host = * |
|
632 | vcs.hooks.host = * | |
630 |
|
633 | |||
631 | ; Start VCSServer with this instance as a subprocess, useful for development |
|
634 | ; Start VCSServer with this instance as a subprocess, useful for development | |
632 | vcs.start_server = false |
|
635 | vcs.start_server = false | |
633 |
|
636 | |||
634 | ; List of enabled VCS backends, available options are: |
|
637 | ; List of enabled VCS backends, available options are: | |
635 | ; `hg` - mercurial |
|
638 | ; `hg` - mercurial | |
636 | ; `git` - git |
|
639 | ; `git` - git | |
637 | ; `svn` - subversion |
|
640 | ; `svn` - subversion | |
638 | vcs.backends = hg, git, svn |
|
641 | vcs.backends = hg, git, svn | |
639 |
|
642 | |||
640 | ; Wait this number of seconds before killing connection to the vcsserver |
|
643 | ; Wait this number of seconds before killing connection to the vcsserver | |
641 | vcs.connection_timeout = 3600 |
|
644 | vcs.connection_timeout = 3600 | |
642 |
|
645 | |||
643 | ; Cache flag to cache vcsserver remote calls locally |
|
646 | ; Cache flag to cache vcsserver remote calls locally | |
644 | ; It uses cache_region `cache_repo` |
|
647 | ; It uses cache_region `cache_repo` | |
645 | vcs.methods.cache = true |
|
648 | vcs.methods.cache = true | |
646 |
|
649 | |||
647 | ; #################################################### |
|
650 | ; #################################################### | |
648 | ; Subversion proxy support (mod_dav_svn) |
|
651 | ; Subversion proxy support (mod_dav_svn) | |
649 | ; Maps RhodeCode repo groups into SVN paths for Apache |
|
652 | ; Maps RhodeCode repo groups into SVN paths for Apache | |
650 | ; #################################################### |
|
653 | ; #################################################### | |
651 |
|
654 | |||
652 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
655 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. | |
653 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 |
|
656 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 | |
654 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
657 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible | |
655 | #vcs.svn.compatible_version = 1.8 |
|
658 | #vcs.svn.compatible_version = 1.8 | |
656 |
|
659 | |||
657 | ; Enable SVN proxy of requests over HTTP |
|
660 | ; Enable SVN proxy of requests over HTTP | |
658 | vcs.svn.proxy.enabled = true |
|
661 | vcs.svn.proxy.enabled = true | |
659 |
|
662 | |||
660 | ; host to connect to running SVN subsystem |
|
663 | ; host to connect to running SVN subsystem | |
661 | vcs.svn.proxy.host = http://svn:8090 |
|
664 | vcs.svn.proxy.host = http://svn:8090 | |
662 |
|
665 | |||
663 | ; Enable or disable the config file generation. |
|
666 | ; Enable or disable the config file generation. | |
664 | svn.proxy.generate_config = true |
|
667 | svn.proxy.generate_config = true | |
665 |
|
668 | |||
666 | ; Generate config file with `SVNListParentPath` set to `On`. |
|
669 | ; Generate config file with `SVNListParentPath` set to `On`. | |
667 | svn.proxy.list_parent_path = true |
|
670 | svn.proxy.list_parent_path = true | |
668 |
|
671 | |||
669 | ; Set location and file name of generated config file. |
|
672 | ; Set location and file name of generated config file. | |
670 | svn.proxy.config_file_path = /etc/rhodecode/conf/svn/mod_dav_svn.conf |
|
673 | svn.proxy.config_file_path = /etc/rhodecode/conf/svn/mod_dav_svn.conf | |
671 |
|
674 | |||
672 | ; alternative mod_dav config template. This needs to be a valid mako template |
|
675 | ; alternative mod_dav config template. This needs to be a valid mako template | |
673 | ; Example template can be found in the source code: |
|
676 | ; Example template can be found in the source code: | |
674 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako |
|
677 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako | |
675 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako |
|
678 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako | |
676 |
|
679 | |||
677 | ; Used as a prefix to the `Location` block in the generated config file. |
|
680 | ; Used as a prefix to the `Location` block in the generated config file. | |
678 | ; In most cases it should be set to `/`. |
|
681 | ; In most cases it should be set to `/`. | |
679 | svn.proxy.location_root = / |
|
682 | svn.proxy.location_root = / | |
680 |
|
683 | |||
681 | ; Command to reload the mod dav svn configuration on change. |
|
684 | ; Command to reload the mod dav svn configuration on change. | |
682 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh |
|
685 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh | |
683 | ; Make sure user who runs RhodeCode process is allowed to reload Apache |
|
686 | ; Make sure user who runs RhodeCode process is allowed to reload Apache | |
684 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
687 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
685 |
|
688 | |||
686 | ; If the timeout expires before the reload command finishes, the command will |
|
689 | ; If the timeout expires before the reload command finishes, the command will | |
687 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
690 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
688 | #svn.proxy.reload_timeout = 10 |
|
691 | #svn.proxy.reload_timeout = 10 | |
689 |
|
692 | |||
690 | ; #################### |
|
693 | ; #################### | |
691 | ; SSH Support Settings |
|
694 | ; SSH Support Settings | |
692 | ; #################### |
|
695 | ; #################### | |
693 |
|
696 | |||
694 | ; Defines if a custom authorized_keys file should be created and written on |
|
697 | ; Defines if a custom authorized_keys file should be created and written on | |
695 | ; any change user ssh keys. Setting this to false also disables possibility |
|
698 | ; any change user ssh keys. Setting this to false also disables possibility | |
696 | ; of adding SSH keys by users from web interface. Super admins can still |
|
699 | ; of adding SSH keys by users from web interface. Super admins can still | |
697 | ; manage SSH Keys. |
|
700 | ; manage SSH Keys. | |
698 | ssh.generate_authorized_keyfile = true |
|
701 | ssh.generate_authorized_keyfile = true | |
699 |
|
702 | |||
700 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
703 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` | |
701 | # ssh.authorized_keys_ssh_opts = |
|
704 | # ssh.authorized_keys_ssh_opts = | |
702 |
|
705 | |||
703 | ; Path to the authorized_keys file where the generate entries are placed. |
|
706 | ; Path to the authorized_keys file where the generate entries are placed. | |
704 | ; It is possible to have multiple key files specified in `sshd_config` e.g. |
|
707 | ; It is possible to have multiple key files specified in `sshd_config` e.g. | |
705 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
708 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode | |
706 | ssh.authorized_keys_file_path = /etc/rhodecode/conf/ssh/authorized_keys_rhodecode |
|
709 | ssh.authorized_keys_file_path = /etc/rhodecode/conf/ssh/authorized_keys_rhodecode | |
707 |
|
710 | |||
708 | ; Command to execute the SSH wrapper. The binary is available in the |
|
711 | ; Command to execute the SSH wrapper. The binary is available in the | |
709 | ; RhodeCode installation directory. |
|
712 | ; RhodeCode installation directory. | |
710 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
713 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
711 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 |
|
714 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 | |
712 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
715 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
713 |
|
716 | |||
714 | ; Allow shell when executing the ssh-wrapper command |
|
717 | ; Allow shell when executing the ssh-wrapper command | |
715 | ssh.wrapper_cmd_allow_shell = false |
|
718 | ssh.wrapper_cmd_allow_shell = false | |
716 |
|
719 | |||
717 | ; Enables logging, and detailed output send back to the client during SSH |
|
720 | ; Enables logging, and detailed output send back to the client during SSH | |
718 | ; operations. Useful for debugging, shouldn't be used in production. |
|
721 | ; operations. Useful for debugging, shouldn't be used in production. | |
719 | ssh.enable_debug_logging = true |
|
722 | ssh.enable_debug_logging = true | |
720 |
|
723 | |||
721 | ; Paths to binary executable, by default they are the names, but we can |
|
724 | ; Paths to binary executable, by default they are the names, but we can | |
722 | ; override them if we want to use a custom one |
|
725 | ; override them if we want to use a custom one | |
723 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg |
|
726 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg | |
724 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git |
|
727 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git | |
725 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve |
|
728 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve | |
726 |
|
729 | |||
727 | ; Enables SSH key generator web interface. Disabling this still allows users |
|
730 | ; Enables SSH key generator web interface. Disabling this still allows users | |
728 | ; to add their own keys. |
|
731 | ; to add their own keys. | |
729 | ssh.enable_ui_key_generator = true |
|
732 | ssh.enable_ui_key_generator = true | |
730 |
|
733 | |||
731 | ; Statsd client config, this is used to send metrics to statsd |
|
734 | ; Statsd client config, this is used to send metrics to statsd | |
732 | ; We recommend setting statsd_exported and scrape them using Prometheus |
|
735 | ; We recommend setting statsd_exported and scrape them using Prometheus | |
733 | #statsd.enabled = false |
|
736 | #statsd.enabled = false | |
734 | #statsd.statsd_host = 0.0.0.0 |
|
737 | #statsd.statsd_host = 0.0.0.0 | |
735 | #statsd.statsd_port = 8125 |
|
738 | #statsd.statsd_port = 8125 | |
736 | #statsd.statsd_prefix = |
|
739 | #statsd.statsd_prefix = | |
737 | #statsd.statsd_ipv6 = false |
|
740 | #statsd.statsd_ipv6 = false | |
738 |
|
741 | |||
739 | ; configure logging automatically at server startup set to false |
|
742 | ; configure logging automatically at server startup set to false | |
740 | ; to use the below custom logging config. |
|
743 | ; to use the below custom logging config. | |
741 | ; RC_LOGGING_FORMATTER |
|
744 | ; RC_LOGGING_FORMATTER | |
742 | ; RC_LOGGING_LEVEL |
|
745 | ; RC_LOGGING_LEVEL | |
743 | ; env variables can control the settings for logging in case of autoconfigure |
|
746 | ; env variables can control the settings for logging in case of autoconfigure | |
744 |
|
747 | |||
745 | #logging.autoconfigure = true |
|
748 | #logging.autoconfigure = true | |
746 |
|
749 | |||
747 | ; specify your own custom logging config file to configure logging |
|
750 | ; specify your own custom logging config file to configure logging | |
748 | #logging.logging_conf_file = /path/to/custom_logging.ini |
|
751 | #logging.logging_conf_file = /path/to/custom_logging.ini | |
749 |
|
752 | |||
750 | ; Dummy marker to add new entries after. |
|
753 | ; Dummy marker to add new entries after. | |
751 | ; Add any custom entries below. Please don't remove this marker. |
|
754 | ; Add any custom entries below. Please don't remove this marker. | |
752 | custom.conf = 1 |
|
755 | custom.conf = 1 | |
753 |
|
756 | |||
754 |
|
757 | |||
755 | ; ##################### |
|
758 | ; ##################### | |
756 | ; LOGGING CONFIGURATION |
|
759 | ; LOGGING CONFIGURATION | |
757 | ; ##################### |
|
760 | ; ##################### | |
758 |
|
761 | |||
759 | [loggers] |
|
762 | [loggers] | |
760 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper |
|
763 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper | |
761 |
|
764 | |||
762 | [handlers] |
|
765 | [handlers] | |
763 | keys = console, console_sql |
|
766 | keys = console, console_sql | |
764 |
|
767 | |||
765 | [formatters] |
|
768 | [formatters] | |
766 | keys = generic, json, color_formatter, color_formatter_sql |
|
769 | keys = generic, json, color_formatter, color_formatter_sql | |
767 |
|
770 | |||
768 | ; ####### |
|
771 | ; ####### | |
769 | ; LOGGERS |
|
772 | ; LOGGERS | |
770 | ; ####### |
|
773 | ; ####### | |
771 | [logger_root] |
|
774 | [logger_root] | |
772 | level = NOTSET |
|
775 | level = NOTSET | |
773 | handlers = console |
|
776 | handlers = console | |
774 |
|
777 | |||
775 | [logger_sqlalchemy] |
|
778 | [logger_sqlalchemy] | |
776 | level = INFO |
|
779 | level = INFO | |
777 | handlers = console_sql |
|
780 | handlers = console_sql | |
778 | qualname = sqlalchemy.engine |
|
781 | qualname = sqlalchemy.engine | |
779 | propagate = 0 |
|
782 | propagate = 0 | |
780 |
|
783 | |||
781 | [logger_beaker] |
|
784 | [logger_beaker] | |
782 | level = DEBUG |
|
785 | level = DEBUG | |
783 | handlers = |
|
786 | handlers = | |
784 | qualname = beaker.container |
|
787 | qualname = beaker.container | |
785 | propagate = 1 |
|
788 | propagate = 1 | |
786 |
|
789 | |||
787 | [logger_rhodecode] |
|
790 | [logger_rhodecode] | |
788 | level = DEBUG |
|
791 | level = DEBUG | |
789 | handlers = |
|
792 | handlers = | |
790 | qualname = rhodecode |
|
793 | qualname = rhodecode | |
791 | propagate = 1 |
|
794 | propagate = 1 | |
792 |
|
795 | |||
793 | [logger_ssh_wrapper] |
|
796 | [logger_ssh_wrapper] | |
794 | level = DEBUG |
|
797 | level = DEBUG | |
795 | handlers = |
|
798 | handlers = | |
796 | qualname = ssh_wrapper |
|
799 | qualname = ssh_wrapper | |
797 | propagate = 1 |
|
800 | propagate = 1 | |
798 |
|
801 | |||
799 | [logger_celery] |
|
802 | [logger_celery] | |
800 | level = DEBUG |
|
803 | level = DEBUG | |
801 | handlers = |
|
804 | handlers = | |
802 | qualname = celery |
|
805 | qualname = celery | |
803 |
|
806 | |||
804 |
|
807 | |||
805 | ; ######## |
|
808 | ; ######## | |
806 | ; HANDLERS |
|
809 | ; HANDLERS | |
807 | ; ######## |
|
810 | ; ######## | |
808 |
|
811 | |||
809 | [handler_console] |
|
812 | [handler_console] | |
810 | class = StreamHandler |
|
813 | class = StreamHandler | |
811 | args = (sys.stderr, ) |
|
814 | args = (sys.stderr, ) | |
812 | level = DEBUG |
|
815 | level = DEBUG | |
813 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' |
|
816 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' | |
814 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
817 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
815 | formatter = color_formatter |
|
818 | formatter = color_formatter | |
816 |
|
819 | |||
817 | [handler_console_sql] |
|
820 | [handler_console_sql] | |
818 | ; "level = DEBUG" logs SQL queries and results. |
|
821 | ; "level = DEBUG" logs SQL queries and results. | |
819 | ; "level = INFO" logs SQL queries. |
|
822 | ; "level = INFO" logs SQL queries. | |
820 | ; "level = WARN" logs neither. (Recommended for production systems.) |
|
823 | ; "level = WARN" logs neither. (Recommended for production systems.) | |
821 | class = StreamHandler |
|
824 | class = StreamHandler | |
822 | args = (sys.stderr, ) |
|
825 | args = (sys.stderr, ) | |
823 | level = WARN |
|
826 | level = WARN | |
824 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' |
|
827 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |
825 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
828 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
826 | formatter = color_formatter_sql |
|
829 | formatter = color_formatter_sql | |
827 |
|
830 | |||
828 | ; ########## |
|
831 | ; ########## | |
829 | ; FORMATTERS |
|
832 | ; FORMATTERS | |
830 | ; ########## |
|
833 | ; ########## | |
831 |
|
834 | |||
832 | [formatter_generic] |
|
835 | [formatter_generic] | |
833 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
836 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
834 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
837 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
835 | datefmt = %Y-%m-%d %H:%M:%S |
|
838 | datefmt = %Y-%m-%d %H:%M:%S | |
836 |
|
839 | |||
837 | [formatter_color_formatter] |
|
840 | [formatter_color_formatter] | |
838 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
841 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
839 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
842 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
840 | datefmt = %Y-%m-%d %H:%M:%S |
|
843 | datefmt = %Y-%m-%d %H:%M:%S | |
841 |
|
844 | |||
842 | [formatter_color_formatter_sql] |
|
845 | [formatter_color_formatter_sql] | |
843 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
846 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
844 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
847 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
845 | datefmt = %Y-%m-%d %H:%M:%S |
|
848 | datefmt = %Y-%m-%d %H:%M:%S | |
846 |
|
849 | |||
847 | [formatter_json] |
|
850 | [formatter_json] | |
848 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s |
|
851 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s | |
849 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
|
852 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
@@ -1,817 +1,820 b'' | |||||
1 |
|
1 | |||
2 | ; ######################################### |
|
2 | ; ######################################### | |
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION |
|
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION | |
4 | ; ######################################### |
|
4 | ; ######################################### | |
5 |
|
5 | |||
6 | [DEFAULT] |
|
6 | [DEFAULT] | |
7 | ; Debug flag sets all loggers to debug, and enables request tracking |
|
7 | ; Debug flag sets all loggers to debug, and enables request tracking | |
8 | debug = false |
|
8 | debug = false | |
9 |
|
9 | |||
10 | ; ######################################################################## |
|
10 | ; ######################################################################## | |
11 | ; EMAIL CONFIGURATION |
|
11 | ; EMAIL CONFIGURATION | |
12 | ; These settings will be used by the RhodeCode mailing system |
|
12 | ; These settings will be used by the RhodeCode mailing system | |
13 | ; ######################################################################## |
|
13 | ; ######################################################################## | |
14 |
|
14 | |||
15 | ; prefix all emails subjects with given prefix, helps filtering out emails |
|
15 | ; prefix all emails subjects with given prefix, helps filtering out emails | |
16 | #email_prefix = [RhodeCode] |
|
16 | #email_prefix = [RhodeCode] | |
17 |
|
17 | |||
18 | ; email FROM address all mails will be sent |
|
18 | ; email FROM address all mails will be sent | |
19 | #app_email_from = rhodecode-noreply@localhost |
|
19 | #app_email_from = rhodecode-noreply@localhost | |
20 |
|
20 | |||
21 | #smtp_server = mail.server.com |
|
21 | #smtp_server = mail.server.com | |
22 | #smtp_username = |
|
22 | #smtp_username = | |
23 | #smtp_password = |
|
23 | #smtp_password = | |
24 | #smtp_port = |
|
24 | #smtp_port = | |
25 | #smtp_use_tls = false |
|
25 | #smtp_use_tls = false | |
26 | #smtp_use_ssl = true |
|
26 | #smtp_use_ssl = true | |
27 |
|
27 | |||
28 | [server:main] |
|
28 | [server:main] | |
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, |
|
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, | |
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py |
|
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py | |
31 | host = 127.0.0.1 |
|
31 | host = 127.0.0.1 | |
32 | port = 10020 |
|
32 | port = 10020 | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | ; ########################### |
|
35 | ; ########################### | |
36 | ; GUNICORN APPLICATION SERVER |
|
36 | ; GUNICORN APPLICATION SERVER | |
37 | ; ########################### |
|
37 | ; ########################### | |
38 |
|
38 | |||
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py |
|
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py | |
40 |
|
40 | |||
41 | ; Module to use, this setting shouldn't be changed |
|
41 | ; Module to use, this setting shouldn't be changed | |
42 | use = egg:gunicorn#main |
|
42 | use = egg:gunicorn#main | |
43 |
|
43 | |||
44 | ; Prefix middleware for RhodeCode. |
|
44 | ; Prefix middleware for RhodeCode. | |
45 | ; recommended when using proxy setup. |
|
45 | ; recommended when using proxy setup. | |
46 | ; allows to set RhodeCode under a prefix in server. |
|
46 | ; allows to set RhodeCode under a prefix in server. | |
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. | |
48 | ; And set your prefix like: `prefix = /custom_prefix` |
|
48 | ; And set your prefix like: `prefix = /custom_prefix` | |
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need | |
50 | ; to make your cookies only work on prefix url |
|
50 | ; to make your cookies only work on prefix url | |
51 | [filter:proxy-prefix] |
|
51 | [filter:proxy-prefix] | |
52 | use = egg:PasteDeploy#prefix |
|
52 | use = egg:PasteDeploy#prefix | |
53 | prefix = / |
|
53 | prefix = / | |
54 |
|
54 | |||
55 | [app:main] |
|
55 | [app:main] | |
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory |
|
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory | |
57 | ; of this file |
|
57 | ; of this file | |
58 | ; Each option in the app:main can be override by an environmental variable |
|
58 | ; Each option in the app:main can be override by an environmental variable | |
59 | ; |
|
59 | ; | |
60 | ;To override an option: |
|
60 | ;To override an option: | |
61 | ; |
|
61 | ; | |
62 | ;RC_<KeyName> |
|
62 | ;RC_<KeyName> | |
63 | ;Everything should be uppercase, . and - should be replaced by _. |
|
63 | ;Everything should be uppercase, . and - should be replaced by _. | |
64 | ;For example, if you have these configuration settings: |
|
64 | ;For example, if you have these configuration settings: | |
65 | ;rc_cache.repo_object.backend = foo |
|
65 | ;rc_cache.repo_object.backend = foo | |
66 | ;can be overridden by |
|
66 | ;can be overridden by | |
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo |
|
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo | |
68 |
|
68 | |||
69 | use = egg:rhodecode-enterprise-ce |
|
69 | use = egg:rhodecode-enterprise-ce | |
70 |
|
70 | |||
71 | ; enable proxy prefix middleware, defined above |
|
71 | ; enable proxy prefix middleware, defined above | |
72 | #filter-with = proxy-prefix |
|
72 | #filter-with = proxy-prefix | |
73 |
|
73 | |||
74 | ; encryption key used to encrypt social plugin tokens, |
|
74 | ; encryption key used to encrypt social plugin tokens, | |
75 | ; remote_urls with credentials etc, if not set it defaults to |
|
75 | ; remote_urls with credentials etc, if not set it defaults to | |
76 | ; `beaker.session.secret` |
|
76 | ; `beaker.session.secret` | |
77 | #rhodecode.encrypted_values.secret = |
|
77 | #rhodecode.encrypted_values.secret = | |
78 |
|
78 | |||
79 | ; decryption strict mode (enabled by default). It controls if decryption raises |
|
79 | ; decryption strict mode (enabled by default). It controls if decryption raises | |
80 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
80 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. | |
81 | #rhodecode.encrypted_values.strict = false |
|
81 | #rhodecode.encrypted_values.strict = false | |
82 |
|
82 | |||
83 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) |
|
83 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) | |
84 | ; fernet is safer, and we strongly recommend switching to it. |
|
84 | ; fernet is safer, and we strongly recommend switching to it. | |
85 | ; Due to backward compatibility aes is used as default. |
|
85 | ; Due to backward compatibility aes is used as default. | |
86 | #rhodecode.encrypted_values.algorithm = fernet |
|
86 | #rhodecode.encrypted_values.algorithm = fernet | |
87 |
|
87 | |||
88 | ; Return gzipped responses from RhodeCode (static files/application) |
|
88 | ; Return gzipped responses from RhodeCode (static files/application) | |
89 | gzip_responses = false |
|
89 | gzip_responses = false | |
90 |
|
90 | |||
91 | ; Auto-generate javascript routes file on startup |
|
91 | ; Auto-generate javascript routes file on startup | |
92 | generate_js_files = false |
|
92 | generate_js_files = false | |
93 |
|
93 | |||
94 | ; System global default language. |
|
94 | ; System global default language. | |
95 | ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
95 | ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh | |
96 | lang = en |
|
96 | lang = en | |
97 |
|
97 | |||
98 | ; Perform a full repository scan and import on each server start. |
|
98 | ; Perform a full repository scan and import on each server start. | |
99 | ; Settings this to true could lead to very long startup time. |
|
99 | ; Settings this to true could lead to very long startup time. | |
100 | startup.import_repos = false |
|
100 | startup.import_repos = false | |
101 |
|
101 | |||
102 | ; URL at which the application is running. This is used for Bootstrapping |
|
102 | ; URL at which the application is running. This is used for Bootstrapping | |
103 | ; requests in context when no web request is available. Used in ishell, or |
|
103 | ; requests in context when no web request is available. Used in ishell, or | |
104 | ; SSH calls. Set this for events to receive proper url for SSH calls. |
|
104 | ; SSH calls. Set this for events to receive proper url for SSH calls. | |
105 | app.base_url = http://rhodecode.local |
|
105 | app.base_url = http://rhodecode.local | |
106 |
|
106 | |||
107 | ; Host at which the Service API is running. |
|
107 | ; Host at which the Service API is running. | |
108 | app.service_api.host = http://rhodecode.local:10020 |
|
108 | app.service_api.host = http://rhodecode.local:10020 | |
109 |
|
109 | |||
110 | ; Secret for Service API authentication. |
|
110 | ; Secret for Service API authentication. | |
111 | app.service_api.token = |
|
111 | app.service_api.token = | |
112 |
|
112 | |||
113 | ; Unique application ID. Should be a random unique string for security. |
|
113 | ; Unique application ID. Should be a random unique string for security. | |
114 | app_instance_uuid = rc-production |
|
114 | app_instance_uuid = rc-production | |
115 |
|
115 | |||
116 | ; Cut off limit for large diffs (size in bytes). If overall diff size on |
|
116 | ; Cut off limit for large diffs (size in bytes). If overall diff size on | |
117 | ; commit, or pull request exceeds this limit this diff will be displayed |
|
117 | ; commit, or pull request exceeds this limit this diff will be displayed | |
118 | ; partially. E.g 512000 == 512Kb |
|
118 | ; partially. E.g 512000 == 512Kb | |
119 | cut_off_limit_diff = 512000 |
|
119 | cut_off_limit_diff = 512000 | |
120 |
|
120 | |||
121 | ; Cut off limit for large files inside diffs (size in bytes). Each individual |
|
121 | ; Cut off limit for large files inside diffs (size in bytes). Each individual | |
122 | ; file inside diff which exceeds this limit will be displayed partially. |
|
122 | ; file inside diff which exceeds this limit will be displayed partially. | |
123 | ; E.g 128000 == 128Kb |
|
123 | ; E.g 128000 == 128Kb | |
124 | cut_off_limit_file = 128000 |
|
124 | cut_off_limit_file = 128000 | |
125 |
|
125 | |||
126 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` |
|
126 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` | |
127 | vcs_full_cache = true |
|
127 | vcs_full_cache = true | |
128 |
|
128 | |||
129 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. |
|
129 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. | |
130 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache |
|
130 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache | |
131 | force_https = false |
|
131 | force_https = false | |
132 |
|
132 | |||
133 | ; use Strict-Transport-Security headers |
|
133 | ; use Strict-Transport-Security headers | |
134 | use_htsts = false |
|
134 | use_htsts = false | |
135 |
|
135 | |||
136 | ; Set to true if your repos are exposed using the dumb protocol |
|
136 | ; Set to true if your repos are exposed using the dumb protocol | |
137 | git_update_server_info = false |
|
137 | git_update_server_info = false | |
138 |
|
138 | |||
139 | ; RSS/ATOM feed options |
|
139 | ; RSS/ATOM feed options | |
140 | rss_cut_off_limit = 256000 |
|
140 | rss_cut_off_limit = 256000 | |
141 | rss_items_per_page = 10 |
|
141 | rss_items_per_page = 10 | |
142 | rss_include_diff = false |
|
142 | rss_include_diff = false | |
143 |
|
143 | |||
144 | ; gist URL alias, used to create nicer urls for gist. This should be an |
|
144 | ; gist URL alias, used to create nicer urls for gist. This should be an | |
145 | ; url that does rewrites to _admin/gists/{gistid}. |
|
145 | ; url that does rewrites to _admin/gists/{gistid}. | |
146 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
146 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal | |
147 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
147 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} | |
148 | gist_alias_url = |
|
148 | gist_alias_url = | |
149 |
|
149 | |||
150 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
150 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be | |
151 | ; used for access. |
|
151 | ; used for access. | |
152 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
152 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it | |
153 | ; came from the the logged in user who own this authentication token. |
|
153 | ; came from the the logged in user who own this authentication token. | |
154 | ; Additionally @TOKEN syntax can be used to bound the view to specific |
|
154 | ; Additionally @TOKEN syntax can be used to bound the view to specific | |
155 | ; authentication token. Such view would be only accessible when used together |
|
155 | ; authentication token. Such view would be only accessible when used together | |
156 | ; with this authentication token |
|
156 | ; with this authentication token | |
157 | ; list of all views can be found under `/_admin/permissions/auth_token_access` |
|
157 | ; list of all views can be found under `/_admin/permissions/auth_token_access` | |
158 | ; The list should be "," separated and on a single line. |
|
158 | ; The list should be "," separated and on a single line. | |
159 | ; Most common views to enable: |
|
159 | ; Most common views to enable: | |
160 |
|
160 | |||
161 | # RepoCommitsView:repo_commit_download |
|
161 | # RepoCommitsView:repo_commit_download | |
162 | # RepoCommitsView:repo_commit_patch |
|
162 | # RepoCommitsView:repo_commit_patch | |
163 | # RepoCommitsView:repo_commit_raw |
|
163 | # RepoCommitsView:repo_commit_raw | |
164 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
164 | # RepoCommitsView:repo_commit_raw@TOKEN | |
165 | # RepoFilesView:repo_files_diff |
|
165 | # RepoFilesView:repo_files_diff | |
166 | # RepoFilesView:repo_archivefile |
|
166 | # RepoFilesView:repo_archivefile | |
167 | # RepoFilesView:repo_file_raw |
|
167 | # RepoFilesView:repo_file_raw | |
168 | # GistView:* |
|
168 | # GistView:* | |
169 | api_access_controllers_whitelist = |
|
169 | api_access_controllers_whitelist = | |
170 |
|
170 | |||
171 | ; Default encoding used to convert from and to unicode |
|
171 | ; Default encoding used to convert from and to unicode | |
172 | ; can be also a comma separated list of encoding in case of mixed encodings |
|
172 | ; can be also a comma separated list of encoding in case of mixed encodings | |
173 | default_encoding = UTF-8 |
|
173 | default_encoding = UTF-8 | |
174 |
|
174 | |||
175 | ; instance-id prefix |
|
175 | ; instance-id prefix | |
176 | ; a prefix key for this instance used for cache invalidation when running |
|
176 | ; a prefix key for this instance used for cache invalidation when running | |
177 | ; multiple instances of RhodeCode, make sure it's globally unique for |
|
177 | ; multiple instances of RhodeCode, make sure it's globally unique for | |
178 | ; all running RhodeCode instances. Leave empty if you don't use it |
|
178 | ; all running RhodeCode instances. Leave empty if you don't use it | |
179 | instance_id = |
|
179 | instance_id = | |
180 |
|
180 | |||
181 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
181 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage | |
182 | ; of an authentication plugin also if it is disabled by it's settings. |
|
182 | ; of an authentication plugin also if it is disabled by it's settings. | |
183 | ; This could be useful if you are unable to log in to the system due to broken |
|
183 | ; This could be useful if you are unable to log in to the system due to broken | |
184 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth |
|
184 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth | |
185 | ; module to log in again and fix the settings. |
|
185 | ; module to log in again and fix the settings. | |
186 | ; Available builtin plugin IDs (hash is part of the ID): |
|
186 | ; Available builtin plugin IDs (hash is part of the ID): | |
187 | ; egg:rhodecode-enterprise-ce#rhodecode |
|
187 | ; egg:rhodecode-enterprise-ce#rhodecode | |
188 | ; egg:rhodecode-enterprise-ce#pam |
|
188 | ; egg:rhodecode-enterprise-ce#pam | |
189 | ; egg:rhodecode-enterprise-ce#ldap |
|
189 | ; egg:rhodecode-enterprise-ce#ldap | |
190 | ; egg:rhodecode-enterprise-ce#jasig_cas |
|
190 | ; egg:rhodecode-enterprise-ce#jasig_cas | |
191 | ; egg:rhodecode-enterprise-ce#headers |
|
191 | ; egg:rhodecode-enterprise-ce#headers | |
192 | ; egg:rhodecode-enterprise-ce#crowd |
|
192 | ; egg:rhodecode-enterprise-ce#crowd | |
193 |
|
193 | |||
194 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
194 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode | |
195 |
|
195 | |||
196 | ; Flag to control loading of legacy plugins in py:/path format |
|
196 | ; Flag to control loading of legacy plugins in py:/path format | |
197 | auth_plugin.import_legacy_plugins = true |
|
197 | auth_plugin.import_legacy_plugins = true | |
198 |
|
198 | |||
199 | ; alternative return HTTP header for failed authentication. Default HTTP |
|
199 | ; alternative return HTTP header for failed authentication. Default HTTP | |
200 | ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
200 | ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
201 | ; handling that causing a series of failed authentication calls. |
|
201 | ; handling that causing a series of failed authentication calls. | |
202 | ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
202 | ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code | |
203 | ; This will be served instead of default 401 on bad authentication |
|
203 | ; This will be served instead of default 401 on bad authentication | |
204 | auth_ret_code = |
|
204 | auth_ret_code = | |
205 |
|
205 | |||
206 | ; use special detection method when serving auth_ret_code, instead of serving |
|
206 | ; use special detection method when serving auth_ret_code, instead of serving | |
207 | ; ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
207 | ; ret_code directly, use 401 initially (Which triggers credentials prompt) | |
208 | ; and then serve auth_ret_code to clients |
|
208 | ; and then serve auth_ret_code to clients | |
209 | auth_ret_code_detection = false |
|
209 | auth_ret_code_detection = false | |
210 |
|
210 | |||
211 | ; locking return code. When repository is locked return this HTTP code. 2XX |
|
211 | ; locking return code. When repository is locked return this HTTP code. 2XX | |
212 | ; codes don't break the transactions while 4XX codes do |
|
212 | ; codes don't break the transactions while 4XX codes do | |
213 | lock_ret_code = 423 |
|
213 | lock_ret_code = 423 | |
214 |
|
214 | |||
215 | ; Filesystem location were repositories should be stored |
|
215 | ; Filesystem location were repositories should be stored | |
216 | repo_store.path = /var/opt/rhodecode_repo_store |
|
216 | repo_store.path = /var/opt/rhodecode_repo_store | |
217 |
|
217 | |||
218 | ; allows to setup custom hooks in settings page |
|
218 | ; allows to setup custom hooks in settings page | |
219 | allow_custom_hooks_settings = true |
|
219 | allow_custom_hooks_settings = true | |
220 |
|
220 | |||
221 | ; Generated license token required for EE edition license. |
|
221 | ; Generated license token required for EE edition license. | |
222 | ; New generated token value can be found in Admin > settings > license page. |
|
222 | ; New generated token value can be found in Admin > settings > license page. | |
223 | license_token = |
|
223 | license_token = | |
224 |
|
224 | |||
225 | ; This flag hides sensitive information on the license page such as token, and license data |
|
225 | ; This flag hides sensitive information on the license page such as token, and license data | |
226 | license.hide_license_info = false |
|
226 | license.hide_license_info = false | |
227 |
|
227 | |||
228 | ; supervisor connection uri, for managing supervisor and logs. |
|
228 | ; supervisor connection uri, for managing supervisor and logs. | |
229 | supervisor.uri = |
|
229 | supervisor.uri = | |
230 |
|
230 | |||
231 | ; supervisord group name/id we only want this RC instance to handle |
|
231 | ; supervisord group name/id we only want this RC instance to handle | |
232 | supervisor.group_id = prod |
|
232 | supervisor.group_id = prod | |
233 |
|
233 | |||
234 | ; Display extended labs settings |
|
234 | ; Display extended labs settings | |
235 | labs_settings_active = true |
|
235 | labs_settings_active = true | |
236 |
|
236 | |||
237 | ; Custom exception store path, defaults to TMPDIR |
|
237 | ; Custom exception store path, defaults to TMPDIR | |
238 | ; This is used to store exception from RhodeCode in shared directory |
|
238 | ; This is used to store exception from RhodeCode in shared directory | |
239 | #exception_tracker.store_path = |
|
239 | #exception_tracker.store_path = | |
240 |
|
240 | |||
241 | ; Send email with exception details when it happens |
|
241 | ; Send email with exception details when it happens | |
242 | #exception_tracker.send_email = false |
|
242 | #exception_tracker.send_email = false | |
243 |
|
243 | |||
244 | ; Comma separated list of recipients for exception emails, |
|
244 | ; Comma separated list of recipients for exception emails, | |
245 | ; e.g admin@rhodecode.com,devops@rhodecode.com |
|
245 | ; e.g admin@rhodecode.com,devops@rhodecode.com | |
246 | ; Can be left empty, then emails will be sent to ALL super-admins |
|
246 | ; Can be left empty, then emails will be sent to ALL super-admins | |
247 | #exception_tracker.send_email_recipients = |
|
247 | #exception_tracker.send_email_recipients = | |
248 |
|
248 | |||
249 | ; optional prefix to Add to email Subject |
|
249 | ; optional prefix to Add to email Subject | |
250 | #exception_tracker.email_prefix = [RHODECODE ERROR] |
|
250 | #exception_tracker.email_prefix = [RHODECODE ERROR] | |
251 |
|
251 | |||
252 | ; File store configuration. This is used to store and serve uploaded files |
|
252 | ; File store configuration. This is used to store and serve uploaded files | |
253 | file_store.enabled = true |
|
253 | file_store.enabled = true | |
254 |
|
254 | |||
255 | ; Storage backend, available options are: local |
|
255 | ; Storage backend, available options are: local | |
256 | file_store.backend = local |
|
256 | file_store.backend = local | |
257 |
|
257 | |||
258 | ; path to store the uploaded binaries and artifacts |
|
258 | ; path to store the uploaded binaries and artifacts | |
259 | file_store.storage_path = /var/opt/rhodecode_data/file_store |
|
259 | file_store.storage_path = /var/opt/rhodecode_data/file_store | |
260 |
|
260 | |||
261 |
|
261 | |||
262 | ; Redis url to acquire/check generation of archives locks |
|
262 | ; Redis url to acquire/check generation of archives locks | |
263 | archive_cache.locking.url = redis://redis:6379/1 |
|
263 | archive_cache.locking.url = redis://redis:6379/1 | |
264 |
|
264 | |||
265 | ; Storage backend, only 'filesystem' and 'objectstore' are available now |
|
265 | ; Storage backend, only 'filesystem' and 'objectstore' are available now | |
266 | archive_cache.backend.type = filesystem |
|
266 | archive_cache.backend.type = filesystem | |
267 |
|
267 | |||
268 | ; url for s3 compatible storage that allows to upload artifacts |
|
268 | ; url for s3 compatible storage that allows to upload artifacts | |
269 | ; e.g http://minio:9000 |
|
269 | ; e.g http://minio:9000 | |
270 | archive_cache.objectstore.url = http://s3-minio:9000 |
|
270 | archive_cache.objectstore.url = http://s3-minio:9000 | |
271 |
|
271 | |||
272 | ; key for s3 auth |
|
272 | ; key for s3 auth | |
273 | archive_cache.objectstore.key = key |
|
273 | archive_cache.objectstore.key = key | |
274 |
|
274 | |||
275 | ; secret for s3 auth |
|
275 | ; secret for s3 auth | |
276 | archive_cache.objectstore.secret = secret |
|
276 | archive_cache.objectstore.secret = secret | |
277 |
|
277 | |||
|
278 | ;region for s3 storage | |||
|
279 | archive_cache.objectstore.region = eu-central-1 | |||
|
280 | ||||
278 | ; number of sharded buckets to create to distribute archives across |
|
281 | ; number of sharded buckets to create to distribute archives across | |
279 | ; default is 8 shards |
|
282 | ; default is 8 shards | |
280 | archive_cache.objectstore.bucket_shards = 8 |
|
283 | archive_cache.objectstore.bucket_shards = 8 | |
281 |
|
284 | |||
282 | ; a top-level bucket to put all other shards in |
|
285 | ; a top-level bucket to put all other shards in | |
283 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number |
|
286 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number | |
284 | archive_cache.objectstore.bucket = rhodecode-archive-cache |
|
287 | archive_cache.objectstore.bucket = rhodecode-archive-cache | |
285 |
|
288 | |||
286 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
289 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
287 | archive_cache.objectstore.retry = false |
|
290 | archive_cache.objectstore.retry = false | |
288 |
|
291 | |||
289 | ; number of seconds to wait for next try using retry |
|
292 | ; number of seconds to wait for next try using retry | |
290 | archive_cache.objectstore.retry_backoff = 1 |
|
293 | archive_cache.objectstore.retry_backoff = 1 | |
291 |
|
294 | |||
292 | ; how many tries do do a retry fetch from this backend |
|
295 | ; how many tries do do a retry fetch from this backend | |
293 | archive_cache.objectstore.retry_attempts = 10 |
|
296 | archive_cache.objectstore.retry_attempts = 10 | |
294 |
|
297 | |||
295 | ; Default is $cache_dir/archive_cache if not set |
|
298 | ; Default is $cache_dir/archive_cache if not set | |
296 | ; Generated repo archives will be cached at this location |
|
299 | ; Generated repo archives will be cached at this location | |
297 | ; and served from the cache during subsequent requests for the same archive of |
|
300 | ; and served from the cache during subsequent requests for the same archive of | |
298 | ; the repository. This path is important to be shared across filesystems and with |
|
301 | ; the repository. This path is important to be shared across filesystems and with | |
299 | ; RhodeCode and vcsserver |
|
302 | ; RhodeCode and vcsserver | |
300 | archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache |
|
303 | archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache | |
301 |
|
304 | |||
302 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb |
|
305 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb | |
303 | archive_cache.filesystem.cache_size_gb = 40 |
|
306 | archive_cache.filesystem.cache_size_gb = 40 | |
304 |
|
307 | |||
305 | ; Eviction policy used to clear out after cache_size_gb limit is reached |
|
308 | ; Eviction policy used to clear out after cache_size_gb limit is reached | |
306 | archive_cache.filesystem.eviction_policy = least-recently-stored |
|
309 | archive_cache.filesystem.eviction_policy = least-recently-stored | |
307 |
|
310 | |||
308 | ; By default cache uses sharding technique, this specifies how many shards are there |
|
311 | ; By default cache uses sharding technique, this specifies how many shards are there | |
309 | ; default is 8 shards |
|
312 | ; default is 8 shards | |
310 | archive_cache.filesystem.cache_shards = 8 |
|
313 | archive_cache.filesystem.cache_shards = 8 | |
311 |
|
314 | |||
312 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
315 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
313 | archive_cache.filesystem.retry = false |
|
316 | archive_cache.filesystem.retry = false | |
314 |
|
317 | |||
315 | ; number of seconds to wait for next try using retry |
|
318 | ; number of seconds to wait for next try using retry | |
316 | archive_cache.filesystem.retry_backoff = 1 |
|
319 | archive_cache.filesystem.retry_backoff = 1 | |
317 |
|
320 | |||
318 | ; how many tries do do a retry fetch from this backend |
|
321 | ; how many tries do do a retry fetch from this backend | |
319 | archive_cache.filesystem.retry_attempts = 10 |
|
322 | archive_cache.filesystem.retry_attempts = 10 | |
320 |
|
323 | |||
321 |
|
324 | |||
322 | ; ############# |
|
325 | ; ############# | |
323 | ; CELERY CONFIG |
|
326 | ; CELERY CONFIG | |
324 | ; ############# |
|
327 | ; ############# | |
325 |
|
328 | |||
326 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini |
|
329 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini | |
327 |
|
330 | |||
328 | use_celery = true |
|
331 | use_celery = true | |
329 |
|
332 | |||
330 | ; path to store schedule database |
|
333 | ; path to store schedule database | |
331 | #celerybeat-schedule.path = |
|
334 | #celerybeat-schedule.path = | |
332 |
|
335 | |||
333 | ; connection url to the message broker (default redis) |
|
336 | ; connection url to the message broker (default redis) | |
334 | celery.broker_url = redis://redis:6379/8 |
|
337 | celery.broker_url = redis://redis:6379/8 | |
335 |
|
338 | |||
336 | ; results backend to get results for (default redis) |
|
339 | ; results backend to get results for (default redis) | |
337 | celery.result_backend = redis://redis:6379/8 |
|
340 | celery.result_backend = redis://redis:6379/8 | |
338 |
|
341 | |||
339 | ; rabbitmq example |
|
342 | ; rabbitmq example | |
340 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost |
|
343 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost | |
341 |
|
344 | |||
342 | ; maximum tasks to execute before worker restart |
|
345 | ; maximum tasks to execute before worker restart | |
343 | celery.max_tasks_per_child = 20 |
|
346 | celery.max_tasks_per_child = 20 | |
344 |
|
347 | |||
345 | ; tasks will never be sent to the queue, but executed locally instead. |
|
348 | ; tasks will never be sent to the queue, but executed locally instead. | |
346 | celery.task_always_eager = false |
|
349 | celery.task_always_eager = false | |
347 |
|
350 | |||
348 | ; ############# |
|
351 | ; ############# | |
349 | ; DOGPILE CACHE |
|
352 | ; DOGPILE CACHE | |
350 | ; ############# |
|
353 | ; ############# | |
351 |
|
354 | |||
352 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. |
|
355 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. | |
353 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space |
|
356 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space | |
354 | cache_dir = /var/opt/rhodecode_data |
|
357 | cache_dir = /var/opt/rhodecode_data | |
355 |
|
358 | |||
356 | ; ********************************************* |
|
359 | ; ********************************************* | |
357 | ; `sql_cache_short` cache for heavy SQL queries |
|
360 | ; `sql_cache_short` cache for heavy SQL queries | |
358 | ; Only supported backend is `memory_lru` |
|
361 | ; Only supported backend is `memory_lru` | |
359 | ; ********************************************* |
|
362 | ; ********************************************* | |
360 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru |
|
363 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru | |
361 | rc_cache.sql_cache_short.expiration_time = 30 |
|
364 | rc_cache.sql_cache_short.expiration_time = 30 | |
362 |
|
365 | |||
363 |
|
366 | |||
364 | ; ***************************************************** |
|
367 | ; ***************************************************** | |
365 | ; `cache_repo_longterm` cache for repo object instances |
|
368 | ; `cache_repo_longterm` cache for repo object instances | |
366 | ; Only supported backend is `memory_lru` |
|
369 | ; Only supported backend is `memory_lru` | |
367 | ; ***************************************************** |
|
370 | ; ***************************************************** | |
368 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru |
|
371 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru | |
369 | ; by default we use 30 Days, cache is still invalidated on push |
|
372 | ; by default we use 30 Days, cache is still invalidated on push | |
370 | rc_cache.cache_repo_longterm.expiration_time = 2592000 |
|
373 | rc_cache.cache_repo_longterm.expiration_time = 2592000 | |
371 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches |
|
374 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches | |
372 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
375 | rc_cache.cache_repo_longterm.max_size = 10000 | |
373 |
|
376 | |||
374 |
|
377 | |||
375 | ; ********************************************* |
|
378 | ; ********************************************* | |
376 | ; `cache_general` cache for general purpose use |
|
379 | ; `cache_general` cache for general purpose use | |
377 | ; for simplicity use rc.file_namespace backend, |
|
380 | ; for simplicity use rc.file_namespace backend, | |
378 | ; for performance and scale use rc.redis |
|
381 | ; for performance and scale use rc.redis | |
379 | ; ********************************************* |
|
382 | ; ********************************************* | |
380 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace |
|
383 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace | |
381 | rc_cache.cache_general.expiration_time = 43200 |
|
384 | rc_cache.cache_general.expiration_time = 43200 | |
382 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
385 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
383 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general_db |
|
386 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general_db | |
384 |
|
387 | |||
385 | ; alternative `cache_general` redis backend with distributed lock |
|
388 | ; alternative `cache_general` redis backend with distributed lock | |
386 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis |
|
389 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis | |
387 | #rc_cache.cache_general.expiration_time = 300 |
|
390 | #rc_cache.cache_general.expiration_time = 300 | |
388 |
|
391 | |||
389 | ; redis_expiration_time needs to be greater then expiration_time |
|
392 | ; redis_expiration_time needs to be greater then expiration_time | |
390 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 |
|
393 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 | |
391 |
|
394 | |||
392 | #rc_cache.cache_general.arguments.host = localhost |
|
395 | #rc_cache.cache_general.arguments.host = localhost | |
393 | #rc_cache.cache_general.arguments.port = 6379 |
|
396 | #rc_cache.cache_general.arguments.port = 6379 | |
394 | #rc_cache.cache_general.arguments.db = 0 |
|
397 | #rc_cache.cache_general.arguments.db = 0 | |
395 | #rc_cache.cache_general.arguments.socket_timeout = 30 |
|
398 | #rc_cache.cache_general.arguments.socket_timeout = 30 | |
396 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
399 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
397 | #rc_cache.cache_general.arguments.distributed_lock = true |
|
400 | #rc_cache.cache_general.arguments.distributed_lock = true | |
398 |
|
401 | |||
399 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
402 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
400 | #rc_cache.cache_general.arguments.lock_auto_renewal = true |
|
403 | #rc_cache.cache_general.arguments.lock_auto_renewal = true | |
401 |
|
404 | |||
402 | ; ************************************************* |
|
405 | ; ************************************************* | |
403 | ; `cache_perms` cache for permission tree, auth TTL |
|
406 | ; `cache_perms` cache for permission tree, auth TTL | |
404 | ; for simplicity use rc.file_namespace backend, |
|
407 | ; for simplicity use rc.file_namespace backend, | |
405 | ; for performance and scale use rc.redis |
|
408 | ; for performance and scale use rc.redis | |
406 | ; ************************************************* |
|
409 | ; ************************************************* | |
407 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
410 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace | |
408 | rc_cache.cache_perms.expiration_time = 3600 |
|
411 | rc_cache.cache_perms.expiration_time = 3600 | |
409 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
412 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
410 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms_db |
|
413 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms_db | |
411 |
|
414 | |||
412 | ; alternative `cache_perms` redis backend with distributed lock |
|
415 | ; alternative `cache_perms` redis backend with distributed lock | |
413 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis |
|
416 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis | |
414 | #rc_cache.cache_perms.expiration_time = 300 |
|
417 | #rc_cache.cache_perms.expiration_time = 300 | |
415 |
|
418 | |||
416 | ; redis_expiration_time needs to be greater then expiration_time |
|
419 | ; redis_expiration_time needs to be greater then expiration_time | |
417 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 |
|
420 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 | |
418 |
|
421 | |||
419 | #rc_cache.cache_perms.arguments.host = localhost |
|
422 | #rc_cache.cache_perms.arguments.host = localhost | |
420 | #rc_cache.cache_perms.arguments.port = 6379 |
|
423 | #rc_cache.cache_perms.arguments.port = 6379 | |
421 | #rc_cache.cache_perms.arguments.db = 0 |
|
424 | #rc_cache.cache_perms.arguments.db = 0 | |
422 | #rc_cache.cache_perms.arguments.socket_timeout = 30 |
|
425 | #rc_cache.cache_perms.arguments.socket_timeout = 30 | |
423 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
426 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
424 | #rc_cache.cache_perms.arguments.distributed_lock = true |
|
427 | #rc_cache.cache_perms.arguments.distributed_lock = true | |
425 |
|
428 | |||
426 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
429 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
427 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true |
|
430 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true | |
428 |
|
431 | |||
429 | ; *************************************************** |
|
432 | ; *************************************************** | |
430 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS |
|
433 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS | |
431 | ; for simplicity use rc.file_namespace backend, |
|
434 | ; for simplicity use rc.file_namespace backend, | |
432 | ; for performance and scale use rc.redis |
|
435 | ; for performance and scale use rc.redis | |
433 | ; *************************************************** |
|
436 | ; *************************************************** | |
434 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
437 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace | |
435 | rc_cache.cache_repo.expiration_time = 2592000 |
|
438 | rc_cache.cache_repo.expiration_time = 2592000 | |
436 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
439 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
437 | #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo_db |
|
440 | #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo_db | |
438 |
|
441 | |||
439 | ; alternative `cache_repo` redis backend with distributed lock |
|
442 | ; alternative `cache_repo` redis backend with distributed lock | |
440 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis |
|
443 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis | |
441 | #rc_cache.cache_repo.expiration_time = 2592000 |
|
444 | #rc_cache.cache_repo.expiration_time = 2592000 | |
442 |
|
445 | |||
443 | ; redis_expiration_time needs to be greater then expiration_time |
|
446 | ; redis_expiration_time needs to be greater then expiration_time | |
444 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 |
|
447 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 | |
445 |
|
448 | |||
446 | #rc_cache.cache_repo.arguments.host = localhost |
|
449 | #rc_cache.cache_repo.arguments.host = localhost | |
447 | #rc_cache.cache_repo.arguments.port = 6379 |
|
450 | #rc_cache.cache_repo.arguments.port = 6379 | |
448 | #rc_cache.cache_repo.arguments.db = 1 |
|
451 | #rc_cache.cache_repo.arguments.db = 1 | |
449 | #rc_cache.cache_repo.arguments.socket_timeout = 30 |
|
452 | #rc_cache.cache_repo.arguments.socket_timeout = 30 | |
450 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
453 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
451 | #rc_cache.cache_repo.arguments.distributed_lock = true |
|
454 | #rc_cache.cache_repo.arguments.distributed_lock = true | |
452 |
|
455 | |||
453 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
456 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
454 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true |
|
457 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true | |
455 |
|
458 | |||
456 | ; ############## |
|
459 | ; ############## | |
457 | ; BEAKER SESSION |
|
460 | ; BEAKER SESSION | |
458 | ; ############## |
|
461 | ; ############## | |
459 |
|
462 | |||
460 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed |
|
463 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed | |
461 | ; types are file, ext:redis, ext:database, ext:memcached |
|
464 | ; types are file, ext:redis, ext:database, ext:memcached | |
462 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session |
|
465 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session | |
463 | #beaker.session.type = file |
|
466 | #beaker.session.type = file | |
464 | #beaker.session.data_dir = %(here)s/data/sessions |
|
467 | #beaker.session.data_dir = %(here)s/data/sessions | |
465 |
|
468 | |||
466 | ; Redis based sessions |
|
469 | ; Redis based sessions | |
467 | beaker.session.type = ext:redis |
|
470 | beaker.session.type = ext:redis | |
468 | beaker.session.url = redis://redis:6379/2 |
|
471 | beaker.session.url = redis://redis:6379/2 | |
469 |
|
472 | |||
470 | ; DB based session, fast, and allows easy management over logged in users |
|
473 | ; DB based session, fast, and allows easy management over logged in users | |
471 | #beaker.session.type = ext:database |
|
474 | #beaker.session.type = ext:database | |
472 | #beaker.session.table_name = db_session |
|
475 | #beaker.session.table_name = db_session | |
473 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
476 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode | |
474 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
477 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode | |
475 | #beaker.session.sa.pool_recycle = 3600 |
|
478 | #beaker.session.sa.pool_recycle = 3600 | |
476 | #beaker.session.sa.echo = false |
|
479 | #beaker.session.sa.echo = false | |
477 |
|
480 | |||
478 | beaker.session.key = rhodecode |
|
481 | beaker.session.key = rhodecode | |
479 | beaker.session.secret = production-rc-uytcxaz |
|
482 | beaker.session.secret = production-rc-uytcxaz | |
480 | beaker.session.lock_dir = /data_ramdisk/lock |
|
483 | beaker.session.lock_dir = /data_ramdisk/lock | |
481 |
|
484 | |||
482 | ; Secure encrypted cookie. Requires AES and AES python libraries |
|
485 | ; Secure encrypted cookie. Requires AES and AES python libraries | |
483 | ; you must disable beaker.session.secret to use this |
|
486 | ; you must disable beaker.session.secret to use this | |
484 | #beaker.session.encrypt_key = key_for_encryption |
|
487 | #beaker.session.encrypt_key = key_for_encryption | |
485 | #beaker.session.validate_key = validation_key |
|
488 | #beaker.session.validate_key = validation_key | |
486 |
|
489 | |||
487 | ; Sets session as invalid (also logging out user) if it haven not been |
|
490 | ; Sets session as invalid (also logging out user) if it haven not been | |
488 | ; accessed for given amount of time in seconds |
|
491 | ; accessed for given amount of time in seconds | |
489 | beaker.session.timeout = 2592000 |
|
492 | beaker.session.timeout = 2592000 | |
490 | beaker.session.httponly = true |
|
493 | beaker.session.httponly = true | |
491 |
|
494 | |||
492 | ; Path to use for the cookie. Set to prefix if you use prefix middleware |
|
495 | ; Path to use for the cookie. Set to prefix if you use prefix middleware | |
493 | #beaker.session.cookie_path = /custom_prefix |
|
496 | #beaker.session.cookie_path = /custom_prefix | |
494 |
|
497 | |||
495 | ; Set https secure cookie |
|
498 | ; Set https secure cookie | |
496 | beaker.session.secure = false |
|
499 | beaker.session.secure = false | |
497 |
|
500 | |||
498 | ; default cookie expiration time in seconds, set to `true` to set expire |
|
501 | ; default cookie expiration time in seconds, set to `true` to set expire | |
499 | ; at browser close |
|
502 | ; at browser close | |
500 | #beaker.session.cookie_expires = 3600 |
|
503 | #beaker.session.cookie_expires = 3600 | |
501 |
|
504 | |||
502 | ; ############################# |
|
505 | ; ############################# | |
503 | ; SEARCH INDEXING CONFIGURATION |
|
506 | ; SEARCH INDEXING CONFIGURATION | |
504 | ; ############################# |
|
507 | ; ############################# | |
505 |
|
508 | |||
506 | ; Full text search indexer is available in rhodecode-tools under |
|
509 | ; Full text search indexer is available in rhodecode-tools under | |
507 | ; `rhodecode-tools index` command |
|
510 | ; `rhodecode-tools index` command | |
508 |
|
511 | |||
509 | ; WHOOSH Backend, doesn't require additional services to run |
|
512 | ; WHOOSH Backend, doesn't require additional services to run | |
510 | ; it works good with few dozen repos |
|
513 | ; it works good with few dozen repos | |
511 | search.module = rhodecode.lib.index.whoosh |
|
514 | search.module = rhodecode.lib.index.whoosh | |
512 | search.location = %(here)s/data/index |
|
515 | search.location = %(here)s/data/index | |
513 |
|
516 | |||
514 | ; #################### |
|
517 | ; #################### | |
515 | ; CHANNELSTREAM CONFIG |
|
518 | ; CHANNELSTREAM CONFIG | |
516 | ; #################### |
|
519 | ; #################### | |
517 |
|
520 | |||
518 | ; channelstream enables persistent connections and live notification |
|
521 | ; channelstream enables persistent connections and live notification | |
519 | ; in the system. It's also used by the chat system |
|
522 | ; in the system. It's also used by the chat system | |
520 |
|
523 | |||
521 | channelstream.enabled = true |
|
524 | channelstream.enabled = true | |
522 |
|
525 | |||
523 | ; server address for channelstream server on the backend |
|
526 | ; server address for channelstream server on the backend | |
524 | channelstream.server = channelstream:9800 |
|
527 | channelstream.server = channelstream:9800 | |
525 |
|
528 | |||
526 | ; location of the channelstream server from outside world |
|
529 | ; location of the channelstream server from outside world | |
527 | ; use ws:// for http or wss:// for https. This address needs to be handled |
|
530 | ; use ws:// for http or wss:// for https. This address needs to be handled | |
528 | ; by external HTTP server such as Nginx or Apache |
|
531 | ; by external HTTP server such as Nginx or Apache | |
529 | ; see Nginx/Apache configuration examples in our docs |
|
532 | ; see Nginx/Apache configuration examples in our docs | |
530 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
533 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
531 | channelstream.secret = ENV_GENERATED |
|
534 | channelstream.secret = ENV_GENERATED | |
532 | channelstream.history.location = /var/opt/rhodecode_data/channelstream_history |
|
535 | channelstream.history.location = /var/opt/rhodecode_data/channelstream_history | |
533 |
|
536 | |||
534 | ; Internal application path that Javascript uses to connect into. |
|
537 | ; Internal application path that Javascript uses to connect into. | |
535 | ; If you use proxy-prefix the prefix should be added before /_channelstream |
|
538 | ; If you use proxy-prefix the prefix should be added before /_channelstream | |
536 | channelstream.proxy_path = /_channelstream |
|
539 | channelstream.proxy_path = /_channelstream | |
537 |
|
540 | |||
538 |
|
541 | |||
539 | ; ############################## |
|
542 | ; ############################## | |
540 | ; MAIN RHODECODE DATABASE CONFIG |
|
543 | ; MAIN RHODECODE DATABASE CONFIG | |
541 | ; ############################## |
|
544 | ; ############################## | |
542 |
|
545 | |||
543 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
546 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
544 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
547 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
545 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 |
|
548 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 | |
546 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one |
|
549 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one | |
547 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode |
|
550 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode | |
548 |
|
551 | |||
549 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
552 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
550 |
|
553 | |||
551 | ; see sqlalchemy docs for other advanced settings |
|
554 | ; see sqlalchemy docs for other advanced settings | |
552 | ; print the sql statements to output |
|
555 | ; print the sql statements to output | |
553 | sqlalchemy.db1.echo = false |
|
556 | sqlalchemy.db1.echo = false | |
554 |
|
557 | |||
555 | ; recycle the connections after this amount of seconds |
|
558 | ; recycle the connections after this amount of seconds | |
556 | sqlalchemy.db1.pool_recycle = 3600 |
|
559 | sqlalchemy.db1.pool_recycle = 3600 | |
557 |
|
560 | |||
558 | ; the number of connections to keep open inside the connection pool. |
|
561 | ; the number of connections to keep open inside the connection pool. | |
559 | ; 0 indicates no limit |
|
562 | ; 0 indicates no limit | |
560 | ; the general calculus with gevent is: |
|
563 | ; the general calculus with gevent is: | |
561 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, |
|
564 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, | |
562 | ; then increase pool size + max overflow so that they add up to 500. |
|
565 | ; then increase pool size + max overflow so that they add up to 500. | |
563 | #sqlalchemy.db1.pool_size = 5 |
|
566 | #sqlalchemy.db1.pool_size = 5 | |
564 |
|
567 | |||
565 | ; The number of connections to allow in connection pool "overflow", that is |
|
568 | ; The number of connections to allow in connection pool "overflow", that is | |
566 | ; connections that can be opened above and beyond the pool_size setting, |
|
569 | ; connections that can be opened above and beyond the pool_size setting, | |
567 | ; which defaults to five. |
|
570 | ; which defaults to five. | |
568 | #sqlalchemy.db1.max_overflow = 10 |
|
571 | #sqlalchemy.db1.max_overflow = 10 | |
569 |
|
572 | |||
570 | ; Connection check ping, used to detect broken database connections |
|
573 | ; Connection check ping, used to detect broken database connections | |
571 | ; could be enabled to better handle cases if MySQL has gone away errors |
|
574 | ; could be enabled to better handle cases if MySQL has gone away errors | |
572 | #sqlalchemy.db1.ping_connection = true |
|
575 | #sqlalchemy.db1.ping_connection = true | |
573 |
|
576 | |||
574 | ; ########## |
|
577 | ; ########## | |
575 | ; VCS CONFIG |
|
578 | ; VCS CONFIG | |
576 | ; ########## |
|
579 | ; ########## | |
577 | vcs.server.enable = true |
|
580 | vcs.server.enable = true | |
578 | vcs.server = vcsserver:10010 |
|
581 | vcs.server = vcsserver:10010 | |
579 |
|
582 | |||
580 | ; Web server connectivity protocol, responsible for web based VCS operations |
|
583 | ; Web server connectivity protocol, responsible for web based VCS operations | |
581 | ; Available protocols are: |
|
584 | ; Available protocols are: | |
582 | ; `http` - use http-rpc backend (default) |
|
585 | ; `http` - use http-rpc backend (default) | |
583 | vcs.server.protocol = http |
|
586 | vcs.server.protocol = http | |
584 |
|
587 | |||
585 | ; Push/Pull operations protocol, available options are: |
|
588 | ; Push/Pull operations protocol, available options are: | |
586 | ; `http` - use http-rpc backend (default) |
|
589 | ; `http` - use http-rpc backend (default) | |
587 | vcs.scm_app_implementation = http |
|
590 | vcs.scm_app_implementation = http | |
588 |
|
591 | |||
589 | ; Push/Pull operations hooks protocol, available options are: |
|
592 | ; Push/Pull operations hooks protocol, available options are: | |
590 | ; `http` - use http-rpc backend (default) |
|
593 | ; `http` - use http-rpc backend (default) | |
591 | ; `celery` - use celery based hooks |
|
594 | ; `celery` - use celery based hooks | |
592 | vcs.hooks.protocol = http |
|
595 | vcs.hooks.protocol = http | |
593 |
|
596 | |||
594 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be |
|
597 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be | |
595 | ; accessible via network. |
|
598 | ; accessible via network. | |
596 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) |
|
599 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) | |
597 | vcs.hooks.host = * |
|
600 | vcs.hooks.host = * | |
598 |
|
601 | |||
599 | ; Start VCSServer with this instance as a subprocess, useful for development |
|
602 | ; Start VCSServer with this instance as a subprocess, useful for development | |
600 | vcs.start_server = false |
|
603 | vcs.start_server = false | |
601 |
|
604 | |||
602 | ; List of enabled VCS backends, available options are: |
|
605 | ; List of enabled VCS backends, available options are: | |
603 | ; `hg` - mercurial |
|
606 | ; `hg` - mercurial | |
604 | ; `git` - git |
|
607 | ; `git` - git | |
605 | ; `svn` - subversion |
|
608 | ; `svn` - subversion | |
606 | vcs.backends = hg, git, svn |
|
609 | vcs.backends = hg, git, svn | |
607 |
|
610 | |||
608 | ; Wait this number of seconds before killing connection to the vcsserver |
|
611 | ; Wait this number of seconds before killing connection to the vcsserver | |
609 | vcs.connection_timeout = 3600 |
|
612 | vcs.connection_timeout = 3600 | |
610 |
|
613 | |||
611 | ; Cache flag to cache vcsserver remote calls locally |
|
614 | ; Cache flag to cache vcsserver remote calls locally | |
612 | ; It uses cache_region `cache_repo` |
|
615 | ; It uses cache_region `cache_repo` | |
613 | vcs.methods.cache = true |
|
616 | vcs.methods.cache = true | |
614 |
|
617 | |||
615 | ; #################################################### |
|
618 | ; #################################################### | |
616 | ; Subversion proxy support (mod_dav_svn) |
|
619 | ; Subversion proxy support (mod_dav_svn) | |
617 | ; Maps RhodeCode repo groups into SVN paths for Apache |
|
620 | ; Maps RhodeCode repo groups into SVN paths for Apache | |
618 | ; #################################################### |
|
621 | ; #################################################### | |
619 |
|
622 | |||
620 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
623 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. | |
621 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 |
|
624 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 | |
622 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
625 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible | |
623 | #vcs.svn.compatible_version = 1.8 |
|
626 | #vcs.svn.compatible_version = 1.8 | |
624 |
|
627 | |||
625 | ; Enable SVN proxy of requests over HTTP |
|
628 | ; Enable SVN proxy of requests over HTTP | |
626 | vcs.svn.proxy.enabled = true |
|
629 | vcs.svn.proxy.enabled = true | |
627 |
|
630 | |||
628 | ; host to connect to running SVN subsystem |
|
631 | ; host to connect to running SVN subsystem | |
629 | vcs.svn.proxy.host = http://svn:8090 |
|
632 | vcs.svn.proxy.host = http://svn:8090 | |
630 |
|
633 | |||
631 | ; Enable or disable the config file generation. |
|
634 | ; Enable or disable the config file generation. | |
632 | svn.proxy.generate_config = true |
|
635 | svn.proxy.generate_config = true | |
633 |
|
636 | |||
634 | ; Generate config file with `SVNListParentPath` set to `On`. |
|
637 | ; Generate config file with `SVNListParentPath` set to `On`. | |
635 | svn.proxy.list_parent_path = true |
|
638 | svn.proxy.list_parent_path = true | |
636 |
|
639 | |||
637 | ; Set location and file name of generated config file. |
|
640 | ; Set location and file name of generated config file. | |
638 | svn.proxy.config_file_path = /etc/rhodecode/conf/svn/mod_dav_svn.conf |
|
641 | svn.proxy.config_file_path = /etc/rhodecode/conf/svn/mod_dav_svn.conf | |
639 |
|
642 | |||
640 | ; alternative mod_dav config template. This needs to be a valid mako template |
|
643 | ; alternative mod_dav config template. This needs to be a valid mako template | |
641 | ; Example template can be found in the source code: |
|
644 | ; Example template can be found in the source code: | |
642 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako |
|
645 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako | |
643 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako |
|
646 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako | |
644 |
|
647 | |||
645 | ; Used as a prefix to the `Location` block in the generated config file. |
|
648 | ; Used as a prefix to the `Location` block in the generated config file. | |
646 | ; In most cases it should be set to `/`. |
|
649 | ; In most cases it should be set to `/`. | |
647 | svn.proxy.location_root = / |
|
650 | svn.proxy.location_root = / | |
648 |
|
651 | |||
649 | ; Command to reload the mod dav svn configuration on change. |
|
652 | ; Command to reload the mod dav svn configuration on change. | |
650 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh |
|
653 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh | |
651 | ; Make sure user who runs RhodeCode process is allowed to reload Apache |
|
654 | ; Make sure user who runs RhodeCode process is allowed to reload Apache | |
652 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
655 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
653 |
|
656 | |||
654 | ; If the timeout expires before the reload command finishes, the command will |
|
657 | ; If the timeout expires before the reload command finishes, the command will | |
655 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
658 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
656 | #svn.proxy.reload_timeout = 10 |
|
659 | #svn.proxy.reload_timeout = 10 | |
657 |
|
660 | |||
658 | ; #################### |
|
661 | ; #################### | |
659 | ; SSH Support Settings |
|
662 | ; SSH Support Settings | |
660 | ; #################### |
|
663 | ; #################### | |
661 |
|
664 | |||
662 | ; Defines if a custom authorized_keys file should be created and written on |
|
665 | ; Defines if a custom authorized_keys file should be created and written on | |
663 | ; any change user ssh keys. Setting this to false also disables possibility |
|
666 | ; any change user ssh keys. Setting this to false also disables possibility | |
664 | ; of adding SSH keys by users from web interface. Super admins can still |
|
667 | ; of adding SSH keys by users from web interface. Super admins can still | |
665 | ; manage SSH Keys. |
|
668 | ; manage SSH Keys. | |
666 | ssh.generate_authorized_keyfile = true |
|
669 | ssh.generate_authorized_keyfile = true | |
667 |
|
670 | |||
668 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
671 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` | |
669 | # ssh.authorized_keys_ssh_opts = |
|
672 | # ssh.authorized_keys_ssh_opts = | |
670 |
|
673 | |||
671 | ; Path to the authorized_keys file where the generate entries are placed. |
|
674 | ; Path to the authorized_keys file where the generate entries are placed. | |
672 | ; It is possible to have multiple key files specified in `sshd_config` e.g. |
|
675 | ; It is possible to have multiple key files specified in `sshd_config` e.g. | |
673 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
676 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode | |
674 | ssh.authorized_keys_file_path = /etc/rhodecode/conf/ssh/authorized_keys_rhodecode |
|
677 | ssh.authorized_keys_file_path = /etc/rhodecode/conf/ssh/authorized_keys_rhodecode | |
675 |
|
678 | |||
676 | ; Command to execute the SSH wrapper. The binary is available in the |
|
679 | ; Command to execute the SSH wrapper. The binary is available in the | |
677 | ; RhodeCode installation directory. |
|
680 | ; RhodeCode installation directory. | |
678 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
681 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
679 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 |
|
682 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 | |
680 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
683 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
681 |
|
684 | |||
682 | ; Allow shell when executing the ssh-wrapper command |
|
685 | ; Allow shell when executing the ssh-wrapper command | |
683 | ssh.wrapper_cmd_allow_shell = false |
|
686 | ssh.wrapper_cmd_allow_shell = false | |
684 |
|
687 | |||
685 | ; Enables logging, and detailed output send back to the client during SSH |
|
688 | ; Enables logging, and detailed output send back to the client during SSH | |
686 | ; operations. Useful for debugging, shouldn't be used in production. |
|
689 | ; operations. Useful for debugging, shouldn't be used in production. | |
687 | ssh.enable_debug_logging = false |
|
690 | ssh.enable_debug_logging = false | |
688 |
|
691 | |||
689 | ; Paths to binary executable, by default they are the names, but we can |
|
692 | ; Paths to binary executable, by default they are the names, but we can | |
690 | ; override them if we want to use a custom one |
|
693 | ; override them if we want to use a custom one | |
691 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg |
|
694 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg | |
692 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git |
|
695 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git | |
693 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve |
|
696 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve | |
694 |
|
697 | |||
695 | ; Enables SSH key generator web interface. Disabling this still allows users |
|
698 | ; Enables SSH key generator web interface. Disabling this still allows users | |
696 | ; to add their own keys. |
|
699 | ; to add their own keys. | |
697 | ssh.enable_ui_key_generator = true |
|
700 | ssh.enable_ui_key_generator = true | |
698 |
|
701 | |||
699 | ; Statsd client config, this is used to send metrics to statsd |
|
702 | ; Statsd client config, this is used to send metrics to statsd | |
700 | ; We recommend setting statsd_exported and scrape them using Prometheus |
|
703 | ; We recommend setting statsd_exported and scrape them using Prometheus | |
701 | #statsd.enabled = false |
|
704 | #statsd.enabled = false | |
702 | #statsd.statsd_host = 0.0.0.0 |
|
705 | #statsd.statsd_host = 0.0.0.0 | |
703 | #statsd.statsd_port = 8125 |
|
706 | #statsd.statsd_port = 8125 | |
704 | #statsd.statsd_prefix = |
|
707 | #statsd.statsd_prefix = | |
705 | #statsd.statsd_ipv6 = false |
|
708 | #statsd.statsd_ipv6 = false | |
706 |
|
709 | |||
707 | ; configure logging automatically at server startup set to false |
|
710 | ; configure logging automatically at server startup set to false | |
708 | ; to use the below custom logging config. |
|
711 | ; to use the below custom logging config. | |
709 | ; RC_LOGGING_FORMATTER |
|
712 | ; RC_LOGGING_FORMATTER | |
710 | ; RC_LOGGING_LEVEL |
|
713 | ; RC_LOGGING_LEVEL | |
711 | ; env variables can control the settings for logging in case of autoconfigure |
|
714 | ; env variables can control the settings for logging in case of autoconfigure | |
712 |
|
715 | |||
713 | #logging.autoconfigure = true |
|
716 | #logging.autoconfigure = true | |
714 |
|
717 | |||
715 | ; specify your own custom logging config file to configure logging |
|
718 | ; specify your own custom logging config file to configure logging | |
716 | #logging.logging_conf_file = /path/to/custom_logging.ini |
|
719 | #logging.logging_conf_file = /path/to/custom_logging.ini | |
717 |
|
720 | |||
718 | ; Dummy marker to add new entries after. |
|
721 | ; Dummy marker to add new entries after. | |
719 | ; Add any custom entries below. Please don't remove this marker. |
|
722 | ; Add any custom entries below. Please don't remove this marker. | |
720 | custom.conf = 1 |
|
723 | custom.conf = 1 | |
721 |
|
724 | |||
722 |
|
725 | |||
723 | ; ##################### |
|
726 | ; ##################### | |
724 | ; LOGGING CONFIGURATION |
|
727 | ; LOGGING CONFIGURATION | |
725 | ; ##################### |
|
728 | ; ##################### | |
726 |
|
729 | |||
727 | [loggers] |
|
730 | [loggers] | |
728 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper |
|
731 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper | |
729 |
|
732 | |||
730 | [handlers] |
|
733 | [handlers] | |
731 | keys = console, console_sql |
|
734 | keys = console, console_sql | |
732 |
|
735 | |||
733 | [formatters] |
|
736 | [formatters] | |
734 | keys = generic, json, color_formatter, color_formatter_sql |
|
737 | keys = generic, json, color_formatter, color_formatter_sql | |
735 |
|
738 | |||
736 | ; ####### |
|
739 | ; ####### | |
737 | ; LOGGERS |
|
740 | ; LOGGERS | |
738 | ; ####### |
|
741 | ; ####### | |
739 | [logger_root] |
|
742 | [logger_root] | |
740 | level = NOTSET |
|
743 | level = NOTSET | |
741 | handlers = console |
|
744 | handlers = console | |
742 |
|
745 | |||
743 | [logger_sqlalchemy] |
|
746 | [logger_sqlalchemy] | |
744 | level = INFO |
|
747 | level = INFO | |
745 | handlers = console_sql |
|
748 | handlers = console_sql | |
746 | qualname = sqlalchemy.engine |
|
749 | qualname = sqlalchemy.engine | |
747 | propagate = 0 |
|
750 | propagate = 0 | |
748 |
|
751 | |||
749 | [logger_beaker] |
|
752 | [logger_beaker] | |
750 | level = DEBUG |
|
753 | level = DEBUG | |
751 | handlers = |
|
754 | handlers = | |
752 | qualname = beaker.container |
|
755 | qualname = beaker.container | |
753 | propagate = 1 |
|
756 | propagate = 1 | |
754 |
|
757 | |||
755 | [logger_rhodecode] |
|
758 | [logger_rhodecode] | |
756 | level = DEBUG |
|
759 | level = DEBUG | |
757 | handlers = |
|
760 | handlers = | |
758 | qualname = rhodecode |
|
761 | qualname = rhodecode | |
759 | propagate = 1 |
|
762 | propagate = 1 | |
760 |
|
763 | |||
761 | [logger_ssh_wrapper] |
|
764 | [logger_ssh_wrapper] | |
762 | level = DEBUG |
|
765 | level = DEBUG | |
763 | handlers = |
|
766 | handlers = | |
764 | qualname = ssh_wrapper |
|
767 | qualname = ssh_wrapper | |
765 | propagate = 1 |
|
768 | propagate = 1 | |
766 |
|
769 | |||
767 | [logger_celery] |
|
770 | [logger_celery] | |
768 | level = DEBUG |
|
771 | level = DEBUG | |
769 | handlers = |
|
772 | handlers = | |
770 | qualname = celery |
|
773 | qualname = celery | |
771 |
|
774 | |||
772 |
|
775 | |||
773 | ; ######## |
|
776 | ; ######## | |
774 | ; HANDLERS |
|
777 | ; HANDLERS | |
775 | ; ######## |
|
778 | ; ######## | |
776 |
|
779 | |||
777 | [handler_console] |
|
780 | [handler_console] | |
778 | class = StreamHandler |
|
781 | class = StreamHandler | |
779 | args = (sys.stderr, ) |
|
782 | args = (sys.stderr, ) | |
780 | level = INFO |
|
783 | level = INFO | |
781 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' |
|
784 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' | |
782 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
785 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
783 | formatter = generic |
|
786 | formatter = generic | |
784 |
|
787 | |||
785 | [handler_console_sql] |
|
788 | [handler_console_sql] | |
786 | ; "level = DEBUG" logs SQL queries and results. |
|
789 | ; "level = DEBUG" logs SQL queries and results. | |
787 | ; "level = INFO" logs SQL queries. |
|
790 | ; "level = INFO" logs SQL queries. | |
788 | ; "level = WARN" logs neither. (Recommended for production systems.) |
|
791 | ; "level = WARN" logs neither. (Recommended for production systems.) | |
789 | class = StreamHandler |
|
792 | class = StreamHandler | |
790 | args = (sys.stderr, ) |
|
793 | args = (sys.stderr, ) | |
791 | level = WARN |
|
794 | level = WARN | |
792 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' |
|
795 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |
793 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
796 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
794 | formatter = generic |
|
797 | formatter = generic | |
795 |
|
798 | |||
796 | ; ########## |
|
799 | ; ########## | |
797 | ; FORMATTERS |
|
800 | ; FORMATTERS | |
798 | ; ########## |
|
801 | ; ########## | |
799 |
|
802 | |||
800 | [formatter_generic] |
|
803 | [formatter_generic] | |
801 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
804 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
802 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
805 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
803 | datefmt = %Y-%m-%d %H:%M:%S |
|
806 | datefmt = %Y-%m-%d %H:%M:%S | |
804 |
|
807 | |||
805 | [formatter_color_formatter] |
|
808 | [formatter_color_formatter] | |
806 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
809 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
807 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
810 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
808 | datefmt = %Y-%m-%d %H:%M:%S |
|
811 | datefmt = %Y-%m-%d %H:%M:%S | |
809 |
|
812 | |||
810 | [formatter_color_formatter_sql] |
|
813 | [formatter_color_formatter_sql] | |
811 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
814 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
812 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
815 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
813 | datefmt = %Y-%m-%d %H:%M:%S |
|
816 | datefmt = %Y-%m-%d %H:%M:%S | |
814 |
|
817 | |||
815 | [formatter_json] |
|
818 | [formatter_json] | |
816 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s |
|
819 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s | |
817 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
|
820 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
@@ -1,222 +1,223 b'' | |||||
1 | # Copyright (C) 2010-2023 RhodeCode GmbH |
|
1 | # Copyright (C) 2010-2023 RhodeCode GmbH | |
2 | # |
|
2 | # | |
3 | # This program is free software: you can redistribute it and/or modify |
|
3 | # This program is free software: you can redistribute it and/or modify | |
4 | # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | # it under the terms of the GNU Affero General Public License, version 3 | |
5 | # (only), as published by the Free Software Foundation. |
|
5 | # (only), as published by the Free Software Foundation. | |
6 | # |
|
6 | # | |
7 | # This program is distributed in the hope that it will be useful, |
|
7 | # This program is distributed in the hope that it will be useful, | |
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | # GNU General Public License for more details. |
|
10 | # GNU General Public License for more details. | |
11 | # |
|
11 | # | |
12 | # You should have received a copy of the GNU Affero General Public License |
|
12 | # You should have received a copy of the GNU Affero General Public License | |
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | # |
|
14 | # | |
15 | # This program is dual-licensed. If you wish to learn more about the |
|
15 | # This program is dual-licensed. If you wish to learn more about the | |
16 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
16 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
18 |
|
18 | |||
19 | import os |
|
19 | import os | |
20 | import tempfile |
|
20 | import tempfile | |
21 | import logging |
|
21 | import logging | |
22 |
|
22 | |||
23 | from pyramid.settings import asbool |
|
23 | from pyramid.settings import asbool | |
24 |
|
24 | |||
25 | from rhodecode.config.settings_maker import SettingsMaker |
|
25 | from rhodecode.config.settings_maker import SettingsMaker | |
26 | from rhodecode.config import utils as config_utils |
|
26 | from rhodecode.config import utils as config_utils | |
27 |
|
27 | |||
28 | log = logging.getLogger(__name__) |
|
28 | log = logging.getLogger(__name__) | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | def sanitize_settings_and_apply_defaults(global_config, settings): |
|
31 | def sanitize_settings_and_apply_defaults(global_config, settings): | |
32 | """ |
|
32 | """ | |
33 | Applies settings defaults and does all type conversion. |
|
33 | Applies settings defaults and does all type conversion. | |
34 |
|
34 | |||
35 | We would move all settings parsing and preparation into this place, so that |
|
35 | We would move all settings parsing and preparation into this place, so that | |
36 | we have only one place left which deals with this part. The remaining parts |
|
36 | we have only one place left which deals with this part. The remaining parts | |
37 | of the application would start to rely fully on well-prepared settings. |
|
37 | of the application would start to rely fully on well-prepared settings. | |
38 |
|
38 | |||
39 | This piece would later be split up per topic to avoid a big fat monster |
|
39 | This piece would later be split up per topic to avoid a big fat monster | |
40 | function. |
|
40 | function. | |
41 | """ |
|
41 | """ | |
42 | jn = os.path.join |
|
42 | jn = os.path.join | |
43 |
|
43 | |||
44 | global_settings_maker = SettingsMaker(global_config) |
|
44 | global_settings_maker = SettingsMaker(global_config) | |
45 | global_settings_maker.make_setting('debug', default=False, parser='bool') |
|
45 | global_settings_maker.make_setting('debug', default=False, parser='bool') | |
46 | debug_enabled = asbool(global_config.get('debug')) |
|
46 | debug_enabled = asbool(global_config.get('debug')) | |
47 |
|
47 | |||
48 | settings_maker = SettingsMaker(settings) |
|
48 | settings_maker = SettingsMaker(settings) | |
49 |
|
49 | |||
50 | settings_maker.make_setting( |
|
50 | settings_maker.make_setting( | |
51 | 'logging.autoconfigure', |
|
51 | 'logging.autoconfigure', | |
52 | default=False, |
|
52 | default=False, | |
53 | parser='bool') |
|
53 | parser='bool') | |
54 |
|
54 | |||
55 | logging_conf = jn(os.path.dirname(global_config.get('__file__')), 'logging.ini') |
|
55 | logging_conf = jn(os.path.dirname(global_config.get('__file__')), 'logging.ini') | |
56 | settings_maker.enable_logging(logging_conf, level='INFO' if debug_enabled else 'DEBUG') |
|
56 | settings_maker.enable_logging(logging_conf, level='INFO' if debug_enabled else 'DEBUG') | |
57 |
|
57 | |||
58 | # Default includes, possible to change as a user |
|
58 | # Default includes, possible to change as a user | |
59 | pyramid_includes = settings_maker.make_setting('pyramid.includes', [], parser='list:newline') |
|
59 | pyramid_includes = settings_maker.make_setting('pyramid.includes', [], parser='list:newline') | |
60 | log.debug( |
|
60 | log.debug( | |
61 | "Using the following pyramid.includes: %s", |
|
61 | "Using the following pyramid.includes: %s", | |
62 | pyramid_includes) |
|
62 | pyramid_includes) | |
63 |
|
63 | |||
64 | settings_maker.make_setting('rhodecode.edition', 'Community Edition') |
|
64 | settings_maker.make_setting('rhodecode.edition', 'Community Edition') | |
65 | settings_maker.make_setting('rhodecode.edition_id', 'CE') |
|
65 | settings_maker.make_setting('rhodecode.edition_id', 'CE') | |
66 |
|
66 | |||
67 | if 'mako.default_filters' not in settings: |
|
67 | if 'mako.default_filters' not in settings: | |
68 | # set custom default filters if we don't have it defined |
|
68 | # set custom default filters if we don't have it defined | |
69 | settings['mako.imports'] = 'from rhodecode.lib.base import h_filter' |
|
69 | settings['mako.imports'] = 'from rhodecode.lib.base import h_filter' | |
70 | settings['mako.default_filters'] = 'h_filter' |
|
70 | settings['mako.default_filters'] = 'h_filter' | |
71 |
|
71 | |||
72 | if 'mako.directories' not in settings: |
|
72 | if 'mako.directories' not in settings: | |
73 | mako_directories = settings.setdefault('mako.directories', [ |
|
73 | mako_directories = settings.setdefault('mako.directories', [ | |
74 | # Base templates of the original application |
|
74 | # Base templates of the original application | |
75 | 'rhodecode:templates', |
|
75 | 'rhodecode:templates', | |
76 | ]) |
|
76 | ]) | |
77 | log.debug( |
|
77 | log.debug( | |
78 | "Using the following Mako template directories: %s", |
|
78 | "Using the following Mako template directories: %s", | |
79 | mako_directories) |
|
79 | mako_directories) | |
80 |
|
80 | |||
81 | # NOTE(marcink): fix redis requirement for schema of connection since 3.X |
|
81 | # NOTE(marcink): fix redis requirement for schema of connection since 3.X | |
82 | if 'beaker.session.type' in settings and settings['beaker.session.type'] == 'ext:redis': |
|
82 | if 'beaker.session.type' in settings and settings['beaker.session.type'] == 'ext:redis': | |
83 | raw_url = settings['beaker.session.url'] |
|
83 | raw_url = settings['beaker.session.url'] | |
84 | if not raw_url.startswith(('redis://', 'rediss://', 'unix://')): |
|
84 | if not raw_url.startswith(('redis://', 'rediss://', 'unix://')): | |
85 | settings['beaker.session.url'] = 'redis://' + raw_url |
|
85 | settings['beaker.session.url'] = 'redis://' + raw_url | |
86 |
|
86 | |||
87 | settings_maker.make_setting('__file__', global_config.get('__file__')) |
|
87 | settings_maker.make_setting('__file__', global_config.get('__file__')) | |
88 |
|
88 | |||
89 | # TODO: johbo: Re-think this, usually the call to config.include |
|
89 | # TODO: johbo: Re-think this, usually the call to config.include | |
90 | # should allow to pass in a prefix. |
|
90 | # should allow to pass in a prefix. | |
91 | settings_maker.make_setting('rhodecode.api.url', '/_admin/api') |
|
91 | settings_maker.make_setting('rhodecode.api.url', '/_admin/api') | |
92 |
|
92 | |||
93 | # Sanitize generic settings. |
|
93 | # Sanitize generic settings. | |
94 | settings_maker.make_setting('default_encoding', 'UTF-8', parser='list') |
|
94 | settings_maker.make_setting('default_encoding', 'UTF-8', parser='list') | |
95 | settings_maker.make_setting('gzip_responses', False, parser='bool') |
|
95 | settings_maker.make_setting('gzip_responses', False, parser='bool') | |
96 | settings_maker.make_setting('startup.import_repos', 'false', parser='bool') |
|
96 | settings_maker.make_setting('startup.import_repos', 'false', parser='bool') | |
97 |
|
97 | |||
98 | # statsd |
|
98 | # statsd | |
99 | settings_maker.make_setting('statsd.enabled', False, parser='bool') |
|
99 | settings_maker.make_setting('statsd.enabled', False, parser='bool') | |
100 | settings_maker.make_setting('statsd.statsd_host', 'statsd-exporter', parser='string') |
|
100 | settings_maker.make_setting('statsd.statsd_host', 'statsd-exporter', parser='string') | |
101 | settings_maker.make_setting('statsd.statsd_port', 9125, parser='int') |
|
101 | settings_maker.make_setting('statsd.statsd_port', 9125, parser='int') | |
102 | settings_maker.make_setting('statsd.statsd_prefix', '') |
|
102 | settings_maker.make_setting('statsd.statsd_prefix', '') | |
103 | settings_maker.make_setting('statsd.statsd_ipv6', False, parser='bool') |
|
103 | settings_maker.make_setting('statsd.statsd_ipv6', False, parser='bool') | |
104 |
|
104 | |||
105 | settings_maker.make_setting('vcs.svn.compatible_version', '') |
|
105 | settings_maker.make_setting('vcs.svn.compatible_version', '') | |
106 | settings_maker.make_setting('vcs.svn.proxy.enabled', True, parser='bool') |
|
106 | settings_maker.make_setting('vcs.svn.proxy.enabled', True, parser='bool') | |
107 | settings_maker.make_setting('vcs.svn.proxy.host', 'http://svn:8090', parser='string') |
|
107 | settings_maker.make_setting('vcs.svn.proxy.host', 'http://svn:8090', parser='string') | |
108 | settings_maker.make_setting('vcs.hooks.protocol', 'http') |
|
108 | settings_maker.make_setting('vcs.hooks.protocol', 'http') | |
109 | settings_maker.make_setting('vcs.hooks.host', '*') |
|
109 | settings_maker.make_setting('vcs.hooks.host', '*') | |
110 | settings_maker.make_setting('vcs.scm_app_implementation', 'http') |
|
110 | settings_maker.make_setting('vcs.scm_app_implementation', 'http') | |
111 | settings_maker.make_setting('vcs.server', '') |
|
111 | settings_maker.make_setting('vcs.server', '') | |
112 | settings_maker.make_setting('vcs.server.protocol', 'http') |
|
112 | settings_maker.make_setting('vcs.server.protocol', 'http') | |
113 | settings_maker.make_setting('vcs.server.enable', 'true', parser='bool') |
|
113 | settings_maker.make_setting('vcs.server.enable', 'true', parser='bool') | |
114 | settings_maker.make_setting('vcs.hooks.direct_calls', 'false', parser='bool') |
|
114 | settings_maker.make_setting('vcs.hooks.direct_calls', 'false', parser='bool') | |
115 | settings_maker.make_setting('vcs.start_server', 'false', parser='bool') |
|
115 | settings_maker.make_setting('vcs.start_server', 'false', parser='bool') | |
116 | settings_maker.make_setting('vcs.backends', 'hg, git, svn', parser='list') |
|
116 | settings_maker.make_setting('vcs.backends', 'hg, git, svn', parser='list') | |
117 | settings_maker.make_setting('vcs.connection_timeout', 3600, parser='int') |
|
117 | settings_maker.make_setting('vcs.connection_timeout', 3600, parser='int') | |
118 |
|
118 | |||
119 | settings_maker.make_setting('vcs.methods.cache', True, parser='bool') |
|
119 | settings_maker.make_setting('vcs.methods.cache', True, parser='bool') | |
120 |
|
120 | |||
121 | # repo_store path |
|
121 | # repo_store path | |
122 | settings_maker.make_setting('repo_store.path', '/var/opt/rhodecode_repo_store') |
|
122 | settings_maker.make_setting('repo_store.path', '/var/opt/rhodecode_repo_store') | |
123 | # Support legacy values of vcs.scm_app_implementation. Legacy |
|
123 | # Support legacy values of vcs.scm_app_implementation. Legacy | |
124 | # configurations may use 'rhodecode.lib.middleware.utils.scm_app_http', or |
|
124 | # configurations may use 'rhodecode.lib.middleware.utils.scm_app_http', or | |
125 | # disabled since 4.13 'vcsserver.scm_app' which is now mapped to 'http'. |
|
125 | # disabled since 4.13 'vcsserver.scm_app' which is now mapped to 'http'. | |
126 | scm_app_impl = settings['vcs.scm_app_implementation'] |
|
126 | scm_app_impl = settings['vcs.scm_app_implementation'] | |
127 | if scm_app_impl in ['rhodecode.lib.middleware.utils.scm_app_http', 'vcsserver.scm_app']: |
|
127 | if scm_app_impl in ['rhodecode.lib.middleware.utils.scm_app_http', 'vcsserver.scm_app']: | |
128 | settings['vcs.scm_app_implementation'] = 'http' |
|
128 | settings['vcs.scm_app_implementation'] = 'http' | |
129 |
|
129 | |||
130 | settings_maker.make_setting('appenlight', False, parser='bool') |
|
130 | settings_maker.make_setting('appenlight', False, parser='bool') | |
131 |
|
131 | |||
132 | temp_store = tempfile.gettempdir() |
|
132 | temp_store = tempfile.gettempdir() | |
133 | tmp_cache_dir = jn(temp_store, 'rc_cache') |
|
133 | tmp_cache_dir = jn(temp_store, 'rc_cache') | |
134 |
|
134 | |||
135 | # save default, cache dir, and use it for all backends later. |
|
135 | # save default, cache dir, and use it for all backends later. | |
136 | default_cache_dir = settings_maker.make_setting( |
|
136 | default_cache_dir = settings_maker.make_setting( | |
137 | 'cache_dir', |
|
137 | 'cache_dir', | |
138 | default=tmp_cache_dir, default_when_empty=True, |
|
138 | default=tmp_cache_dir, default_when_empty=True, | |
139 | parser='dir:ensured') |
|
139 | parser='dir:ensured') | |
140 |
|
140 | |||
141 | # exception store cache |
|
141 | # exception store cache | |
142 | settings_maker.make_setting( |
|
142 | settings_maker.make_setting( | |
143 | 'exception_tracker.store_path', |
|
143 | 'exception_tracker.store_path', | |
144 | default=jn(default_cache_dir, 'exc_store'), default_when_empty=True, |
|
144 | default=jn(default_cache_dir, 'exc_store'), default_when_empty=True, | |
145 | parser='dir:ensured' |
|
145 | parser='dir:ensured' | |
146 | ) |
|
146 | ) | |
147 |
|
147 | |||
148 | settings_maker.make_setting( |
|
148 | settings_maker.make_setting( | |
149 | 'celerybeat-schedule.path', |
|
149 | 'celerybeat-schedule.path', | |
150 | default=jn(default_cache_dir, 'celerybeat_schedule', 'celerybeat-schedule.db'), default_when_empty=True, |
|
150 | default=jn(default_cache_dir, 'celerybeat_schedule', 'celerybeat-schedule.db'), default_when_empty=True, | |
151 | parser='file:ensured' |
|
151 | parser='file:ensured' | |
152 | ) |
|
152 | ) | |
153 |
|
153 | |||
154 | settings_maker.make_setting('exception_tracker.send_email', False, parser='bool') |
|
154 | settings_maker.make_setting('exception_tracker.send_email', False, parser='bool') | |
155 | settings_maker.make_setting('exception_tracker.email_prefix', '[RHODECODE ERROR]', default_when_empty=True) |
|
155 | settings_maker.make_setting('exception_tracker.email_prefix', '[RHODECODE ERROR]', default_when_empty=True) | |
156 |
|
156 | |||
157 | # sessions, ensure file since no-value is memory |
|
157 | # sessions, ensure file since no-value is memory | |
158 | settings_maker.make_setting('beaker.session.type', 'file') |
|
158 | settings_maker.make_setting('beaker.session.type', 'file') | |
159 | settings_maker.make_setting('beaker.session.data_dir', jn(default_cache_dir, 'session_data')) |
|
159 | settings_maker.make_setting('beaker.session.data_dir', jn(default_cache_dir, 'session_data')) | |
160 |
|
160 | |||
161 | # cache_general |
|
161 | # cache_general | |
162 | settings_maker.make_setting('rc_cache.cache_general.backend', 'dogpile.cache.rc.file_namespace') |
|
162 | settings_maker.make_setting('rc_cache.cache_general.backend', 'dogpile.cache.rc.file_namespace') | |
163 | settings_maker.make_setting('rc_cache.cache_general.expiration_time', 60 * 60 * 12, parser='int') |
|
163 | settings_maker.make_setting('rc_cache.cache_general.expiration_time', 60 * 60 * 12, parser='int') | |
164 | settings_maker.make_setting('rc_cache.cache_general.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_general.db')) |
|
164 | settings_maker.make_setting('rc_cache.cache_general.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_general.db')) | |
165 |
|
165 | |||
166 | # cache_perms |
|
166 | # cache_perms | |
167 | settings_maker.make_setting('rc_cache.cache_perms.backend', 'dogpile.cache.rc.file_namespace') |
|
167 | settings_maker.make_setting('rc_cache.cache_perms.backend', 'dogpile.cache.rc.file_namespace') | |
168 | settings_maker.make_setting('rc_cache.cache_perms.expiration_time', 60 * 60, parser='int') |
|
168 | settings_maker.make_setting('rc_cache.cache_perms.expiration_time', 60 * 60, parser='int') | |
169 | settings_maker.make_setting('rc_cache.cache_perms.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_perms_db')) |
|
169 | settings_maker.make_setting('rc_cache.cache_perms.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_perms_db')) | |
170 |
|
170 | |||
171 | # cache_repo |
|
171 | # cache_repo | |
172 | settings_maker.make_setting('rc_cache.cache_repo.backend', 'dogpile.cache.rc.file_namespace') |
|
172 | settings_maker.make_setting('rc_cache.cache_repo.backend', 'dogpile.cache.rc.file_namespace') | |
173 | settings_maker.make_setting('rc_cache.cache_repo.expiration_time', 60 * 60 * 24 * 30, parser='int') |
|
173 | settings_maker.make_setting('rc_cache.cache_repo.expiration_time', 60 * 60 * 24 * 30, parser='int') | |
174 | settings_maker.make_setting('rc_cache.cache_repo.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_repo_db')) |
|
174 | settings_maker.make_setting('rc_cache.cache_repo.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_repo_db')) | |
175 |
|
175 | |||
176 | # cache_license |
|
176 | # cache_license | |
177 | settings_maker.make_setting('rc_cache.cache_license.backend', 'dogpile.cache.rc.file_namespace') |
|
177 | settings_maker.make_setting('rc_cache.cache_license.backend', 'dogpile.cache.rc.file_namespace') | |
178 | settings_maker.make_setting('rc_cache.cache_license.expiration_time', 60 * 5, parser='int') |
|
178 | settings_maker.make_setting('rc_cache.cache_license.expiration_time', 60 * 5, parser='int') | |
179 | settings_maker.make_setting('rc_cache.cache_license.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_license_db')) |
|
179 | settings_maker.make_setting('rc_cache.cache_license.arguments.filename', jn(default_cache_dir, 'rhodecode_cache_license_db')) | |
180 |
|
180 | |||
181 | # cache_repo_longterm memory, 96H |
|
181 | # cache_repo_longterm memory, 96H | |
182 | settings_maker.make_setting('rc_cache.cache_repo_longterm.backend', 'dogpile.cache.rc.memory_lru') |
|
182 | settings_maker.make_setting('rc_cache.cache_repo_longterm.backend', 'dogpile.cache.rc.memory_lru') | |
183 | settings_maker.make_setting('rc_cache.cache_repo_longterm.expiration_time', 345600, parser='int') |
|
183 | settings_maker.make_setting('rc_cache.cache_repo_longterm.expiration_time', 345600, parser='int') | |
184 | settings_maker.make_setting('rc_cache.cache_repo_longterm.max_size', 10000, parser='int') |
|
184 | settings_maker.make_setting('rc_cache.cache_repo_longterm.max_size', 10000, parser='int') | |
185 |
|
185 | |||
186 | # sql_cache_short |
|
186 | # sql_cache_short | |
187 | settings_maker.make_setting('rc_cache.sql_cache_short.backend', 'dogpile.cache.rc.memory_lru') |
|
187 | settings_maker.make_setting('rc_cache.sql_cache_short.backend', 'dogpile.cache.rc.memory_lru') | |
188 | settings_maker.make_setting('rc_cache.sql_cache_short.expiration_time', 30, parser='int') |
|
188 | settings_maker.make_setting('rc_cache.sql_cache_short.expiration_time', 30, parser='int') | |
189 | settings_maker.make_setting('rc_cache.sql_cache_short.max_size', 10000, parser='int') |
|
189 | settings_maker.make_setting('rc_cache.sql_cache_short.max_size', 10000, parser='int') | |
190 |
|
190 | |||
191 | # archive_cache |
|
191 | # archive_cache | |
192 | settings_maker.make_setting('archive_cache.locking.url', 'redis://redis:6379/1') |
|
192 | settings_maker.make_setting('archive_cache.locking.url', 'redis://redis:6379/1') | |
193 | settings_maker.make_setting('archive_cache.backend.type', 'filesystem') |
|
193 | settings_maker.make_setting('archive_cache.backend.type', 'filesystem') | |
194 |
|
194 | |||
195 | settings_maker.make_setting('archive_cache.filesystem.store_dir', jn(default_cache_dir, 'archive_cache'), default_when_empty=True,) |
|
195 | settings_maker.make_setting('archive_cache.filesystem.store_dir', jn(default_cache_dir, 'archive_cache'), default_when_empty=True,) | |
196 | settings_maker.make_setting('archive_cache.filesystem.cache_shards', 8, parser='int') |
|
196 | settings_maker.make_setting('archive_cache.filesystem.cache_shards', 8, parser='int') | |
197 | settings_maker.make_setting('archive_cache.filesystem.cache_size_gb', 10, parser='float') |
|
197 | settings_maker.make_setting('archive_cache.filesystem.cache_size_gb', 10, parser='float') | |
198 | settings_maker.make_setting('archive_cache.filesystem.eviction_policy', 'least-recently-stored') |
|
198 | settings_maker.make_setting('archive_cache.filesystem.eviction_policy', 'least-recently-stored') | |
199 |
|
199 | |||
200 | settings_maker.make_setting('archive_cache.filesystem.retry', False, parser='bool') |
|
200 | settings_maker.make_setting('archive_cache.filesystem.retry', False, parser='bool') | |
201 | settings_maker.make_setting('archive_cache.filesystem.retry_backoff', 1, parser='int') |
|
201 | settings_maker.make_setting('archive_cache.filesystem.retry_backoff', 1, parser='int') | |
202 | settings_maker.make_setting('archive_cache.filesystem.retry_attempts', 10, parser='int') |
|
202 | settings_maker.make_setting('archive_cache.filesystem.retry_attempts', 10, parser='int') | |
203 |
|
203 | |||
204 | settings_maker.make_setting('archive_cache.objectstore.url', jn(default_cache_dir, 'archive_cache'), default_when_empty=True,) |
|
204 | settings_maker.make_setting('archive_cache.objectstore.url', jn(default_cache_dir, 'archive_cache'), default_when_empty=True,) | |
205 | settings_maker.make_setting('archive_cache.objectstore.key', '') |
|
205 | settings_maker.make_setting('archive_cache.objectstore.key', '') | |
206 | settings_maker.make_setting('archive_cache.objectstore.secret', '') |
|
206 | settings_maker.make_setting('archive_cache.objectstore.secret', '') | |
|
207 | settings_maker.make_setting('archive_cache.objectstore.region', 'eu-central-1') | |||
207 | settings_maker.make_setting('archive_cache.objectstore.bucket', 'rhodecode-archive-cache', default_when_empty=True,) |
|
208 | settings_maker.make_setting('archive_cache.objectstore.bucket', 'rhodecode-archive-cache', default_when_empty=True,) | |
208 | settings_maker.make_setting('archive_cache.objectstore.bucket_shards', 8, parser='int') |
|
209 | settings_maker.make_setting('archive_cache.objectstore.bucket_shards', 8, parser='int') | |
209 |
|
210 | |||
210 | settings_maker.make_setting('archive_cache.objectstore.cache_size_gb', 10, parser='float') |
|
211 | settings_maker.make_setting('archive_cache.objectstore.cache_size_gb', 10, parser='float') | |
211 | settings_maker.make_setting('archive_cache.objectstore.eviction_policy', 'least-recently-stored') |
|
212 | settings_maker.make_setting('archive_cache.objectstore.eviction_policy', 'least-recently-stored') | |
212 |
|
213 | |||
213 | settings_maker.make_setting('archive_cache.objectstore.retry', False, parser='bool') |
|
214 | settings_maker.make_setting('archive_cache.objectstore.retry', False, parser='bool') | |
214 | settings_maker.make_setting('archive_cache.objectstore.retry_backoff', 1, parser='int') |
|
215 | settings_maker.make_setting('archive_cache.objectstore.retry_backoff', 1, parser='int') | |
215 | settings_maker.make_setting('archive_cache.objectstore.retry_attempts', 10, parser='int') |
|
216 | settings_maker.make_setting('archive_cache.objectstore.retry_attempts', 10, parser='int') | |
216 |
|
217 | |||
217 | settings_maker.env_expand() |
|
218 | settings_maker.env_expand() | |
218 |
|
219 | |||
219 | # configure instance id |
|
220 | # configure instance id | |
220 | config_utils.set_instance_id(settings) |
|
221 | config_utils.set_instance_id(settings) | |
221 |
|
222 | |||
222 | return settings |
|
223 | return settings |
@@ -1,170 +1,171 b'' | |||||
1 | # Copyright (C) 2015-2024 RhodeCode GmbH |
|
1 | # Copyright (C) 2015-2024 RhodeCode GmbH | |
2 | # |
|
2 | # | |
3 | # This program is free software: you can redistribute it and/or modify |
|
3 | # This program is free software: you can redistribute it and/or modify | |
4 | # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | # it under the terms of the GNU Affero General Public License, version 3 | |
5 | # (only), as published by the Free Software Foundation. |
|
5 | # (only), as published by the Free Software Foundation. | |
6 | # |
|
6 | # | |
7 | # This program is distributed in the hope that it will be useful, |
|
7 | # This program is distributed in the hope that it will be useful, | |
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | # GNU General Public License for more details. |
|
10 | # GNU General Public License for more details. | |
11 | # |
|
11 | # | |
12 | # You should have received a copy of the GNU Affero General Public License |
|
12 | # You should have received a copy of the GNU Affero General Public License | |
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | # |
|
14 | # | |
15 | # This program is dual-licensed. If you wish to learn more about the |
|
15 | # This program is dual-licensed. If you wish to learn more about the | |
16 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
16 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
18 |
|
18 | |||
19 | import codecs |
|
19 | import codecs | |
20 | import hashlib |
|
20 | import hashlib | |
21 | import logging |
|
21 | import logging | |
22 | import os |
|
22 | import os | |
23 | import typing |
|
23 | import typing | |
24 |
|
24 | |||
25 | import fsspec |
|
25 | import fsspec | |
26 |
|
26 | |||
27 | from .base import BaseCache, BaseShard |
|
27 | from .base import BaseCache, BaseShard | |
28 | from ..utils import ShardFileReader, NOT_GIVEN |
|
28 | from ..utils import ShardFileReader, NOT_GIVEN | |
29 | from ...type_utils import str2bool |
|
29 | from ...type_utils import str2bool | |
30 |
|
30 | |||
31 | log = logging.getLogger(__name__) |
|
31 | log = logging.getLogger(__name__) | |
32 |
|
32 | |||
33 |
|
33 | |||
34 | class S3Shard(BaseShard): |
|
34 | class S3Shard(BaseShard): | |
35 |
|
35 | |||
36 | def __init__(self, index, bucket, bucket_folder, fs, **settings): |
|
36 | def __init__(self, index, bucket, bucket_folder, fs, **settings): | |
37 | self._index: int = index |
|
37 | self._index: int = index | |
38 | self._bucket_folder: str = bucket_folder |
|
38 | self._bucket_folder: str = bucket_folder | |
39 | self.storage_type: str = 'bucket' |
|
39 | self.storage_type: str = 'bucket' | |
40 | self._bucket_main: str = bucket |
|
40 | self._bucket_main: str = bucket | |
41 |
|
41 | |||
42 | self.fs = fs |
|
42 | self.fs = fs | |
43 |
|
43 | |||
44 | @property |
|
44 | @property | |
45 | def bucket(self) -> str: |
|
45 | def bucket(self) -> str: | |
46 | """Cache bucket final path.""" |
|
46 | """Cache bucket final path.""" | |
47 | return os.path.join(self._bucket_main, self._bucket_folder) |
|
47 | return os.path.join(self._bucket_main, self._bucket_folder) | |
48 |
|
48 | |||
49 | def _get_keyfile(self, archive_key) -> tuple[str, str]: |
|
49 | def _get_keyfile(self, archive_key) -> tuple[str, str]: | |
50 | key_file: str = f'{archive_key}-{self.key_suffix}' |
|
50 | key_file: str = f'{archive_key}-{self.key_suffix}' | |
51 | return key_file, os.path.join(self.bucket, key_file) |
|
51 | return key_file, os.path.join(self.bucket, key_file) | |
52 |
|
52 | |||
53 | def _get_writer(self, path, mode): |
|
53 | def _get_writer(self, path, mode): | |
54 | return self.fs.open(path, 'wb') |
|
54 | return self.fs.open(path, 'wb') | |
55 |
|
55 | |||
56 | def _write_file(self, full_path, iterator, mode): |
|
56 | def _write_file(self, full_path, iterator, mode): | |
57 |
|
57 | |||
58 | # ensure folder in bucket exists |
|
58 | # ensure folder in bucket exists | |
59 | destination = self.bucket |
|
59 | destination = self.bucket | |
60 | if not self.fs.exists(destination): |
|
60 | if not self.fs.exists(destination): | |
61 | self.fs.mkdir(destination, s3_additional_kwargs={}) |
|
61 | self.fs.mkdir(destination, s3_additional_kwargs={}) | |
62 |
|
62 | |||
63 | writer = self._get_writer(full_path, mode) |
|
63 | writer = self._get_writer(full_path, mode) | |
64 |
|
64 | |||
65 | digest = hashlib.sha256() |
|
65 | digest = hashlib.sha256() | |
66 | with writer: |
|
66 | with writer: | |
67 | size = 0 |
|
67 | size = 0 | |
68 | for chunk in iterator: |
|
68 | for chunk in iterator: | |
69 | size += len(chunk) |
|
69 | size += len(chunk) | |
70 | digest.update(chunk) |
|
70 | digest.update(chunk) | |
71 | writer.write(chunk) |
|
71 | writer.write(chunk) | |
72 |
|
72 | |||
73 | sha256 = digest.hexdigest() |
|
73 | sha256 = digest.hexdigest() | |
74 | log.debug('written new archive cache under %s, sha256: %s', full_path, sha256) |
|
74 | log.debug('written new archive cache under %s, sha256: %s', full_path, sha256) | |
75 | return size, sha256 |
|
75 | return size, sha256 | |
76 |
|
76 | |||
77 | def store(self, key, value_reader, metadata: dict | None = None): |
|
77 | def store(self, key, value_reader, metadata: dict | None = None): | |
78 | return self._store(key, value_reader, metadata, mode='wb') |
|
78 | return self._store(key, value_reader, metadata, mode='wb') | |
79 |
|
79 | |||
80 | def fetch(self, key, retry=NOT_GIVEN, |
|
80 | def fetch(self, key, retry=NOT_GIVEN, | |
81 | retry_attempts=NOT_GIVEN, retry_backoff=1, |
|
81 | retry_attempts=NOT_GIVEN, retry_backoff=1, | |
82 | presigned_url_expires: int = 0) -> tuple[ShardFileReader, dict]: |
|
82 | presigned_url_expires: int = 0) -> tuple[ShardFileReader, dict]: | |
83 | return self._fetch(key, retry, retry_attempts, retry_backoff, presigned_url_expires=presigned_url_expires) |
|
83 | return self._fetch(key, retry, retry_attempts, retry_backoff, presigned_url_expires=presigned_url_expires) | |
84 |
|
84 | |||
85 | def remove(self, key): |
|
85 | def remove(self, key): | |
86 | return self._remove(key) |
|
86 | return self._remove(key) | |
87 |
|
87 | |||
88 | def random_filename(self): |
|
88 | def random_filename(self): | |
89 | """Return filename and full-path tuple for file storage. |
|
89 | """Return filename and full-path tuple for file storage. | |
90 |
|
90 | |||
91 | Filename will be a randomly generated 28 character hexadecimal string |
|
91 | Filename will be a randomly generated 28 character hexadecimal string | |
92 | with ".archive_cache" suffixed. Two levels of sub-directories will be used to |
|
92 | with ".archive_cache" suffixed. Two levels of sub-directories will be used to | |
93 | reduce the size of directories. On older filesystems, lookups in |
|
93 | reduce the size of directories. On older filesystems, lookups in | |
94 | directories with many files may be slow. |
|
94 | directories with many files may be slow. | |
95 | """ |
|
95 | """ | |
96 |
|
96 | |||
97 | hex_name = codecs.encode(os.urandom(16), 'hex').decode('utf-8') |
|
97 | hex_name = codecs.encode(os.urandom(16), 'hex').decode('utf-8') | |
98 |
|
98 | |||
99 | archive_name = hex_name[4:] + '.archive_cache' |
|
99 | archive_name = hex_name[4:] + '.archive_cache' | |
100 | filename = f"{hex_name[:2]}-{hex_name[2:4]}-{archive_name}" |
|
100 | filename = f"{hex_name[:2]}-{hex_name[2:4]}-{archive_name}" | |
101 |
|
101 | |||
102 | full_path = os.path.join(self.bucket, filename) |
|
102 | full_path = os.path.join(self.bucket, filename) | |
103 | return archive_name, full_path |
|
103 | return archive_name, full_path | |
104 |
|
104 | |||
105 | def __repr__(self): |
|
105 | def __repr__(self): | |
106 | return f'{self.__class__.__name__}(index={self._index}, bucket={self.bucket})' |
|
106 | return f'{self.__class__.__name__}(index={self._index}, bucket={self.bucket})' | |
107 |
|
107 | |||
108 |
|
108 | |||
109 | class ObjectStoreCache(BaseCache): |
|
109 | class ObjectStoreCache(BaseCache): | |
110 | shard_name: str = 'shard-{:03d}' |
|
110 | shard_name: str = 'shard-{:03d}' | |
111 | shard_cls = S3Shard |
|
111 | shard_cls = S3Shard | |
112 |
|
112 | |||
113 | def __init__(self, locking_url, **settings): |
|
113 | def __init__(self, locking_url, **settings): | |
114 | """ |
|
114 | """ | |
115 | Initialize objectstore cache instance. |
|
115 | Initialize objectstore cache instance. | |
116 |
|
116 | |||
117 | :param str locking_url: redis url for a lock |
|
117 | :param str locking_url: redis url for a lock | |
118 | :param settings: settings dict |
|
118 | :param settings: settings dict | |
119 |
|
119 | |||
120 | """ |
|
120 | """ | |
121 | self._locking_url = locking_url |
|
121 | self._locking_url = locking_url | |
122 | self._config = settings |
|
122 | self._config = settings | |
123 |
|
123 | |||
124 | objectstore_url = self.get_conf('archive_cache.objectstore.url') |
|
124 | objectstore_url = self.get_conf('archive_cache.objectstore.url') | |
125 | self._storage_path = objectstore_url # common path for all from BaseCache |
|
125 | self._storage_path = objectstore_url # common path for all from BaseCache | |
126 |
|
126 | |||
127 | self._shard_count = int(self.get_conf('archive_cache.objectstore.bucket_shards', pop=True)) |
|
127 | self._shard_count = int(self.get_conf('archive_cache.objectstore.bucket_shards', pop=True)) | |
128 | if self._shard_count < 1: |
|
128 | if self._shard_count < 1: | |
129 | raise ValueError('cache_shards must be 1 or more') |
|
129 | raise ValueError('cache_shards must be 1 or more') | |
130 |
|
130 | |||
131 | self._bucket = settings.pop('archive_cache.objectstore.bucket') |
|
131 | self._bucket = settings.pop('archive_cache.objectstore.bucket') | |
132 | if not self._bucket: |
|
132 | if not self._bucket: | |
133 | raise ValueError('archive_cache.objectstore.bucket needs to have a value') |
|
133 | raise ValueError('archive_cache.objectstore.bucket needs to have a value') | |
134 |
|
134 | |||
135 | self._eviction_policy = self.get_conf('archive_cache.objectstore.eviction_policy', pop=True) |
|
135 | self._eviction_policy = self.get_conf('archive_cache.objectstore.eviction_policy', pop=True) | |
136 | self._cache_size_limit = self.gb_to_bytes(int(self.get_conf('archive_cache.objectstore.cache_size_gb'))) |
|
136 | self._cache_size_limit = self.gb_to_bytes(int(self.get_conf('archive_cache.objectstore.cache_size_gb'))) | |
137 |
|
137 | |||
138 | self.retry = str2bool(self.get_conf('archive_cache.objectstore.retry', pop=True)) |
|
138 | self.retry = str2bool(self.get_conf('archive_cache.objectstore.retry', pop=True)) | |
139 | self.retry_attempts = int(self.get_conf('archive_cache.objectstore.retry_attempts', pop=True)) |
|
139 | self.retry_attempts = int(self.get_conf('archive_cache.objectstore.retry_attempts', pop=True)) | |
140 | self.retry_backoff = int(self.get_conf('archive_cache.objectstore.retry_backoff', pop=True)) |
|
140 | self.retry_backoff = int(self.get_conf('archive_cache.objectstore.retry_backoff', pop=True)) | |
141 |
|
141 | |||
142 | endpoint_url = settings.pop('archive_cache.objectstore.url') |
|
142 | endpoint_url = settings.pop('archive_cache.objectstore.url') | |
143 | key = settings.pop('archive_cache.objectstore.key') |
|
143 | key = settings.pop('archive_cache.objectstore.key') | |
144 | secret = settings.pop('archive_cache.objectstore.secret') |
|
144 | secret = settings.pop('archive_cache.objectstore.secret') | |
|
145 | region = settings.pop('archive_cache.objectstore.region') | |||
145 |
|
146 | |||
146 | log.debug('Initializing %s archival cache instance', self) |
|
147 | log.debug('Initializing %s archival cache instance', self) | |
147 |
|
148 | |||
148 | fs = fsspec.filesystem('s3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret) |
|
149 | fs = fsspec.filesystem('s3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret, region=region) | |
149 |
|
150 | |||
150 | # init main bucket |
|
151 | # init main bucket | |
151 | if not fs.exists(self._bucket): |
|
152 | if not fs.exists(self._bucket): | |
152 | fs.mkdir(self._bucket) |
|
153 | fs.mkdir(self._bucket) | |
153 |
|
154 | |||
154 | self._shards = tuple( |
|
155 | self._shards = tuple( | |
155 | self.shard_cls( |
|
156 | self.shard_cls( | |
156 | index=num, |
|
157 | index=num, | |
157 | bucket=self._bucket, |
|
158 | bucket=self._bucket, | |
158 | bucket_folder=self.shard_name.format(num), |
|
159 | bucket_folder=self.shard_name.format(num), | |
159 | fs=fs, |
|
160 | fs=fs, | |
160 | **settings, |
|
161 | **settings, | |
161 | ) |
|
162 | ) | |
162 | for num in range(self._shard_count) |
|
163 | for num in range(self._shard_count) | |
163 | ) |
|
164 | ) | |
164 | self._hash = self._shards[0].hash |
|
165 | self._hash = self._shards[0].hash | |
165 |
|
166 | |||
166 | def _get_size(self, shard, archive_path): |
|
167 | def _get_size(self, shard, archive_path): | |
167 | return shard.fs.info(archive_path)['size'] |
|
168 | return shard.fs.info(archive_path)['size'] | |
168 |
|
169 | |||
169 | def set_presigned_url_expiry(self, val: int) -> None: |
|
170 | def set_presigned_url_expiry(self, val: int) -> None: | |
170 | self.presigned_url_expires = val |
|
171 | self.presigned_url_expires = val |
@@ -1,831 +1,834 b'' | |||||
1 |
|
1 | |||
2 | ; ######################################### |
|
2 | ; ######################################### | |
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION |
|
3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION | |
4 | ; ######################################### |
|
4 | ; ######################################### | |
5 |
|
5 | |||
6 | [DEFAULT] |
|
6 | [DEFAULT] | |
7 | ; Debug flag sets all loggers to debug, and enables request tracking |
|
7 | ; Debug flag sets all loggers to debug, and enables request tracking | |
8 | debug = true |
|
8 | debug = true | |
9 |
|
9 | |||
10 | ; ######################################################################## |
|
10 | ; ######################################################################## | |
11 | ; EMAIL CONFIGURATION |
|
11 | ; EMAIL CONFIGURATION | |
12 | ; These settings will be used by the RhodeCode mailing system |
|
12 | ; These settings will be used by the RhodeCode mailing system | |
13 | ; ######################################################################## |
|
13 | ; ######################################################################## | |
14 |
|
14 | |||
15 | ; prefix all emails subjects with given prefix, helps filtering out emails |
|
15 | ; prefix all emails subjects with given prefix, helps filtering out emails | |
16 | #email_prefix = [RhodeCode] |
|
16 | #email_prefix = [RhodeCode] | |
17 |
|
17 | |||
18 | ; email FROM address all mails will be sent |
|
18 | ; email FROM address all mails will be sent | |
19 | #app_email_from = rhodecode-noreply@localhost |
|
19 | #app_email_from = rhodecode-noreply@localhost | |
20 |
|
20 | |||
21 | #smtp_server = mail.server.com |
|
21 | #smtp_server = mail.server.com | |
22 | #smtp_username = |
|
22 | #smtp_username = | |
23 | #smtp_password = |
|
23 | #smtp_password = | |
24 | #smtp_port = |
|
24 | #smtp_port = | |
25 | #smtp_use_tls = false |
|
25 | #smtp_use_tls = false | |
26 | #smtp_use_ssl = true |
|
26 | #smtp_use_ssl = true | |
27 |
|
27 | |||
28 | [server:main] |
|
28 | [server:main] | |
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, |
|
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, | |
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py |
|
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py | |
31 | host = 127.0.0.1 |
|
31 | host = 127.0.0.1 | |
32 | port = 10020 |
|
32 | port = 10020 | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | ; ########################### |
|
35 | ; ########################### | |
36 | ; GUNICORN APPLICATION SERVER |
|
36 | ; GUNICORN APPLICATION SERVER | |
37 | ; ########################### |
|
37 | ; ########################### | |
38 |
|
38 | |||
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py |
|
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py | |
40 |
|
40 | |||
41 | ; Module to use, this setting shouldn't be changed |
|
41 | ; Module to use, this setting shouldn't be changed | |
42 | use = egg:gunicorn#main |
|
42 | use = egg:gunicorn#main | |
43 |
|
43 | |||
44 | ; Prefix middleware for RhodeCode. |
|
44 | ; Prefix middleware for RhodeCode. | |
45 | ; recommended when using proxy setup. |
|
45 | ; recommended when using proxy setup. | |
46 | ; allows to set RhodeCode under a prefix in server. |
|
46 | ; allows to set RhodeCode under a prefix in server. | |
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. |
|
47 | ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. | |
48 | ; And set your prefix like: `prefix = /custom_prefix` |
|
48 | ; And set your prefix like: `prefix = /custom_prefix` | |
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need |
|
49 | ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need | |
50 | ; to make your cookies only work on prefix url |
|
50 | ; to make your cookies only work on prefix url | |
51 | [filter:proxy-prefix] |
|
51 | [filter:proxy-prefix] | |
52 | use = egg:PasteDeploy#prefix |
|
52 | use = egg:PasteDeploy#prefix | |
53 | prefix = / |
|
53 | prefix = / | |
54 |
|
54 | |||
55 | [app:main] |
|
55 | [app:main] | |
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory |
|
56 | ; The %(here)s variable will be replaced with the absolute path of parent directory | |
57 | ; of this file |
|
57 | ; of this file | |
58 | ; Each option in the app:main can be override by an environmental variable |
|
58 | ; Each option in the app:main can be override by an environmental variable | |
59 | ; |
|
59 | ; | |
60 | ;To override an option: |
|
60 | ;To override an option: | |
61 | ; |
|
61 | ; | |
62 | ;RC_<KeyName> |
|
62 | ;RC_<KeyName> | |
63 | ;Everything should be uppercase, . and - should be replaced by _. |
|
63 | ;Everything should be uppercase, . and - should be replaced by _. | |
64 | ;For example, if you have these configuration settings: |
|
64 | ;For example, if you have these configuration settings: | |
65 | ;rc_cache.repo_object.backend = foo |
|
65 | ;rc_cache.repo_object.backend = foo | |
66 | ;can be overridden by |
|
66 | ;can be overridden by | |
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo |
|
67 | ;export RC_CACHE_REPO_OBJECT_BACKEND=foo | |
68 |
|
68 | |||
69 | use = egg:rhodecode-enterprise-ce |
|
69 | use = egg:rhodecode-enterprise-ce | |
70 |
|
70 | |||
71 | ; enable proxy prefix middleware, defined above |
|
71 | ; enable proxy prefix middleware, defined above | |
72 | #filter-with = proxy-prefix |
|
72 | #filter-with = proxy-prefix | |
73 |
|
73 | |||
74 | ; encryption key used to encrypt social plugin tokens, |
|
74 | ; encryption key used to encrypt social plugin tokens, | |
75 | ; remote_urls with credentials etc, if not set it defaults to |
|
75 | ; remote_urls with credentials etc, if not set it defaults to | |
76 | ; `beaker.session.secret` |
|
76 | ; `beaker.session.secret` | |
77 | #rhodecode.encrypted_values.secret = |
|
77 | #rhodecode.encrypted_values.secret = | |
78 |
|
78 | |||
79 | ; decryption strict mode (enabled by default). It controls if decryption raises |
|
79 | ; decryption strict mode (enabled by default). It controls if decryption raises | |
80 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
80 | ; `SignatureVerificationError` in case of wrong key, or damaged encryption data. | |
81 | #rhodecode.encrypted_values.strict = false |
|
81 | #rhodecode.encrypted_values.strict = false | |
82 |
|
82 | |||
83 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) |
|
83 | ; Pick algorithm for encryption. Either fernet (more secure) or aes (default) | |
84 | ; fernet is safer, and we strongly recommend switching to it. |
|
84 | ; fernet is safer, and we strongly recommend switching to it. | |
85 | ; Due to backward compatibility aes is used as default. |
|
85 | ; Due to backward compatibility aes is used as default. | |
86 | #rhodecode.encrypted_values.algorithm = fernet |
|
86 | #rhodecode.encrypted_values.algorithm = fernet | |
87 |
|
87 | |||
88 | ; Return gzipped responses from RhodeCode (static files/application) |
|
88 | ; Return gzipped responses from RhodeCode (static files/application) | |
89 | gzip_responses = false |
|
89 | gzip_responses = false | |
90 |
|
90 | |||
91 | ; Auto-generate javascript routes file on startup |
|
91 | ; Auto-generate javascript routes file on startup | |
92 | generate_js_files = false |
|
92 | generate_js_files = false | |
93 |
|
93 | |||
94 | ; System global default language. |
|
94 | ; System global default language. | |
95 | ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
95 | ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh | |
96 | lang = en |
|
96 | lang = en | |
97 |
|
97 | |||
98 | ; Perform a full repository scan and import on each server start. |
|
98 | ; Perform a full repository scan and import on each server start. | |
99 | ; Settings this to true could lead to very long startup time. |
|
99 | ; Settings this to true could lead to very long startup time. | |
100 | startup.import_repos = true |
|
100 | startup.import_repos = true | |
101 |
|
101 | |||
102 | ; URL at which the application is running. This is used for Bootstrapping |
|
102 | ; URL at which the application is running. This is used for Bootstrapping | |
103 | ; requests in context when no web request is available. Used in ishell, or |
|
103 | ; requests in context when no web request is available. Used in ishell, or | |
104 | ; SSH calls. Set this for events to receive proper url for SSH calls. |
|
104 | ; SSH calls. Set this for events to receive proper url for SSH calls. | |
105 | app.base_url = http://rhodecode.local |
|
105 | app.base_url = http://rhodecode.local | |
106 |
|
106 | |||
107 | ; Host at which the Service API is running. |
|
107 | ; Host at which the Service API is running. | |
108 | app.service_api.host = http://rhodecode.local:10020 |
|
108 | app.service_api.host = http://rhodecode.local:10020 | |
109 |
|
109 | |||
110 | ; Secret for Service API authentication. |
|
110 | ; Secret for Service API authentication. | |
111 | app.service_api.token = |
|
111 | app.service_api.token = | |
112 |
|
112 | |||
113 | ; Unique application ID. Should be a random unique string for security. |
|
113 | ; Unique application ID. Should be a random unique string for security. | |
114 | app_instance_uuid = rc-production |
|
114 | app_instance_uuid = rc-production | |
115 |
|
115 | |||
116 | ; Cut off limit for large diffs (size in bytes). If overall diff size on |
|
116 | ; Cut off limit for large diffs (size in bytes). If overall diff size on | |
117 | ; commit, or pull request exceeds this limit this diff will be displayed |
|
117 | ; commit, or pull request exceeds this limit this diff will be displayed | |
118 | ; partially. E.g 512000 == 512Kb |
|
118 | ; partially. E.g 512000 == 512Kb | |
119 | cut_off_limit_diff = 1024000 |
|
119 | cut_off_limit_diff = 1024000 | |
120 |
|
120 | |||
121 | ; Cut off limit for large files inside diffs (size in bytes). Each individual |
|
121 | ; Cut off limit for large files inside diffs (size in bytes). Each individual | |
122 | ; file inside diff which exceeds this limit will be displayed partially. |
|
122 | ; file inside diff which exceeds this limit will be displayed partially. | |
123 | ; E.g 128000 == 128Kb |
|
123 | ; E.g 128000 == 128Kb | |
124 | cut_off_limit_file = 256000 |
|
124 | cut_off_limit_file = 256000 | |
125 |
|
125 | |||
126 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` |
|
126 | ; Use cached version of vcs repositories everywhere. Recommended to be `true` | |
127 | vcs_full_cache = false |
|
127 | vcs_full_cache = false | |
128 |
|
128 | |||
129 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. |
|
129 | ; Force https in RhodeCode, fixes https redirects, assumes it's always https. | |
130 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache |
|
130 | ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache | |
131 | force_https = false |
|
131 | force_https = false | |
132 |
|
132 | |||
133 | ; use Strict-Transport-Security headers |
|
133 | ; use Strict-Transport-Security headers | |
134 | use_htsts = false |
|
134 | use_htsts = false | |
135 |
|
135 | |||
136 | ; Set to true if your repos are exposed using the dumb protocol |
|
136 | ; Set to true if your repos are exposed using the dumb protocol | |
137 | git_update_server_info = false |
|
137 | git_update_server_info = false | |
138 |
|
138 | |||
139 | ; RSS/ATOM feed options |
|
139 | ; RSS/ATOM feed options | |
140 | rss_cut_off_limit = 256000 |
|
140 | rss_cut_off_limit = 256000 | |
141 | rss_items_per_page = 10 |
|
141 | rss_items_per_page = 10 | |
142 | rss_include_diff = false |
|
142 | rss_include_diff = false | |
143 |
|
143 | |||
144 | ; gist URL alias, used to create nicer urls for gist. This should be an |
|
144 | ; gist URL alias, used to create nicer urls for gist. This should be an | |
145 | ; url that does rewrites to _admin/gists/{gistid}. |
|
145 | ; url that does rewrites to _admin/gists/{gistid}. | |
146 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
146 | ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal | |
147 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} |
|
147 | ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid} | |
148 | gist_alias_url = |
|
148 | gist_alias_url = | |
149 |
|
149 | |||
150 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be |
|
150 | ; List of views (using glob pattern syntax) that AUTH TOKENS could be | |
151 | ; used for access. |
|
151 | ; used for access. | |
152 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it |
|
152 | ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it | |
153 | ; came from the the logged in user who own this authentication token. |
|
153 | ; came from the the logged in user who own this authentication token. | |
154 | ; Additionally @TOKEN syntax can be used to bound the view to specific |
|
154 | ; Additionally @TOKEN syntax can be used to bound the view to specific | |
155 | ; authentication token. Such view would be only accessible when used together |
|
155 | ; authentication token. Such view would be only accessible when used together | |
156 | ; with this authentication token |
|
156 | ; with this authentication token | |
157 | ; list of all views can be found under `/_admin/permissions/auth_token_access` |
|
157 | ; list of all views can be found under `/_admin/permissions/auth_token_access` | |
158 | ; The list should be "," separated and on a single line. |
|
158 | ; The list should be "," separated and on a single line. | |
159 | ; Most common views to enable: |
|
159 | ; Most common views to enable: | |
160 |
|
160 | |||
161 | # RepoCommitsView:repo_commit_download |
|
161 | # RepoCommitsView:repo_commit_download | |
162 | # RepoCommitsView:repo_commit_patch |
|
162 | # RepoCommitsView:repo_commit_patch | |
163 | # RepoCommitsView:repo_commit_raw |
|
163 | # RepoCommitsView:repo_commit_raw | |
164 | # RepoCommitsView:repo_commit_raw@TOKEN |
|
164 | # RepoCommitsView:repo_commit_raw@TOKEN | |
165 | # RepoFilesView:repo_files_diff |
|
165 | # RepoFilesView:repo_files_diff | |
166 | # RepoFilesView:repo_archivefile |
|
166 | # RepoFilesView:repo_archivefile | |
167 | # RepoFilesView:repo_file_raw |
|
167 | # RepoFilesView:repo_file_raw | |
168 | # GistView:* |
|
168 | # GistView:* | |
169 | api_access_controllers_whitelist = |
|
169 | api_access_controllers_whitelist = | |
170 |
|
170 | |||
171 | ; Default encoding used to convert from and to unicode |
|
171 | ; Default encoding used to convert from and to unicode | |
172 | ; can be also a comma separated list of encoding in case of mixed encodings |
|
172 | ; can be also a comma separated list of encoding in case of mixed encodings | |
173 | default_encoding = UTF-8 |
|
173 | default_encoding = UTF-8 | |
174 |
|
174 | |||
175 | ; instance-id prefix |
|
175 | ; instance-id prefix | |
176 | ; a prefix key for this instance used for cache invalidation when running |
|
176 | ; a prefix key for this instance used for cache invalidation when running | |
177 | ; multiple instances of RhodeCode, make sure it's globally unique for |
|
177 | ; multiple instances of RhodeCode, make sure it's globally unique for | |
178 | ; all running RhodeCode instances. Leave empty if you don't use it |
|
178 | ; all running RhodeCode instances. Leave empty if you don't use it | |
179 | instance_id = |
|
179 | instance_id = | |
180 |
|
180 | |||
181 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
181 | ; Fallback authentication plugin. Set this to a plugin ID to force the usage | |
182 | ; of an authentication plugin also if it is disabled by it's settings. |
|
182 | ; of an authentication plugin also if it is disabled by it's settings. | |
183 | ; This could be useful if you are unable to log in to the system due to broken |
|
183 | ; This could be useful if you are unable to log in to the system due to broken | |
184 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth |
|
184 | ; authentication settings. Then you can enable e.g. the internal RhodeCode auth | |
185 | ; module to log in again and fix the settings. |
|
185 | ; module to log in again and fix the settings. | |
186 | ; Available builtin plugin IDs (hash is part of the ID): |
|
186 | ; Available builtin plugin IDs (hash is part of the ID): | |
187 | ; egg:rhodecode-enterprise-ce#rhodecode |
|
187 | ; egg:rhodecode-enterprise-ce#rhodecode | |
188 | ; egg:rhodecode-enterprise-ce#pam |
|
188 | ; egg:rhodecode-enterprise-ce#pam | |
189 | ; egg:rhodecode-enterprise-ce#ldap |
|
189 | ; egg:rhodecode-enterprise-ce#ldap | |
190 | ; egg:rhodecode-enterprise-ce#jasig_cas |
|
190 | ; egg:rhodecode-enterprise-ce#jasig_cas | |
191 | ; egg:rhodecode-enterprise-ce#headers |
|
191 | ; egg:rhodecode-enterprise-ce#headers | |
192 | ; egg:rhodecode-enterprise-ce#crowd |
|
192 | ; egg:rhodecode-enterprise-ce#crowd | |
193 |
|
193 | |||
194 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
194 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode | |
195 |
|
195 | |||
196 | ; Flag to control loading of legacy plugins in py:/path format |
|
196 | ; Flag to control loading of legacy plugins in py:/path format | |
197 | auth_plugin.import_legacy_plugins = true |
|
197 | auth_plugin.import_legacy_plugins = true | |
198 |
|
198 | |||
199 | ; alternative return HTTP header for failed authentication. Default HTTP |
|
199 | ; alternative return HTTP header for failed authentication. Default HTTP | |
200 | ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
200 | ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
201 | ; handling that causing a series of failed authentication calls. |
|
201 | ; handling that causing a series of failed authentication calls. | |
202 | ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
202 | ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code | |
203 | ; This will be served instead of default 401 on bad authentication |
|
203 | ; This will be served instead of default 401 on bad authentication | |
204 | auth_ret_code = |
|
204 | auth_ret_code = | |
205 |
|
205 | |||
206 | ; use special detection method when serving auth_ret_code, instead of serving |
|
206 | ; use special detection method when serving auth_ret_code, instead of serving | |
207 | ; ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
207 | ; ret_code directly, use 401 initially (Which triggers credentials prompt) | |
208 | ; and then serve auth_ret_code to clients |
|
208 | ; and then serve auth_ret_code to clients | |
209 | auth_ret_code_detection = false |
|
209 | auth_ret_code_detection = false | |
210 |
|
210 | |||
211 | ; locking return code. When repository is locked return this HTTP code. 2XX |
|
211 | ; locking return code. When repository is locked return this HTTP code. 2XX | |
212 | ; codes don't break the transactions while 4XX codes do |
|
212 | ; codes don't break the transactions while 4XX codes do | |
213 | lock_ret_code = 423 |
|
213 | lock_ret_code = 423 | |
214 |
|
214 | |||
215 | ; Filesystem location were repositories should be stored |
|
215 | ; Filesystem location were repositories should be stored | |
216 | repo_store.path = /var/opt/rhodecode_repo_store |
|
216 | repo_store.path = /var/opt/rhodecode_repo_store | |
217 |
|
217 | |||
218 | ; allows to setup custom hooks in settings page |
|
218 | ; allows to setup custom hooks in settings page | |
219 | allow_custom_hooks_settings = true |
|
219 | allow_custom_hooks_settings = true | |
220 |
|
220 | |||
221 | ; Generated license token required for EE edition license. |
|
221 | ; Generated license token required for EE edition license. | |
222 | ; New generated token value can be found in Admin > settings > license page. |
|
222 | ; New generated token value can be found in Admin > settings > license page. | |
223 | license_token = abra-cada-bra1-rce3 |
|
223 | license_token = abra-cada-bra1-rce3 | |
224 |
|
224 | |||
225 | ; This flag hides sensitive information on the license page such as token, and license data |
|
225 | ; This flag hides sensitive information on the license page such as token, and license data | |
226 | license.hide_license_info = false |
|
226 | license.hide_license_info = false | |
227 |
|
227 | |||
228 | ; supervisor connection uri, for managing supervisor and logs. |
|
228 | ; supervisor connection uri, for managing supervisor and logs. | |
229 | supervisor.uri = |
|
229 | supervisor.uri = | |
230 |
|
230 | |||
231 | ; supervisord group name/id we only want this RC instance to handle |
|
231 | ; supervisord group name/id we only want this RC instance to handle | |
232 | supervisor.group_id = dev |
|
232 | supervisor.group_id = dev | |
233 |
|
233 | |||
234 | ; Display extended labs settings |
|
234 | ; Display extended labs settings | |
235 | labs_settings_active = true |
|
235 | labs_settings_active = true | |
236 |
|
236 | |||
237 | ; Custom exception store path, defaults to TMPDIR |
|
237 | ; Custom exception store path, defaults to TMPDIR | |
238 | ; This is used to store exception from RhodeCode in shared directory |
|
238 | ; This is used to store exception from RhodeCode in shared directory | |
239 | #exception_tracker.store_path = |
|
239 | #exception_tracker.store_path = | |
240 |
|
240 | |||
241 | ; Send email with exception details when it happens |
|
241 | ; Send email with exception details when it happens | |
242 | #exception_tracker.send_email = false |
|
242 | #exception_tracker.send_email = false | |
243 |
|
243 | |||
244 | ; Comma separated list of recipients for exception emails, |
|
244 | ; Comma separated list of recipients for exception emails, | |
245 | ; e.g admin@rhodecode.com,devops@rhodecode.com |
|
245 | ; e.g admin@rhodecode.com,devops@rhodecode.com | |
246 | ; Can be left empty, then emails will be sent to ALL super-admins |
|
246 | ; Can be left empty, then emails will be sent to ALL super-admins | |
247 | #exception_tracker.send_email_recipients = |
|
247 | #exception_tracker.send_email_recipients = | |
248 |
|
248 | |||
249 | ; optional prefix to Add to email Subject |
|
249 | ; optional prefix to Add to email Subject | |
250 | #exception_tracker.email_prefix = [RHODECODE ERROR] |
|
250 | #exception_tracker.email_prefix = [RHODECODE ERROR] | |
251 |
|
251 | |||
252 | ; File store configuration. This is used to store and serve uploaded files |
|
252 | ; File store configuration. This is used to store and serve uploaded files | |
253 | file_store.enabled = true |
|
253 | file_store.enabled = true | |
254 |
|
254 | |||
255 | ; Storage backend, available options are: local |
|
255 | ; Storage backend, available options are: local | |
256 | file_store.backend = local |
|
256 | file_store.backend = local | |
257 |
|
257 | |||
258 | ; path to store the uploaded binaries and artifacts |
|
258 | ; path to store the uploaded binaries and artifacts | |
259 | file_store.storage_path = /var/opt/rhodecode_data/file_store |
|
259 | file_store.storage_path = /var/opt/rhodecode_data/file_store | |
260 |
|
260 | |||
261 |
|
261 | |||
262 | ; Redis url to acquire/check generation of archives locks |
|
262 | ; Redis url to acquire/check generation of archives locks | |
263 | archive_cache.locking.url = redis://redis:6379/1 |
|
263 | archive_cache.locking.url = redis://redis:6379/1 | |
264 |
|
264 | |||
265 | ; Storage backend, only 'filesystem' and 'objectstore' are available now |
|
265 | ; Storage backend, only 'filesystem' and 'objectstore' are available now | |
266 | archive_cache.backend.type = filesystem |
|
266 | archive_cache.backend.type = filesystem | |
267 |
|
267 | |||
268 | ; url for s3 compatible storage that allows to upload artifacts |
|
268 | ; url for s3 compatible storage that allows to upload artifacts | |
269 | ; e.g http://minio:9000 |
|
269 | ; e.g http://minio:9000 | |
270 | archive_cache.objectstore.url = http://s3-minio:9000 |
|
270 | archive_cache.objectstore.url = http://s3-minio:9000 | |
271 |
|
271 | |||
272 | ; key for s3 auth |
|
272 | ; key for s3 auth | |
273 | archive_cache.objectstore.key = key |
|
273 | archive_cache.objectstore.key = key | |
274 |
|
274 | |||
275 | ; secret for s3 auth |
|
275 | ; secret for s3 auth | |
276 | archive_cache.objectstore.secret = secret |
|
276 | archive_cache.objectstore.secret = secret | |
277 |
|
277 | |||
|
278 | ;region for s3 storage | |||
|
279 | archive_cache.objectstore.region = eu-central-1 | |||
|
280 | ||||
278 | ; number of sharded buckets to create to distribute archives across |
|
281 | ; number of sharded buckets to create to distribute archives across | |
279 | ; default is 8 shards |
|
282 | ; default is 8 shards | |
280 | archive_cache.objectstore.bucket_shards = 8 |
|
283 | archive_cache.objectstore.bucket_shards = 8 | |
281 |
|
284 | |||
282 | ; a top-level bucket to put all other shards in |
|
285 | ; a top-level bucket to put all other shards in | |
283 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number |
|
286 | ; objects will be stored in rhodecode-archive-cache/shard-N based on the bucket_shards number | |
284 | archive_cache.objectstore.bucket = rhodecode-archive-cache |
|
287 | archive_cache.objectstore.bucket = rhodecode-archive-cache | |
285 |
|
288 | |||
286 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
289 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
287 | archive_cache.objectstore.retry = false |
|
290 | archive_cache.objectstore.retry = false | |
288 |
|
291 | |||
289 | ; number of seconds to wait for next try using retry |
|
292 | ; number of seconds to wait for next try using retry | |
290 | archive_cache.objectstore.retry_backoff = 1 |
|
293 | archive_cache.objectstore.retry_backoff = 1 | |
291 |
|
294 | |||
292 | ; how many tries do do a retry fetch from this backend |
|
295 | ; how many tries do do a retry fetch from this backend | |
293 | archive_cache.objectstore.retry_attempts = 10 |
|
296 | archive_cache.objectstore.retry_attempts = 10 | |
294 |
|
297 | |||
295 | ; Default is $cache_dir/archive_cache if not set |
|
298 | ; Default is $cache_dir/archive_cache if not set | |
296 | ; Generated repo archives will be cached at this location |
|
299 | ; Generated repo archives will be cached at this location | |
297 | ; and served from the cache during subsequent requests for the same archive of |
|
300 | ; and served from the cache during subsequent requests for the same archive of | |
298 | ; the repository. This path is important to be shared across filesystems and with |
|
301 | ; the repository. This path is important to be shared across filesystems and with | |
299 | ; RhodeCode and vcsserver |
|
302 | ; RhodeCode and vcsserver | |
300 | archive_cache.filesystem.store_dir = %(here)s/rc-tests/archive_cache |
|
303 | archive_cache.filesystem.store_dir = %(here)s/rc-tests/archive_cache | |
301 |
|
304 | |||
302 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb |
|
305 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb | |
303 | archive_cache.filesystem.cache_size_gb = 2 |
|
306 | archive_cache.filesystem.cache_size_gb = 2 | |
304 |
|
307 | |||
305 | ; Eviction policy used to clear out after cache_size_gb limit is reached |
|
308 | ; Eviction policy used to clear out after cache_size_gb limit is reached | |
306 | archive_cache.filesystem.eviction_policy = least-recently-stored |
|
309 | archive_cache.filesystem.eviction_policy = least-recently-stored | |
307 |
|
310 | |||
308 | ; By default cache uses sharding technique, this specifies how many shards are there |
|
311 | ; By default cache uses sharding technique, this specifies how many shards are there | |
309 | ; default is 8 shards |
|
312 | ; default is 8 shards | |
310 | archive_cache.filesystem.cache_shards = 8 |
|
313 | archive_cache.filesystem.cache_shards = 8 | |
311 |
|
314 | |||
312 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time |
|
315 | ; if true, this cache will try to retry with retry_attempts=N times waiting retry_backoff time | |
313 | archive_cache.filesystem.retry = false |
|
316 | archive_cache.filesystem.retry = false | |
314 |
|
317 | |||
315 | ; number of seconds to wait for next try using retry |
|
318 | ; number of seconds to wait for next try using retry | |
316 | archive_cache.filesystem.retry_backoff = 1 |
|
319 | archive_cache.filesystem.retry_backoff = 1 | |
317 |
|
320 | |||
318 | ; how many tries do do a retry fetch from this backend |
|
321 | ; how many tries do do a retry fetch from this backend | |
319 | archive_cache.filesystem.retry_attempts = 10 |
|
322 | archive_cache.filesystem.retry_attempts = 10 | |
320 |
|
323 | |||
321 |
|
324 | |||
322 | ; ############# |
|
325 | ; ############# | |
323 | ; CELERY CONFIG |
|
326 | ; CELERY CONFIG | |
324 | ; ############# |
|
327 | ; ############# | |
325 |
|
328 | |||
326 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini |
|
329 | ; manually run celery: /path/to/celery worker --task-events --beat --app rhodecode.lib.celerylib.loader --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler --loglevel DEBUG --ini /path/to/rhodecode.ini | |
327 |
|
330 | |||
328 | use_celery = false |
|
331 | use_celery = false | |
329 |
|
332 | |||
330 | ; path to store schedule database |
|
333 | ; path to store schedule database | |
331 | #celerybeat-schedule.path = |
|
334 | #celerybeat-schedule.path = | |
332 |
|
335 | |||
333 | ; connection url to the message broker (default redis) |
|
336 | ; connection url to the message broker (default redis) | |
334 | celery.broker_url = redis://redis:6379/8 |
|
337 | celery.broker_url = redis://redis:6379/8 | |
335 |
|
338 | |||
336 | ; results backend to get results for (default redis) |
|
339 | ; results backend to get results for (default redis) | |
337 | celery.result_backend = redis://redis:6379/8 |
|
340 | celery.result_backend = redis://redis:6379/8 | |
338 |
|
341 | |||
339 | ; rabbitmq example |
|
342 | ; rabbitmq example | |
340 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost |
|
343 | #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost | |
341 |
|
344 | |||
342 | ; maximum tasks to execute before worker restart |
|
345 | ; maximum tasks to execute before worker restart | |
343 | celery.max_tasks_per_child = 20 |
|
346 | celery.max_tasks_per_child = 20 | |
344 |
|
347 | |||
345 | ; tasks will never be sent to the queue, but executed locally instead. |
|
348 | ; tasks will never be sent to the queue, but executed locally instead. | |
346 | celery.task_always_eager = true |
|
349 | celery.task_always_eager = true | |
347 | celery.task_store_eager_result = true |
|
350 | celery.task_store_eager_result = true | |
348 |
|
351 | |||
349 | ; ############# |
|
352 | ; ############# | |
350 | ; DOGPILE CACHE |
|
353 | ; DOGPILE CACHE | |
351 | ; ############# |
|
354 | ; ############# | |
352 |
|
355 | |||
353 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. |
|
356 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. | |
354 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space |
|
357 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space | |
355 | cache_dir = %(here)s/rc-test-data |
|
358 | cache_dir = %(here)s/rc-test-data | |
356 |
|
359 | |||
357 | ; ********************************************* |
|
360 | ; ********************************************* | |
358 | ; `sql_cache_short` cache for heavy SQL queries |
|
361 | ; `sql_cache_short` cache for heavy SQL queries | |
359 | ; Only supported backend is `memory_lru` |
|
362 | ; Only supported backend is `memory_lru` | |
360 | ; ********************************************* |
|
363 | ; ********************************************* | |
361 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru |
|
364 | rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru | |
362 | rc_cache.sql_cache_short.expiration_time = 0 |
|
365 | rc_cache.sql_cache_short.expiration_time = 0 | |
363 |
|
366 | |||
364 |
|
367 | |||
365 | ; ***************************************************** |
|
368 | ; ***************************************************** | |
366 | ; `cache_repo_longterm` cache for repo object instances |
|
369 | ; `cache_repo_longterm` cache for repo object instances | |
367 | ; Only supported backend is `memory_lru` |
|
370 | ; Only supported backend is `memory_lru` | |
368 | ; ***************************************************** |
|
371 | ; ***************************************************** | |
369 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru |
|
372 | rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru | |
370 | ; by default we use 30 Days, cache is still invalidated on push |
|
373 | ; by default we use 30 Days, cache is still invalidated on push | |
371 | rc_cache.cache_repo_longterm.expiration_time = 2592000 |
|
374 | rc_cache.cache_repo_longterm.expiration_time = 2592000 | |
372 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches |
|
375 | ; max items in LRU cache, set to smaller number to save memory, and expire last used caches | |
373 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
376 | rc_cache.cache_repo_longterm.max_size = 10000 | |
374 |
|
377 | |||
375 |
|
378 | |||
376 | ; ********************************************* |
|
379 | ; ********************************************* | |
377 | ; `cache_general` cache for general purpose use |
|
380 | ; `cache_general` cache for general purpose use | |
378 | ; for simplicity use rc.file_namespace backend, |
|
381 | ; for simplicity use rc.file_namespace backend, | |
379 | ; for performance and scale use rc.redis |
|
382 | ; for performance and scale use rc.redis | |
380 | ; ********************************************* |
|
383 | ; ********************************************* | |
381 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace |
|
384 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace | |
382 | rc_cache.cache_general.expiration_time = 43200 |
|
385 | rc_cache.cache_general.expiration_time = 43200 | |
383 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
386 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
384 | rc_cache.cache_general.arguments.filename = %(here)s/rc-tests/cache-backend/cache_general_db |
|
387 | rc_cache.cache_general.arguments.filename = %(here)s/rc-tests/cache-backend/cache_general_db | |
385 |
|
388 | |||
386 | ; alternative `cache_general` redis backend with distributed lock |
|
389 | ; alternative `cache_general` redis backend with distributed lock | |
387 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis |
|
390 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis | |
388 | #rc_cache.cache_general.expiration_time = 300 |
|
391 | #rc_cache.cache_general.expiration_time = 300 | |
389 |
|
392 | |||
390 | ; redis_expiration_time needs to be greater then expiration_time |
|
393 | ; redis_expiration_time needs to be greater then expiration_time | |
391 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 |
|
394 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 | |
392 |
|
395 | |||
393 | #rc_cache.cache_general.arguments.host = localhost |
|
396 | #rc_cache.cache_general.arguments.host = localhost | |
394 | #rc_cache.cache_general.arguments.port = 6379 |
|
397 | #rc_cache.cache_general.arguments.port = 6379 | |
395 | #rc_cache.cache_general.arguments.db = 0 |
|
398 | #rc_cache.cache_general.arguments.db = 0 | |
396 | #rc_cache.cache_general.arguments.socket_timeout = 30 |
|
399 | #rc_cache.cache_general.arguments.socket_timeout = 30 | |
397 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
400 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
398 | #rc_cache.cache_general.arguments.distributed_lock = true |
|
401 | #rc_cache.cache_general.arguments.distributed_lock = true | |
399 |
|
402 | |||
400 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
403 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
401 | #rc_cache.cache_general.arguments.lock_auto_renewal = true |
|
404 | #rc_cache.cache_general.arguments.lock_auto_renewal = true | |
402 |
|
405 | |||
403 | ; ************************************************* |
|
406 | ; ************************************************* | |
404 | ; `cache_perms` cache for permission tree, auth TTL |
|
407 | ; `cache_perms` cache for permission tree, auth TTL | |
405 | ; for simplicity use rc.file_namespace backend, |
|
408 | ; for simplicity use rc.file_namespace backend, | |
406 | ; for performance and scale use rc.redis |
|
409 | ; for performance and scale use rc.redis | |
407 | ; ************************************************* |
|
410 | ; ************************************************* | |
408 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
411 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace | |
409 | rc_cache.cache_perms.expiration_time = 0 |
|
412 | rc_cache.cache_perms.expiration_time = 0 | |
410 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
413 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
411 | rc_cache.cache_perms.arguments.filename = %(here)s/rc-tests/cache-backend/cache_perms_db |
|
414 | rc_cache.cache_perms.arguments.filename = %(here)s/rc-tests/cache-backend/cache_perms_db | |
412 |
|
415 | |||
413 | ; alternative `cache_perms` redis backend with distributed lock |
|
416 | ; alternative `cache_perms` redis backend with distributed lock | |
414 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis |
|
417 | #rc_cache.cache_perms.backend = dogpile.cache.rc.redis | |
415 | #rc_cache.cache_perms.expiration_time = 300 |
|
418 | #rc_cache.cache_perms.expiration_time = 300 | |
416 |
|
419 | |||
417 | ; redis_expiration_time needs to be greater then expiration_time |
|
420 | ; redis_expiration_time needs to be greater then expiration_time | |
418 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 |
|
421 | #rc_cache.cache_perms.arguments.redis_expiration_time = 7200 | |
419 |
|
422 | |||
420 | #rc_cache.cache_perms.arguments.host = localhost |
|
423 | #rc_cache.cache_perms.arguments.host = localhost | |
421 | #rc_cache.cache_perms.arguments.port = 6379 |
|
424 | #rc_cache.cache_perms.arguments.port = 6379 | |
422 | #rc_cache.cache_perms.arguments.db = 0 |
|
425 | #rc_cache.cache_perms.arguments.db = 0 | |
423 | #rc_cache.cache_perms.arguments.socket_timeout = 30 |
|
426 | #rc_cache.cache_perms.arguments.socket_timeout = 30 | |
424 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
427 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
425 | #rc_cache.cache_perms.arguments.distributed_lock = true |
|
428 | #rc_cache.cache_perms.arguments.distributed_lock = true | |
426 |
|
429 | |||
427 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
430 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
428 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true |
|
431 | #rc_cache.cache_perms.arguments.lock_auto_renewal = true | |
429 |
|
432 | |||
430 | ; *************************************************** |
|
433 | ; *************************************************** | |
431 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS |
|
434 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS | |
432 | ; for simplicity use rc.file_namespace backend, |
|
435 | ; for simplicity use rc.file_namespace backend, | |
433 | ; for performance and scale use rc.redis |
|
436 | ; for performance and scale use rc.redis | |
434 | ; *************************************************** |
|
437 | ; *************************************************** | |
435 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
438 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace | |
436 | rc_cache.cache_repo.expiration_time = 2592000 |
|
439 | rc_cache.cache_repo.expiration_time = 2592000 | |
437 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
440 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
438 | rc_cache.cache_repo.arguments.filename = %(here)s/rc-tests/cache-backend/cache_repo_db |
|
441 | rc_cache.cache_repo.arguments.filename = %(here)s/rc-tests/cache-backend/cache_repo_db | |
439 |
|
442 | |||
440 | ; alternative `cache_repo` redis backend with distributed lock |
|
443 | ; alternative `cache_repo` redis backend with distributed lock | |
441 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis |
|
444 | #rc_cache.cache_repo.backend = dogpile.cache.rc.redis | |
442 | #rc_cache.cache_repo.expiration_time = 2592000 |
|
445 | #rc_cache.cache_repo.expiration_time = 2592000 | |
443 |
|
446 | |||
444 | ; redis_expiration_time needs to be greater then expiration_time |
|
447 | ; redis_expiration_time needs to be greater then expiration_time | |
445 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 |
|
448 | #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400 | |
446 |
|
449 | |||
447 | #rc_cache.cache_repo.arguments.host = localhost |
|
450 | #rc_cache.cache_repo.arguments.host = localhost | |
448 | #rc_cache.cache_repo.arguments.port = 6379 |
|
451 | #rc_cache.cache_repo.arguments.port = 6379 | |
449 | #rc_cache.cache_repo.arguments.db = 1 |
|
452 | #rc_cache.cache_repo.arguments.db = 1 | |
450 | #rc_cache.cache_repo.arguments.socket_timeout = 30 |
|
453 | #rc_cache.cache_repo.arguments.socket_timeout = 30 | |
451 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
454 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
452 | #rc_cache.cache_repo.arguments.distributed_lock = true |
|
455 | #rc_cache.cache_repo.arguments.distributed_lock = true | |
453 |
|
456 | |||
454 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
457 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
455 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true |
|
458 | #rc_cache.cache_repo.arguments.lock_auto_renewal = true | |
456 |
|
459 | |||
457 | ; ############## |
|
460 | ; ############## | |
458 | ; BEAKER SESSION |
|
461 | ; BEAKER SESSION | |
459 | ; ############## |
|
462 | ; ############## | |
460 |
|
463 | |||
461 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed |
|
464 | ; beaker.session.type is type of storage options for the logged users sessions. Current allowed | |
462 | ; types are file, ext:redis, ext:database, ext:memcached |
|
465 | ; types are file, ext:redis, ext:database, ext:memcached | |
463 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session |
|
466 | ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session | |
464 | beaker.session.type = file |
|
467 | beaker.session.type = file | |
465 | beaker.session.data_dir = %(here)s/rc-tests/data/sessions |
|
468 | beaker.session.data_dir = %(here)s/rc-tests/data/sessions | |
466 |
|
469 | |||
467 | ; Redis based sessions |
|
470 | ; Redis based sessions | |
468 | #beaker.session.type = ext:redis |
|
471 | #beaker.session.type = ext:redis | |
469 | #beaker.session.url = redis://redis:6379/2 |
|
472 | #beaker.session.url = redis://redis:6379/2 | |
470 |
|
473 | |||
471 | ; DB based session, fast, and allows easy management over logged in users |
|
474 | ; DB based session, fast, and allows easy management over logged in users | |
472 | #beaker.session.type = ext:database |
|
475 | #beaker.session.type = ext:database | |
473 | #beaker.session.table_name = db_session |
|
476 | #beaker.session.table_name = db_session | |
474 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
477 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode | |
475 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
478 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode | |
476 | #beaker.session.sa.pool_recycle = 3600 |
|
479 | #beaker.session.sa.pool_recycle = 3600 | |
477 | #beaker.session.sa.echo = false |
|
480 | #beaker.session.sa.echo = false | |
478 |
|
481 | |||
479 | beaker.session.key = rhodecode |
|
482 | beaker.session.key = rhodecode | |
480 | beaker.session.secret = test-rc-uytcxaz |
|
483 | beaker.session.secret = test-rc-uytcxaz | |
481 | beaker.session.lock_dir = %(here)s/rc-tests/data/sessions/lock |
|
484 | beaker.session.lock_dir = %(here)s/rc-tests/data/sessions/lock | |
482 |
|
485 | |||
483 | ; Secure encrypted cookie. Requires AES and AES python libraries |
|
486 | ; Secure encrypted cookie. Requires AES and AES python libraries | |
484 | ; you must disable beaker.session.secret to use this |
|
487 | ; you must disable beaker.session.secret to use this | |
485 | #beaker.session.encrypt_key = key_for_encryption |
|
488 | #beaker.session.encrypt_key = key_for_encryption | |
486 | #beaker.session.validate_key = validation_key |
|
489 | #beaker.session.validate_key = validation_key | |
487 |
|
490 | |||
488 | ; Sets session as invalid (also logging out user) if it haven not been |
|
491 | ; Sets session as invalid (also logging out user) if it haven not been | |
489 | ; accessed for given amount of time in seconds |
|
492 | ; accessed for given amount of time in seconds | |
490 | beaker.session.timeout = 2592000 |
|
493 | beaker.session.timeout = 2592000 | |
491 | beaker.session.httponly = true |
|
494 | beaker.session.httponly = true | |
492 |
|
495 | |||
493 | ; Path to use for the cookie. Set to prefix if you use prefix middleware |
|
496 | ; Path to use for the cookie. Set to prefix if you use prefix middleware | |
494 | #beaker.session.cookie_path = /custom_prefix |
|
497 | #beaker.session.cookie_path = /custom_prefix | |
495 |
|
498 | |||
496 | ; Set https secure cookie |
|
499 | ; Set https secure cookie | |
497 | beaker.session.secure = false |
|
500 | beaker.session.secure = false | |
498 |
|
501 | |||
499 | ; default cookie expiration time in seconds, set to `true` to set expire |
|
502 | ; default cookie expiration time in seconds, set to `true` to set expire | |
500 | ; at browser close |
|
503 | ; at browser close | |
501 | #beaker.session.cookie_expires = 3600 |
|
504 | #beaker.session.cookie_expires = 3600 | |
502 |
|
505 | |||
503 | ; ############################# |
|
506 | ; ############################# | |
504 | ; SEARCH INDEXING CONFIGURATION |
|
507 | ; SEARCH INDEXING CONFIGURATION | |
505 | ; ############################# |
|
508 | ; ############################# | |
506 |
|
509 | |||
507 | ; Full text search indexer is available in rhodecode-tools under |
|
510 | ; Full text search indexer is available in rhodecode-tools under | |
508 | ; `rhodecode-tools index` command |
|
511 | ; `rhodecode-tools index` command | |
509 |
|
512 | |||
510 | ; WHOOSH Backend, doesn't require additional services to run |
|
513 | ; WHOOSH Backend, doesn't require additional services to run | |
511 | ; it works good with few dozen repos |
|
514 | ; it works good with few dozen repos | |
512 | search.module = rhodecode.lib.index.whoosh |
|
515 | search.module = rhodecode.lib.index.whoosh | |
513 | search.location = %(here)s/rc-tests/data/index |
|
516 | search.location = %(here)s/rc-tests/data/index | |
514 |
|
517 | |||
515 | ; #################### |
|
518 | ; #################### | |
516 | ; CHANNELSTREAM CONFIG |
|
519 | ; CHANNELSTREAM CONFIG | |
517 | ; #################### |
|
520 | ; #################### | |
518 |
|
521 | |||
519 | ; channelstream enables persistent connections and live notification |
|
522 | ; channelstream enables persistent connections and live notification | |
520 | ; in the system. It's also used by the chat system |
|
523 | ; in the system. It's also used by the chat system | |
521 |
|
524 | |||
522 | channelstream.enabled = false |
|
525 | channelstream.enabled = false | |
523 |
|
526 | |||
524 | ; server address for channelstream server on the backend |
|
527 | ; server address for channelstream server on the backend | |
525 | channelstream.server = channelstream:9800 |
|
528 | channelstream.server = channelstream:9800 | |
526 |
|
529 | |||
527 | ; location of the channelstream server from outside world |
|
530 | ; location of the channelstream server from outside world | |
528 | ; use ws:// for http or wss:// for https. This address needs to be handled |
|
531 | ; use ws:// for http or wss:// for https. This address needs to be handled | |
529 | ; by external HTTP server such as Nginx or Apache |
|
532 | ; by external HTTP server such as Nginx or Apache | |
530 | ; see Nginx/Apache configuration examples in our docs |
|
533 | ; see Nginx/Apache configuration examples in our docs | |
531 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream |
|
534 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
532 | channelstream.secret = ENV_GENERATED |
|
535 | channelstream.secret = ENV_GENERATED | |
533 | channelstream.history.location = %(here)s/rc-tests/channelstream_history |
|
536 | channelstream.history.location = %(here)s/rc-tests/channelstream_history | |
534 |
|
537 | |||
535 | ; Internal application path that Javascript uses to connect into. |
|
538 | ; Internal application path that Javascript uses to connect into. | |
536 | ; If you use proxy-prefix the prefix should be added before /_channelstream |
|
539 | ; If you use proxy-prefix the prefix should be added before /_channelstream | |
537 | channelstream.proxy_path = /_channelstream |
|
540 | channelstream.proxy_path = /_channelstream | |
538 |
|
541 | |||
539 |
|
542 | |||
540 | ; ############################## |
|
543 | ; ############################## | |
541 | ; MAIN RHODECODE DATABASE CONFIG |
|
544 | ; MAIN RHODECODE DATABASE CONFIG | |
542 | ; ############################## |
|
545 | ; ############################## | |
543 |
|
546 | |||
544 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
547 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
545 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
548 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
546 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 |
|
549 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8 | |
547 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one |
|
550 | ; pymysql is an alternative driver for MySQL, use in case of problems with default one | |
548 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode |
|
551 | #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode | |
549 |
|
552 | |||
550 | sqlalchemy.db1.url = sqlite:///%(here)s/rc-tests/rhodecode_test.db?timeout=30 |
|
553 | sqlalchemy.db1.url = sqlite:///%(here)s/rc-tests/rhodecode_test.db?timeout=30 | |
551 |
|
554 | |||
552 | ; see sqlalchemy docs for other advanced settings |
|
555 | ; see sqlalchemy docs for other advanced settings | |
553 | ; print the sql statements to output |
|
556 | ; print the sql statements to output | |
554 | sqlalchemy.db1.echo = false |
|
557 | sqlalchemy.db1.echo = false | |
555 |
|
558 | |||
556 | ; recycle the connections after this amount of seconds |
|
559 | ; recycle the connections after this amount of seconds | |
557 | sqlalchemy.db1.pool_recycle = 3600 |
|
560 | sqlalchemy.db1.pool_recycle = 3600 | |
558 |
|
561 | |||
559 | ; the number of connections to keep open inside the connection pool. |
|
562 | ; the number of connections to keep open inside the connection pool. | |
560 | ; 0 indicates no limit |
|
563 | ; 0 indicates no limit | |
561 | ; the general calculus with gevent is: |
|
564 | ; the general calculus with gevent is: | |
562 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, |
|
565 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, | |
563 | ; then increase pool size + max overflow so that they add up to 500. |
|
566 | ; then increase pool size + max overflow so that they add up to 500. | |
564 | #sqlalchemy.db1.pool_size = 5 |
|
567 | #sqlalchemy.db1.pool_size = 5 | |
565 |
|
568 | |||
566 | ; The number of connections to allow in connection pool "overflow", that is |
|
569 | ; The number of connections to allow in connection pool "overflow", that is | |
567 | ; connections that can be opened above and beyond the pool_size setting, |
|
570 | ; connections that can be opened above and beyond the pool_size setting, | |
568 | ; which defaults to five. |
|
571 | ; which defaults to five. | |
569 | #sqlalchemy.db1.max_overflow = 10 |
|
572 | #sqlalchemy.db1.max_overflow = 10 | |
570 |
|
573 | |||
571 | ; Connection check ping, used to detect broken database connections |
|
574 | ; Connection check ping, used to detect broken database connections | |
572 | ; could be enabled to better handle cases if MySQL has gone away errors |
|
575 | ; could be enabled to better handle cases if MySQL has gone away errors | |
573 | #sqlalchemy.db1.ping_connection = true |
|
576 | #sqlalchemy.db1.ping_connection = true | |
574 |
|
577 | |||
575 | ; ########## |
|
578 | ; ########## | |
576 | ; VCS CONFIG |
|
579 | ; VCS CONFIG | |
577 | ; ########## |
|
580 | ; ########## | |
578 | vcs.server.enable = true |
|
581 | vcs.server.enable = true | |
579 | vcs.server = vcsserver:10010 |
|
582 | vcs.server = vcsserver:10010 | |
580 |
|
583 | |||
581 | ; Web server connectivity protocol, responsible for web based VCS operations |
|
584 | ; Web server connectivity protocol, responsible for web based VCS operations | |
582 | ; Available protocols are: |
|
585 | ; Available protocols are: | |
583 | ; `http` - use http-rpc backend (default) |
|
586 | ; `http` - use http-rpc backend (default) | |
584 | vcs.server.protocol = http |
|
587 | vcs.server.protocol = http | |
585 |
|
588 | |||
586 | ; Push/Pull operations protocol, available options are: |
|
589 | ; Push/Pull operations protocol, available options are: | |
587 | ; `http` - use http-rpc backend (default) |
|
590 | ; `http` - use http-rpc backend (default) | |
588 | vcs.scm_app_implementation = http |
|
591 | vcs.scm_app_implementation = http | |
589 |
|
592 | |||
590 | ; Push/Pull operations hooks protocol, available options are: |
|
593 | ; Push/Pull operations hooks protocol, available options are: | |
591 | ; `http` - use http-rpc backend (default) |
|
594 | ; `http` - use http-rpc backend (default) | |
592 | ; `celery` - use celery based hooks |
|
595 | ; `celery` - use celery based hooks | |
593 | vcs.hooks.protocol = http |
|
596 | vcs.hooks.protocol = http | |
594 |
|
597 | |||
595 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be |
|
598 | ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be | |
596 | ; accessible via network. |
|
599 | ; accessible via network. | |
597 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) |
|
600 | ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker) | |
598 | vcs.hooks.host = * |
|
601 | vcs.hooks.host = * | |
599 |
|
602 | |||
600 | ; Start VCSServer with this instance as a subprocess, useful for development |
|
603 | ; Start VCSServer with this instance as a subprocess, useful for development | |
601 | vcs.start_server = false |
|
604 | vcs.start_server = false | |
602 |
|
605 | |||
603 | ; List of enabled VCS backends, available options are: |
|
606 | ; List of enabled VCS backends, available options are: | |
604 | ; `hg` - mercurial |
|
607 | ; `hg` - mercurial | |
605 | ; `git` - git |
|
608 | ; `git` - git | |
606 | ; `svn` - subversion |
|
609 | ; `svn` - subversion | |
607 | vcs.backends = hg, git, svn |
|
610 | vcs.backends = hg, git, svn | |
608 |
|
611 | |||
609 | ; Wait this number of seconds before killing connection to the vcsserver |
|
612 | ; Wait this number of seconds before killing connection to the vcsserver | |
610 | vcs.connection_timeout = 3600 |
|
613 | vcs.connection_timeout = 3600 | |
611 |
|
614 | |||
612 | ; Cache flag to cache vcsserver remote calls locally |
|
615 | ; Cache flag to cache vcsserver remote calls locally | |
613 | ; It uses cache_region `cache_repo` |
|
616 | ; It uses cache_region `cache_repo` | |
614 | vcs.methods.cache = false |
|
617 | vcs.methods.cache = false | |
615 |
|
618 | |||
616 | ; #################################################### |
|
619 | ; #################################################### | |
617 | ; Subversion proxy support (mod_dav_svn) |
|
620 | ; Subversion proxy support (mod_dav_svn) | |
618 | ; Maps RhodeCode repo groups into SVN paths for Apache |
|
621 | ; Maps RhodeCode repo groups into SVN paths for Apache | |
619 | ; #################################################### |
|
622 | ; #################################################### | |
620 |
|
623 | |||
621 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
624 | ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out. | |
622 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 |
|
625 | ; Set a numeric version for your current SVN e.g 1.8, or 1.12 | |
623 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible |
|
626 | ; Legacy available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible, pre-1.9-compatible | |
624 | #vcs.svn.compatible_version = 1.8 |
|
627 | #vcs.svn.compatible_version = 1.8 | |
625 |
|
628 | |||
626 | ; Enable SVN proxy of requests over HTTP |
|
629 | ; Enable SVN proxy of requests over HTTP | |
627 | vcs.svn.proxy.enabled = true |
|
630 | vcs.svn.proxy.enabled = true | |
628 |
|
631 | |||
629 | ; host to connect to running SVN subsystem |
|
632 | ; host to connect to running SVN subsystem | |
630 | vcs.svn.proxy.host = http://svn:8090 |
|
633 | vcs.svn.proxy.host = http://svn:8090 | |
631 |
|
634 | |||
632 | ; Enable or disable the config file generation. |
|
635 | ; Enable or disable the config file generation. | |
633 | svn.proxy.generate_config = false |
|
636 | svn.proxy.generate_config = false | |
634 |
|
637 | |||
635 | ; Generate config file with `SVNListParentPath` set to `On`. |
|
638 | ; Generate config file with `SVNListParentPath` set to `On`. | |
636 | svn.proxy.list_parent_path = true |
|
639 | svn.proxy.list_parent_path = true | |
637 |
|
640 | |||
638 | ; Set location and file name of generated config file. |
|
641 | ; Set location and file name of generated config file. | |
639 | svn.proxy.config_file_path = %(here)s/rc-tests/mod_dav_svn.conf |
|
642 | svn.proxy.config_file_path = %(here)s/rc-tests/mod_dav_svn.conf | |
640 |
|
643 | |||
641 | ; alternative mod_dav config template. This needs to be a valid mako template |
|
644 | ; alternative mod_dav config template. This needs to be a valid mako template | |
642 | ; Example template can be found in the source code: |
|
645 | ; Example template can be found in the source code: | |
643 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako |
|
646 | ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako | |
644 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako |
|
647 | #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako | |
645 |
|
648 | |||
646 | ; Used as a prefix to the `Location` block in the generated config file. |
|
649 | ; Used as a prefix to the `Location` block in the generated config file. | |
647 | ; In most cases it should be set to `/`. |
|
650 | ; In most cases it should be set to `/`. | |
648 | svn.proxy.location_root = / |
|
651 | svn.proxy.location_root = / | |
649 |
|
652 | |||
650 | ; Command to reload the mod dav svn configuration on change. |
|
653 | ; Command to reload the mod dav svn configuration on change. | |
651 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh |
|
654 | ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh | |
652 | ; Make sure user who runs RhodeCode process is allowed to reload Apache |
|
655 | ; Make sure user who runs RhodeCode process is allowed to reload Apache | |
653 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
656 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
654 |
|
657 | |||
655 | ; If the timeout expires before the reload command finishes, the command will |
|
658 | ; If the timeout expires before the reload command finishes, the command will | |
656 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. |
|
659 | ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
657 | #svn.proxy.reload_timeout = 10 |
|
660 | #svn.proxy.reload_timeout = 10 | |
658 |
|
661 | |||
659 | ; #################### |
|
662 | ; #################### | |
660 | ; SSH Support Settings |
|
663 | ; SSH Support Settings | |
661 | ; #################### |
|
664 | ; #################### | |
662 |
|
665 | |||
663 | ; Defines if a custom authorized_keys file should be created and written on |
|
666 | ; Defines if a custom authorized_keys file should be created and written on | |
664 | ; any change user ssh keys. Setting this to false also disables possibility |
|
667 | ; any change user ssh keys. Setting this to false also disables possibility | |
665 | ; of adding SSH keys by users from web interface. Super admins can still |
|
668 | ; of adding SSH keys by users from web interface. Super admins can still | |
666 | ; manage SSH Keys. |
|
669 | ; manage SSH Keys. | |
667 | ssh.generate_authorized_keyfile = true |
|
670 | ssh.generate_authorized_keyfile = true | |
668 |
|
671 | |||
669 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` |
|
672 | ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding` | |
670 | # ssh.authorized_keys_ssh_opts = |
|
673 | # ssh.authorized_keys_ssh_opts = | |
671 |
|
674 | |||
672 | ; Path to the authorized_keys file where the generate entries are placed. |
|
675 | ; Path to the authorized_keys file where the generate entries are placed. | |
673 | ; It is possible to have multiple key files specified in `sshd_config` e.g. |
|
676 | ; It is possible to have multiple key files specified in `sshd_config` e.g. | |
674 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode |
|
677 | ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode | |
675 | ssh.authorized_keys_file_path = %(here)s/rc-tests/authorized_keys_rhodecode |
|
678 | ssh.authorized_keys_file_path = %(here)s/rc-tests/authorized_keys_rhodecode | |
676 |
|
679 | |||
677 | ; Command to execute the SSH wrapper. The binary is available in the |
|
680 | ; Command to execute the SSH wrapper. The binary is available in the | |
678 | ; RhodeCode installation directory. |
|
681 | ; RhodeCode installation directory. | |
679 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
682 | ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
680 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 |
|
683 | ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2 | |
681 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper |
|
684 | ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper | |
682 |
|
685 | |||
683 | ; Allow shell when executing the ssh-wrapper command |
|
686 | ; Allow shell when executing the ssh-wrapper command | |
684 | ssh.wrapper_cmd_allow_shell = false |
|
687 | ssh.wrapper_cmd_allow_shell = false | |
685 |
|
688 | |||
686 | ; Enables logging, and detailed output send back to the client during SSH |
|
689 | ; Enables logging, and detailed output send back to the client during SSH | |
687 | ; operations. Useful for debugging, shouldn't be used in production. |
|
690 | ; operations. Useful for debugging, shouldn't be used in production. | |
688 | ssh.enable_debug_logging = true |
|
691 | ssh.enable_debug_logging = true | |
689 |
|
692 | |||
690 | ; Paths to binary executable, by default they are the names, but we can |
|
693 | ; Paths to binary executable, by default they are the names, but we can | |
691 | ; override them if we want to use a custom one |
|
694 | ; override them if we want to use a custom one | |
692 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg |
|
695 | ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg | |
693 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git |
|
696 | ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git | |
694 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve |
|
697 | ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve | |
695 |
|
698 | |||
696 | ; Enables SSH key generator web interface. Disabling this still allows users |
|
699 | ; Enables SSH key generator web interface. Disabling this still allows users | |
697 | ; to add their own keys. |
|
700 | ; to add their own keys. | |
698 | ssh.enable_ui_key_generator = true |
|
701 | ssh.enable_ui_key_generator = true | |
699 |
|
702 | |||
700 | ; Statsd client config, this is used to send metrics to statsd |
|
703 | ; Statsd client config, this is used to send metrics to statsd | |
701 | ; We recommend setting statsd_exported and scrape them using Prometheus |
|
704 | ; We recommend setting statsd_exported and scrape them using Prometheus | |
702 | #statsd.enabled = false |
|
705 | #statsd.enabled = false | |
703 | #statsd.statsd_host = 0.0.0.0 |
|
706 | #statsd.statsd_host = 0.0.0.0 | |
704 | #statsd.statsd_port = 8125 |
|
707 | #statsd.statsd_port = 8125 | |
705 | #statsd.statsd_prefix = |
|
708 | #statsd.statsd_prefix = | |
706 | #statsd.statsd_ipv6 = false |
|
709 | #statsd.statsd_ipv6 = false | |
707 |
|
710 | |||
708 | ; configure logging automatically at server startup set to false |
|
711 | ; configure logging automatically at server startup set to false | |
709 | ; to use the below custom logging config. |
|
712 | ; to use the below custom logging config. | |
710 | ; RC_LOGGING_FORMATTER |
|
713 | ; RC_LOGGING_FORMATTER | |
711 | ; RC_LOGGING_LEVEL |
|
714 | ; RC_LOGGING_LEVEL | |
712 | ; env variables can control the settings for logging in case of autoconfigure |
|
715 | ; env variables can control the settings for logging in case of autoconfigure | |
713 |
|
716 | |||
714 | logging.autoconfigure = false |
|
717 | logging.autoconfigure = false | |
715 |
|
718 | |||
716 | ; specify your own custom logging config file to configure logging |
|
719 | ; specify your own custom logging config file to configure logging | |
717 | #logging.logging_conf_file = /path/to/custom_logging.ini |
|
720 | #logging.logging_conf_file = /path/to/custom_logging.ini | |
718 |
|
721 | |||
719 | ; Dummy marker to add new entries after. |
|
722 | ; Dummy marker to add new entries after. | |
720 | ; Add any custom entries below. Please don't remove this marker. |
|
723 | ; Add any custom entries below. Please don't remove this marker. | |
721 | custom.conf = 1 |
|
724 | custom.conf = 1 | |
722 |
|
725 | |||
723 |
|
726 | |||
724 | ; ##################### |
|
727 | ; ##################### | |
725 | ; LOGGING CONFIGURATION |
|
728 | ; LOGGING CONFIGURATION | |
726 | ; ##################### |
|
729 | ; ##################### | |
727 |
|
730 | |||
728 | [loggers] |
|
731 | [loggers] | |
729 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper, dogpile |
|
732 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper, dogpile | |
730 |
|
733 | |||
731 | [handlers] |
|
734 | [handlers] | |
732 | keys = console, console_sql |
|
735 | keys = console, console_sql | |
733 |
|
736 | |||
734 | [formatters] |
|
737 | [formatters] | |
735 | keys = generic, json, color_formatter, color_formatter_sql |
|
738 | keys = generic, json, color_formatter, color_formatter_sql | |
736 |
|
739 | |||
737 | ; ####### |
|
740 | ; ####### | |
738 | ; LOGGERS |
|
741 | ; LOGGERS | |
739 | ; ####### |
|
742 | ; ####### | |
740 | [logger_root] |
|
743 | [logger_root] | |
741 | level = NOTSET |
|
744 | level = NOTSET | |
742 | handlers = console |
|
745 | handlers = console | |
743 |
|
746 | |||
744 | [logger_routes] |
|
747 | [logger_routes] | |
745 | level = DEBUG |
|
748 | level = DEBUG | |
746 | handlers = |
|
749 | handlers = | |
747 | qualname = routes.middleware |
|
750 | qualname = routes.middleware | |
748 | ## "level = DEBUG" logs the route matched and routing variables. |
|
751 | ## "level = DEBUG" logs the route matched and routing variables. | |
749 | propagate = 1 |
|
752 | propagate = 1 | |
750 |
|
753 | |||
751 | [logger_sqlalchemy] |
|
754 | [logger_sqlalchemy] | |
752 | level = INFO |
|
755 | level = INFO | |
753 | handlers = console_sql |
|
756 | handlers = console_sql | |
754 | qualname = sqlalchemy.engine |
|
757 | qualname = sqlalchemy.engine | |
755 | propagate = 0 |
|
758 | propagate = 0 | |
756 |
|
759 | |||
757 | [logger_beaker] |
|
760 | [logger_beaker] | |
758 | level = DEBUG |
|
761 | level = DEBUG | |
759 | handlers = |
|
762 | handlers = | |
760 | qualname = beaker.container |
|
763 | qualname = beaker.container | |
761 | propagate = 1 |
|
764 | propagate = 1 | |
762 |
|
765 | |||
763 | [logger_dogpile] |
|
766 | [logger_dogpile] | |
764 | level = INFO |
|
767 | level = INFO | |
765 | handlers = console |
|
768 | handlers = console | |
766 | qualname = dogpile |
|
769 | qualname = dogpile | |
767 | propagate = 1 |
|
770 | propagate = 1 | |
768 |
|
771 | |||
769 | [logger_rhodecode] |
|
772 | [logger_rhodecode] | |
770 | level = DEBUG |
|
773 | level = DEBUG | |
771 | handlers = |
|
774 | handlers = | |
772 | qualname = rhodecode |
|
775 | qualname = rhodecode | |
773 | propagate = 1 |
|
776 | propagate = 1 | |
774 |
|
777 | |||
775 | [logger_ssh_wrapper] |
|
778 | [logger_ssh_wrapper] | |
776 | level = DEBUG |
|
779 | level = DEBUG | |
777 | handlers = |
|
780 | handlers = | |
778 | qualname = ssh_wrapper |
|
781 | qualname = ssh_wrapper | |
779 | propagate = 1 |
|
782 | propagate = 1 | |
780 |
|
783 | |||
781 | [logger_celery] |
|
784 | [logger_celery] | |
782 | level = DEBUG |
|
785 | level = DEBUG | |
783 | handlers = |
|
786 | handlers = | |
784 | qualname = celery |
|
787 | qualname = celery | |
785 |
|
788 | |||
786 |
|
789 | |||
787 | ; ######## |
|
790 | ; ######## | |
788 | ; HANDLERS |
|
791 | ; HANDLERS | |
789 | ; ######## |
|
792 | ; ######## | |
790 |
|
793 | |||
791 | [handler_console] |
|
794 | [handler_console] | |
792 | class = StreamHandler |
|
795 | class = StreamHandler | |
793 | args = (sys.stderr, ) |
|
796 | args = (sys.stderr, ) | |
794 | level = DEBUG |
|
797 | level = DEBUG | |
795 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' |
|
798 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' | |
796 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
799 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
797 | formatter = generic |
|
800 | formatter = generic | |
798 |
|
801 | |||
799 | [handler_console_sql] |
|
802 | [handler_console_sql] | |
800 | ; "level = DEBUG" logs SQL queries and results. |
|
803 | ; "level = DEBUG" logs SQL queries and results. | |
801 | ; "level = INFO" logs SQL queries. |
|
804 | ; "level = INFO" logs SQL queries. | |
802 | ; "level = WARN" logs neither. (Recommended for production systems.) |
|
805 | ; "level = WARN" logs neither. (Recommended for production systems.) | |
803 | class = StreamHandler |
|
806 | class = StreamHandler | |
804 | args = (sys.stderr, ) |
|
807 | args = (sys.stderr, ) | |
805 | level = WARN |
|
808 | level = WARN | |
806 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' |
|
809 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |
807 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
810 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
808 | formatter = generic |
|
811 | formatter = generic | |
809 |
|
812 | |||
810 | ; ########## |
|
813 | ; ########## | |
811 | ; FORMATTERS |
|
814 | ; FORMATTERS | |
812 | ; ########## |
|
815 | ; ########## | |
813 |
|
816 | |||
814 | [formatter_generic] |
|
817 | [formatter_generic] | |
815 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter |
|
818 | class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter | |
816 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
819 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
817 | datefmt = %Y-%m-%d %H:%M:%S |
|
820 | datefmt = %Y-%m-%d %H:%M:%S | |
818 |
|
821 | |||
819 | [formatter_color_formatter] |
|
822 | [formatter_color_formatter] | |
820 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
823 | class = rhodecode.lib.logging_formatter.ColorFormatter | |
821 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
824 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
822 | datefmt = %Y-%m-%d %H:%M:%S |
|
825 | datefmt = %Y-%m-%d %H:%M:%S | |
823 |
|
826 | |||
824 | [formatter_color_formatter_sql] |
|
827 | [formatter_color_formatter_sql] | |
825 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
828 | class = rhodecode.lib.logging_formatter.ColorFormatterSql | |
826 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
829 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
827 | datefmt = %Y-%m-%d %H:%M:%S |
|
830 | datefmt = %Y-%m-%d %H:%M:%S | |
828 |
|
831 | |||
829 | [formatter_json] |
|
832 | [formatter_json] | |
830 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s |
|
833 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s | |
831 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
|
834 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
General Comments 0
You need to be logged in to leave comments.
Login now