##// END OF EJS Templates
fix(configs): removed waitress as a default runner for web service on development....
super-admin -
r5413:b4277c11 default
parent child Browse files
Show More
@@ -1,196 +1,191 b''
1 1 # required for pushd to work..
2 2 SHELL = /bin/bash
3 3
4 4
5 5 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
6 6 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
7 7
8 8 .PHONY: clean
9 9 ## Cleanup compiled and cache py files
10 10 clean:
11 11 make test-clean
12 12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
13 13 find . -type d -name "build" -prune -exec rm -rf '{}' ';'
14 14
15 15
16 16 .PHONY: test
17 17 ## run test-clean and tests
18 18 test:
19 19 make test-clean
20 20 make test-only
21 21
22 22
23 23 .PHONY: test-clean
24 24 ## run test-clean and tests
25 25 test-clean:
26 26 rm -rf coverage.xml htmlcov junit.xml pylint.log result
27 27 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
28 28 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
29 29
30 30
31 31 .PHONY: test-only
32 32 ## Run tests only without cleanup
33 33 test-only:
34 34 PYTHONHASHSEED=random \
35 35 py.test -x -vv -r xw -p no:sugar \
36 36 --cov-report=term-missing --cov-report=html \
37 37 --cov=rhodecode rhodecode
38 38
39 39
40 40 .PHONY: test-only-mysql
41 41 ## run tests against mysql
42 42 test-only-mysql:
43 43 PYTHONHASHSEED=random \
44 44 py.test -x -vv -r xw -p no:sugar \
45 45 --cov-report=term-missing --cov-report=html \
46 46 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
47 47 --cov=rhodecode rhodecode
48 48
49 49
50 50 .PHONY: test-only-postgres
51 51 ## run tests against postgres
52 52 test-only-postgres:
53 53 PYTHONHASHSEED=random \
54 54 py.test -x -vv -r xw -p no:sugar \
55 55 --cov-report=term-missing --cov-report=html \
56 56 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
57 57 --cov=rhodecode rhodecode
58 58
59 59 .PHONY: ruff-check
60 60 ## run a ruff analysis
61 61 ruff-check:
62 62 ruff check --ignore F401 --ignore I001 --ignore E402 --ignore E501 --ignore F841 --exclude rhodecode/lib/dbmigrate --exclude .eggs --exclude .dev .
63 63
64 64
65 65 .PHONY: docs
66 66 ## build docs
67 67 docs:
68 68 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean html)
69 69
70 70
71 71 .PHONY: docs-clean
72 72 ## Cleanup docs
73 73 docs-clean:
74 74 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean)
75 75
76 76
77 77 .PHONY: docs-cleanup
78 78 ## Cleanup docs
79 79 docs-cleanup:
80 80 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make cleanup)
81 81
82 82
83 83 .PHONY: web-build
84 84 ## Build JS packages static/js
85 85 web-build:
86 86 docker run -it --rm -v $(PWD):/project --workdir=/project rhodecode/static-files-build:16 -c "npm install && /project/node_modules/.bin/grunt"
87 87 # run static file check
88 88 ./rhodecode/tests/scripts/static-file-check.sh rhodecode/public/
89 89 rm -rf node_modules
90 90
91 91
92 92 .PHONY: pip-packages
93 93 ## Show outdated packages
94 94 pip-packages:
95 95 python ${OUTDATED_PACKAGES}
96 96
97 97
98 98 .PHONY: build
99 99 ## Build sdist/egg
100 100 build:
101 101 python -m build
102 102
103 103
104 104 .PHONY: dev-sh
105 105 ## make dev-sh
106 106 dev-sh:
107 107 sudo echo "deb [trusted=yes] https://apt.fury.io/rsteube/ /" | sudo tee -a "/etc/apt/sources.list.d/fury.list"
108 108 sudo apt-get update
109 109 sudo apt-get install -y zsh carapace-bin
110 110 rm -rf /home/rhodecode/.oh-my-zsh
111 111 curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
112 112 @echo "source <(carapace _carapace)" > /home/rhodecode/.zsrc
113 113 @echo "${RC_DEV_CMD_HELP}"
114 114 @PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b %# ' zsh
115 115
116 116
117 117 .PHONY: dev-cleanup
118 118 ## Cleanup: pip freeze | grep -v "^-e" | grep -v "@" | xargs pip uninstall -y
119 119 dev-cleanup:
120 120 pip freeze | grep -v "^-e" | grep -v "@" | xargs pip uninstall -y
121 121 rm -rf /tmp/*
122 122
123 123
124 124 .PHONY: dev-env
125 125 ## make dev-env based on the requirements files and install develop of packages
126 126 dev-env:
127 127 sudo -u root chown rhodecode:rhodecode /home/rhodecode/.cache/pip/
128 128 pip install build virtualenv
129 129 pushd ../rhodecode-vcsserver/ && make dev-env && popd
130 130 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
131 131 pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
132 132 pip install -e .
133 133
134 134
135 135 .PHONY: sh
136 136 ## shortcut for make dev-sh dev-env
137 137 sh:
138 138 make dev-env
139 139 make dev-sh
140 140
141 141
142 .PHONY: dev-srv
143 ## run develop server instance, docker exec -it $(docker ps -q --filter 'name=dev-enterprise-ce') /bin/bash
144 dev-srv:
145 pserve --reload .dev/dev.ini
146
147 142 ## Allows changes of workers e.g make dev-srv-g workers=2
148 143 workers?=1
149 144
150 .PHONY: dev-srv-g
145 .PHONY: dev-srv
151 146 ## run gunicorn multi process workers
152 147 dev-srv-g:
153 148 gunicorn --paste=.dev/dev.ini --bind=0.0.0.0:10020 --config=.dev/gunicorn_config.py --timeout=120 --reload --workers=$(workers)
154 149
155 150
156 151 # Default command on calling make
157 152 .DEFAULT_GOAL := show-help
158 153
159 154 .PHONY: show-help
160 155 show-help:
161 156 @echo "$$(tput bold)Available rules:$$(tput sgr0)"
162 157 @echo
163 158 @sed -n -e "/^## / { \
164 159 h; \
165 160 s/.*//; \
166 161 :doc" \
167 162 -e "H; \
168 163 n; \
169 164 s/^## //; \
170 165 t doc" \
171 166 -e "s/:.*//; \
172 167 G; \
173 168 s/\\n## /---/; \
174 169 s/\\n/ /g; \
175 170 p; \
176 171 }" ${MAKEFILE_LIST} \
177 172 | LC_ALL='C' sort --ignore-case \
178 173 | awk -F '---' \
179 174 -v ncol=$$(tput cols) \
180 175 -v indent=19 \
181 176 -v col_on="$$(tput setaf 6)" \
182 177 -v col_off="$$(tput sgr0)" \
183 178 '{ \
184 179 printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
185 180 n = split($$2, words, " "); \
186 181 line_length = ncol - indent; \
187 182 for (i = 1; i <= n; i++) { \
188 183 line_length -= length(words[i]) + 1; \
189 184 if (line_length <= 0) { \
190 185 line_length = ncol - indent - length(words[i]) - 1; \
191 186 printf "\n%*s ", -indent, " "; \
192 187 } \
193 188 printf "%s ", words[i]; \
194 189 } \
195 190 printf "\n"; \
196 191 }'
@@ -1,820 +1,803 b''
1 1
2 2 ; #########################################
3 3 ; RHODECODE COMMUNITY EDITION CONFIGURATION
4 4 ; #########################################
5 5
6 6 [DEFAULT]
7 7 ; Debug flag sets all loggers to debug, and enables request tracking
8 8 debug = true
9 9
10 10 ; ########################################################################
11 11 ; EMAIL CONFIGURATION
12 12 ; These settings will be used by the RhodeCode mailing system
13 13 ; ########################################################################
14 14
15 15 ; prefix all emails subjects with given prefix, helps filtering out emails
16 16 #email_prefix = [RhodeCode]
17 17
18 18 ; email FROM address all mails will be sent
19 19 #app_email_from = rhodecode-noreply@localhost
20 20
21 21 #smtp_server = mail.server.com
22 22 #smtp_username =
23 23 #smtp_password =
24 24 #smtp_port =
25 25 #smtp_use_tls = false
26 26 #smtp_use_ssl = true
27 27
28 28 [server:main]
29 29 ; COMMON HOST/IP CONFIG, This applies mostly to develop setup,
30 30 ; Host port for gunicorn are controlled by gunicorn_conf.py
31 31 host = 127.0.0.1
32 32 port = 10020
33 33
34 ; ##################################################
35 ; WAITRESS WSGI SERVER - Recommended for Development
36 ; ##################################################
37
38 ; use server type
39 use = egg:waitress#main
40
41 ; number of worker threads
42 threads = 5
43
44 ; MAX BODY SIZE 100GB
45 max_request_body_size = 107374182400
46
47 ; Use poll instead of select, fixes file descriptors limits problems.
48 ; May not work on old windows systems.
49 asyncore_use_poll = true
50
51 34
52 35 ; ###########################
53 36 ; GUNICORN APPLICATION SERVER
54 37 ; ###########################
55 38
56 39 ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py
57 40
58 41 ; Module to use, this setting shouldn't be changed
59 #use = egg:gunicorn#main
42 use = egg:gunicorn#main
60 43
61 44 ; Prefix middleware for RhodeCode.
62 45 ; recommended when using proxy setup.
63 46 ; allows to set RhodeCode under a prefix in server.
64 47 ; eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
65 48 ; And set your prefix like: `prefix = /custom_prefix`
66 49 ; be sure to also set beaker.session.cookie_path = /custom_prefix if you need
67 50 ; to make your cookies only work on prefix url
68 51 [filter:proxy-prefix]
69 52 use = egg:PasteDeploy#prefix
70 53 prefix = /
71 54
72 55 [app:main]
73 56 ; The %(here)s variable will be replaced with the absolute path of parent directory
74 57 ; of this file
75 58 ; Each option in the app:main can be override by an environmental variable
76 59 ;
77 60 ;To override an option:
78 61 ;
79 62 ;RC_<KeyName>
80 63 ;Everything should be uppercase, . and - should be replaced by _.
81 64 ;For example, if you have these configuration settings:
82 65 ;rc_cache.repo_object.backend = foo
83 66 ;can be overridden by
84 67 ;export RC_CACHE_REPO_OBJECT_BACKEND=foo
85 68
86 69 use = egg:rhodecode-enterprise-ce
87 70
88 71 ; enable proxy prefix middleware, defined above
89 72 #filter-with = proxy-prefix
90 73
91 74 ; #############
92 75 ; DEBUG OPTIONS
93 76 ; #############
94 77
95 78 pyramid.reload_templates = true
96 79
97 80 # During development the we want to have the debug toolbar enabled
98 81 pyramid.includes =
99 82 pyramid_debugtoolbar
100 83
101 84 debugtoolbar.hosts = 0.0.0.0/0
102 85 debugtoolbar.exclude_prefixes =
103 86 /css
104 87 /fonts
105 88 /images
106 89 /js
107 90
108 91 ## RHODECODE PLUGINS ##
109 92 rhodecode.includes =
110 93 rhodecode.api
111 94
112 95
113 96 # api prefix url
114 97 rhodecode.api.url = /_admin/api
115 98
116 99 ; enable debug style page
117 100 debug_style = true
118 101
119 102 ; #################
120 103 ; END DEBUG OPTIONS
121 104 ; #################
122 105
123 106 ; encryption key used to encrypt social plugin tokens,
124 107 ; remote_urls with credentials etc, if not set it defaults to
125 108 ; `beaker.session.secret`
126 109 #rhodecode.encrypted_values.secret =
127 110
128 111 ; decryption strict mode (enabled by default). It controls if decryption raises
129 112 ; `SignatureVerificationError` in case of wrong key, or damaged encryption data.
130 113 #rhodecode.encrypted_values.strict = false
131 114
132 115 ; Pick algorithm for encryption. Either fernet (more secure) or aes (default)
133 116 ; fernet is safer, and we strongly recommend switching to it.
134 117 ; Due to backward compatibility aes is used as default.
135 118 #rhodecode.encrypted_values.algorithm = fernet
136 119
137 120 ; Return gzipped responses from RhodeCode (static files/application)
138 121 gzip_responses = false
139 122
140 123 ; Auto-generate javascript routes file on startup
141 124 generate_js_files = false
142 125
143 126 ; System global default language.
144 127 ; All available languages: en (default), be, de, es, fr, it, ja, pl, pt, ru, zh
145 128 lang = en
146 129
147 130 ; Perform a full repository scan and import on each server start.
148 131 ; Settings this to true could lead to very long startup time.
149 132 startup.import_repos = false
150 133
151 134 ; URL at which the application is running. This is used for Bootstrapping
152 135 ; requests in context when no web request is available. Used in ishell, or
153 136 ; SSH calls. Set this for events to receive proper url for SSH calls.
154 137 app.base_url = http://rhodecode.local
155 138
156 139 ; Host at which the Service API is running.
157 140 app.service_api.host = http://rhodecode.local:10020
158 141
159 142 ; Secret for Service API authentication.
160 143 app.service_api.token =
161 144
162 145 ; Unique application ID. Should be a random unique string for security.
163 146 app_instance_uuid = rc-production
164 147
165 148 ; Cut off limit for large diffs (size in bytes). If overall diff size on
166 149 ; commit, or pull request exceeds this limit this diff will be displayed
167 150 ; partially. E.g 512000 == 512Kb
168 151 cut_off_limit_diff = 512000
169 152
170 153 ; Cut off limit for large files inside diffs (size in bytes). Each individual
171 154 ; file inside diff which exceeds this limit will be displayed partially.
172 155 ; E.g 128000 == 128Kb
173 156 cut_off_limit_file = 128000
174 157
175 158 ; Use cached version of vcs repositories everywhere. Recommended to be `true`
176 159 vcs_full_cache = true
177 160
178 161 ; Force https in RhodeCode, fixes https redirects, assumes it's always https.
179 162 ; Normally this is controlled by proper flags sent from http server such as Nginx or Apache
180 163 force_https = false
181 164
182 165 ; use Strict-Transport-Security headers
183 166 use_htsts = false
184 167
185 168 ; Set to true if your repos are exposed using the dumb protocol
186 169 git_update_server_info = false
187 170
188 171 ; RSS/ATOM feed options
189 172 rss_cut_off_limit = 256000
190 173 rss_items_per_page = 10
191 174 rss_include_diff = false
192 175
193 176 ; gist URL alias, used to create nicer urls for gist. This should be an
194 177 ; url that does rewrites to _admin/gists/{gistid}.
195 178 ; example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
196 179 ; RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
197 180 gist_alias_url =
198 181
199 182 ; List of views (using glob pattern syntax) that AUTH TOKENS could be
200 183 ; used for access.
201 184 ; Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
202 185 ; came from the the logged in user who own this authentication token.
203 186 ; Additionally @TOKEN syntax can be used to bound the view to specific
204 187 ; authentication token. Such view would be only accessible when used together
205 188 ; with this authentication token
206 189 ; list of all views can be found under `/_admin/permissions/auth_token_access`
207 190 ; The list should be "," separated and on a single line.
208 191 ; Most common views to enable:
209 192
210 193 # RepoCommitsView:repo_commit_download
211 194 # RepoCommitsView:repo_commit_patch
212 195 # RepoCommitsView:repo_commit_raw
213 196 # RepoCommitsView:repo_commit_raw@TOKEN
214 197 # RepoFilesView:repo_files_diff
215 198 # RepoFilesView:repo_archivefile
216 199 # RepoFilesView:repo_file_raw
217 200 # GistView:*
218 201 api_access_controllers_whitelist =
219 202
220 203 ; Default encoding used to convert from and to unicode
221 204 ; can be also a comma separated list of encoding in case of mixed encodings
222 205 default_encoding = UTF-8
223 206
224 207 ; instance-id prefix
225 208 ; a prefix key for this instance used for cache invalidation when running
226 209 ; multiple instances of RhodeCode, make sure it's globally unique for
227 210 ; all running RhodeCode instances. Leave empty if you don't use it
228 211 instance_id =
229 212
230 213 ; Fallback authentication plugin. Set this to a plugin ID to force the usage
231 214 ; of an authentication plugin also if it is disabled by it's settings.
232 215 ; This could be useful if you are unable to log in to the system due to broken
233 216 ; authentication settings. Then you can enable e.g. the internal RhodeCode auth
234 217 ; module to log in again and fix the settings.
235 218 ; Available builtin plugin IDs (hash is part of the ID):
236 219 ; egg:rhodecode-enterprise-ce#rhodecode
237 220 ; egg:rhodecode-enterprise-ce#pam
238 221 ; egg:rhodecode-enterprise-ce#ldap
239 222 ; egg:rhodecode-enterprise-ce#jasig_cas
240 223 ; egg:rhodecode-enterprise-ce#headers
241 224 ; egg:rhodecode-enterprise-ce#crowd
242 225
243 226 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
244 227
245 228 ; Flag to control loading of legacy plugins in py:/path format
246 229 auth_plugin.import_legacy_plugins = true
247 230
248 231 ; alternative return HTTP header for failed authentication. Default HTTP
249 232 ; response is 401 HTTPUnauthorized. Currently HG clients have troubles with
250 233 ; handling that causing a series of failed authentication calls.
251 234 ; Set this variable to 403 to return HTTPForbidden, or any other HTTP code
252 235 ; This will be served instead of default 401 on bad authentication
253 236 auth_ret_code =
254 237
255 238 ; use special detection method when serving auth_ret_code, instead of serving
256 239 ; ret_code directly, use 401 initially (Which triggers credentials prompt)
257 240 ; and then serve auth_ret_code to clients
258 241 auth_ret_code_detection = false
259 242
260 243 ; locking return code. When repository is locked return this HTTP code. 2XX
261 244 ; codes don't break the transactions while 4XX codes do
262 245 lock_ret_code = 423
263 246
264 247 ; Filesystem location were repositories should be stored
265 248 repo_store.path = /var/opt/rhodecode_repo_store
266 249
267 250 ; allows to setup custom hooks in settings page
268 251 allow_custom_hooks_settings = true
269 252
270 253 ; Generated license token required for EE edition license.
271 254 ; New generated token value can be found in Admin > settings > license page.
272 255 license_token =
273 256
274 257 ; This flag hides sensitive information on the license page such as token, and license data
275 258 license.hide_license_info = false
276 259
277 260 ; supervisor connection uri, for managing supervisor and logs.
278 261 supervisor.uri =
279 262
280 263 ; supervisord group name/id we only want this RC instance to handle
281 264 supervisor.group_id = dev
282 265
283 266 ; Display extended labs settings
284 267 labs_settings_active = true
285 268
286 269 ; Custom exception store path, defaults to TMPDIR
287 270 ; This is used to store exception from RhodeCode in shared directory
288 271 #exception_tracker.store_path =
289 272
290 273 ; Send email with exception details when it happens
291 274 #exception_tracker.send_email = false
292 275
293 276 ; Comma separated list of recipients for exception emails,
294 277 ; e.g admin@rhodecode.com,devops@rhodecode.com
295 278 ; Can be left empty, then emails will be sent to ALL super-admins
296 279 #exception_tracker.send_email_recipients =
297 280
298 281 ; optional prefix to Add to email Subject
299 282 #exception_tracker.email_prefix = [RHODECODE ERROR]
300 283
301 284 ; File store configuration. This is used to store and serve uploaded files
302 285 file_store.enabled = true
303 286
304 287 ; Storage backend, available options are: local
305 288 file_store.backend = local
306 289
307 290 ; path to store the uploaded binaries and artifacts
308 291 file_store.storage_path = /var/opt/rhodecode_data/file_store
309 292
310 293 ; Uncomment and set this path to control settings for archive download cache.
311 294 ; Generated repo archives will be cached at this location
312 295 ; and served from the cache during subsequent requests for the same archive of
313 296 ; the repository. This path is important to be shared across filesystems and with
314 297 ; RhodeCode and vcsserver
315 298
316 299 ; Default is $cache_dir/archive_cache if not set
317 300 archive_cache.store_dir = /var/opt/rhodecode_data/tarballcache
318 301
319 302 ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb
320 303 archive_cache.cache_size_gb = 10
321 304
322 305 ; By default cache uses sharding technique, this specifies how many shards are there
323 306 archive_cache.cache_shards = 4
324 307
325 308 ; #############
326 309 ; CELERY CONFIG
327 310 ; #############
328 311
329 312 ; 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
330 313
331 314 use_celery = true
332 315
333 316 ; path to store schedule database
334 317 #celerybeat-schedule.path =
335 318
336 319 ; connection url to the message broker (default redis)
337 320 celery.broker_url = redis://redis:6379/8
338 321
339 322 ; results backend to get results for (default redis)
340 323 celery.result_backend = redis://redis:6379/8
341 324
342 325 ; rabbitmq example
343 326 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
344 327
345 328 ; maximum tasks to execute before worker restart
346 329 celery.max_tasks_per_child = 20
347 330
348 331 ; tasks will never be sent to the queue, but executed locally instead.
349 332 celery.task_always_eager = false
350 333
351 334 ; #############
352 335 ; DOGPILE CACHE
353 336 ; #############
354 337
355 338 ; Default cache dir for caches. Putting this into a ramdisk can boost performance.
356 339 ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space
357 340 cache_dir = /var/opt/rhodecode_data
358 341
359 342 ; *********************************************
360 343 ; `sql_cache_short` cache for heavy SQL queries
361 344 ; Only supported backend is `memory_lru`
362 345 ; *********************************************
363 346 rc_cache.sql_cache_short.backend = dogpile.cache.rc.memory_lru
364 347 rc_cache.sql_cache_short.expiration_time = 30
365 348
366 349
367 350 ; *****************************************************
368 351 ; `cache_repo_longterm` cache for repo object instances
369 352 ; Only supported backend is `memory_lru`
370 353 ; *****************************************************
371 354 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
372 355 ; by default we use 30 Days, cache is still invalidated on push
373 356 rc_cache.cache_repo_longterm.expiration_time = 2592000
374 357 ; max items in LRU cache, set to smaller number to save memory, and expire last used caches
375 358 rc_cache.cache_repo_longterm.max_size = 10000
376 359
377 360
378 361 ; *********************************************
379 362 ; `cache_general` cache for general purpose use
380 363 ; for simplicity use rc.file_namespace backend,
381 364 ; for performance and scale use rc.redis
382 365 ; *********************************************
383 366 rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace
384 367 rc_cache.cache_general.expiration_time = 43200
385 368 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
386 369 #rc_cache.cache_general.arguments.filename = /tmp/cache_general_db
387 370
388 371 ; alternative `cache_general` redis backend with distributed lock
389 372 #rc_cache.cache_general.backend = dogpile.cache.rc.redis
390 373 #rc_cache.cache_general.expiration_time = 300
391 374
392 375 ; redis_expiration_time needs to be greater then expiration_time
393 376 #rc_cache.cache_general.arguments.redis_expiration_time = 7200
394 377
395 378 #rc_cache.cache_general.arguments.host = localhost
396 379 #rc_cache.cache_general.arguments.port = 6379
397 380 #rc_cache.cache_general.arguments.db = 0
398 381 #rc_cache.cache_general.arguments.socket_timeout = 30
399 382 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
400 383 #rc_cache.cache_general.arguments.distributed_lock = true
401 384
402 385 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
403 386 #rc_cache.cache_general.arguments.lock_auto_renewal = true
404 387
405 388 ; *************************************************
406 389 ; `cache_perms` cache for permission tree, auth TTL
407 390 ; for simplicity use rc.file_namespace backend,
408 391 ; for performance and scale use rc.redis
409 392 ; *************************************************
410 393 rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace
411 394 rc_cache.cache_perms.expiration_time = 3600
412 395 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
413 396 #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms_db
414 397
415 398 ; alternative `cache_perms` redis backend with distributed lock
416 399 #rc_cache.cache_perms.backend = dogpile.cache.rc.redis
417 400 #rc_cache.cache_perms.expiration_time = 300
418 401
419 402 ; redis_expiration_time needs to be greater then expiration_time
420 403 #rc_cache.cache_perms.arguments.redis_expiration_time = 7200
421 404
422 405 #rc_cache.cache_perms.arguments.host = localhost
423 406 #rc_cache.cache_perms.arguments.port = 6379
424 407 #rc_cache.cache_perms.arguments.db = 0
425 408 #rc_cache.cache_perms.arguments.socket_timeout = 30
426 409 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
427 410 #rc_cache.cache_perms.arguments.distributed_lock = true
428 411
429 412 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
430 413 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
431 414
432 415 ; ***************************************************
433 416 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
434 417 ; for simplicity use rc.file_namespace backend,
435 418 ; for performance and scale use rc.redis
436 419 ; ***************************************************
437 420 rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace
438 421 rc_cache.cache_repo.expiration_time = 2592000
439 422 ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
440 423 #rc_cache.cache_repo.arguments.filename = /tmp/cache_repo_db
441 424
442 425 ; alternative `cache_repo` redis backend with distributed lock
443 426 #rc_cache.cache_repo.backend = dogpile.cache.rc.redis
444 427 #rc_cache.cache_repo.expiration_time = 2592000
445 428
446 429 ; redis_expiration_time needs to be greater then expiration_time
447 430 #rc_cache.cache_repo.arguments.redis_expiration_time = 2678400
448 431
449 432 #rc_cache.cache_repo.arguments.host = localhost
450 433 #rc_cache.cache_repo.arguments.port = 6379
451 434 #rc_cache.cache_repo.arguments.db = 1
452 435 #rc_cache.cache_repo.arguments.socket_timeout = 30
453 436 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
454 437 #rc_cache.cache_repo.arguments.distributed_lock = true
455 438
456 439 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
457 440 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
458 441
459 442 ; ##############
460 443 ; BEAKER SESSION
461 444 ; ##############
462 445
463 446 ; beaker.session.type is type of storage options for the logged users sessions. Current allowed
464 447 ; types are file, ext:redis, ext:database, ext:memcached
465 448 ; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session
466 449 #beaker.session.type = file
467 450 #beaker.session.data_dir = %(here)s/data/sessions
468 451
469 452 ; Redis based sessions
470 453 beaker.session.type = ext:redis
471 454 beaker.session.url = redis://redis:6379/2
472 455
473 456 ; DB based session, fast, and allows easy management over logged in users
474 457 #beaker.session.type = ext:database
475 458 #beaker.session.table_name = db_session
476 459 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
477 460 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
478 461 #beaker.session.sa.pool_recycle = 3600
479 462 #beaker.session.sa.echo = false
480 463
481 464 beaker.session.key = rhodecode
482 465 beaker.session.secret = develop-rc-uytcxaz
483 466 beaker.session.lock_dir = /data_ramdisk/lock
484 467
485 468 ; Secure encrypted cookie. Requires AES and AES python libraries
486 469 ; you must disable beaker.session.secret to use this
487 470 #beaker.session.encrypt_key = key_for_encryption
488 471 #beaker.session.validate_key = validation_key
489 472
490 473 ; Sets session as invalid (also logging out user) if it haven not been
491 474 ; accessed for given amount of time in seconds
492 475 beaker.session.timeout = 2592000
493 476 beaker.session.httponly = true
494 477
495 478 ; Path to use for the cookie. Set to prefix if you use prefix middleware
496 479 #beaker.session.cookie_path = /custom_prefix
497 480
498 481 ; Set https secure cookie
499 482 beaker.session.secure = false
500 483
501 484 ; default cookie expiration time in seconds, set to `true` to set expire
502 485 ; at browser close
503 486 #beaker.session.cookie_expires = 3600
504 487
505 488 ; #############################
506 489 ; SEARCH INDEXING CONFIGURATION
507 490 ; #############################
508 491
509 492 ; Full text search indexer is available in rhodecode-tools under
510 493 ; `rhodecode-tools index` command
511 494
512 495 ; WHOOSH Backend, doesn't require additional services to run
513 496 ; it works good with few dozen repos
514 497 search.module = rhodecode.lib.index.whoosh
515 498 search.location = %(here)s/data/index
516 499
517 500 ; ####################
518 501 ; CHANNELSTREAM CONFIG
519 502 ; ####################
520 503
521 504 ; channelstream enables persistent connections and live notification
522 505 ; in the system. It's also used by the chat system
523 506
524 507 channelstream.enabled = true
525 508
526 509 ; server address for channelstream server on the backend
527 510 channelstream.server = channelstream:9800
528 511
529 512 ; location of the channelstream server from outside world
530 513 ; use ws:// for http or wss:// for https. This address needs to be handled
531 514 ; by external HTTP server such as Nginx or Apache
532 515 ; see Nginx/Apache configuration examples in our docs
533 516 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
534 517 channelstream.secret = ENV_GENERATED
535 518 channelstream.history.location = /var/opt/rhodecode_data/channelstream_history
536 519
537 520 ; Internal application path that Javascript uses to connect into.
538 521 ; If you use proxy-prefix the prefix should be added before /_channelstream
539 522 channelstream.proxy_path = /_channelstream
540 523
541 524
542 525 ; ##############################
543 526 ; MAIN RHODECODE DATABASE CONFIG
544 527 ; ##############################
545 528
546 529 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
547 530 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
548 531 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode?charset=utf8
549 532 ; pymysql is an alternative driver for MySQL, use in case of problems with default one
550 533 #sqlalchemy.db1.url = mysql+pymysql://root:qweqwe@localhost/rhodecode
551 534
552 535 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
553 536
554 537 ; see sqlalchemy docs for other advanced settings
555 538 ; print the sql statements to output
556 539 sqlalchemy.db1.echo = false
557 540
558 541 ; recycle the connections after this amount of seconds
559 542 sqlalchemy.db1.pool_recycle = 3600
560 543
561 544 ; the number of connections to keep open inside the connection pool.
562 545 ; 0 indicates no limit
563 546 ; the general calculus with gevent is:
564 547 ; if your system allows 500 concurrent greenlets (max_connections) that all do database access,
565 548 ; then increase pool size + max overflow so that they add up to 500.
566 549 #sqlalchemy.db1.pool_size = 5
567 550
568 551 ; The number of connections to allow in connection pool "overflow", that is
569 552 ; connections that can be opened above and beyond the pool_size setting,
570 553 ; which defaults to five.
571 554 #sqlalchemy.db1.max_overflow = 10
572 555
573 556 ; Connection check ping, used to detect broken database connections
574 557 ; could be enabled to better handle cases if MySQL has gone away errors
575 558 #sqlalchemy.db1.ping_connection = true
576 559
577 560 ; ##########
578 561 ; VCS CONFIG
579 562 ; ##########
580 563 vcs.server.enable = true
581 564 vcs.server = vcsserver:10010
582 565
583 566 ; Web server connectivity protocol, responsible for web based VCS operations
584 567 ; Available protocols are:
585 568 ; `http` - use http-rpc backend (default)
586 569 vcs.server.protocol = http
587 570
588 571 ; Push/Pull operations protocol, available options are:
589 572 ; `http` - use http-rpc backend (default)
590 573 vcs.scm_app_implementation = http
591 574
592 575 ; Push/Pull operations hooks protocol, available options are:
593 576 ; `http` - use http-rpc backend (default)
594 577 ; `celery` - use celery based hooks
595 578 vcs.hooks.protocol = http
596 579
597 580 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
598 581 ; accessible via network.
599 582 ; Use vcs.hooks.host = "*" to bind to current hostname (for Docker)
600 583 vcs.hooks.host = *
601 584
602 585 ; Start VCSServer with this instance as a subprocess, useful for development
603 586 vcs.start_server = false
604 587
605 588 ; List of enabled VCS backends, available options are:
606 589 ; `hg` - mercurial
607 590 ; `git` - git
608 591 ; `svn` - subversion
609 592 vcs.backends = hg, git, svn
610 593
611 594 ; Wait this number of seconds before killing connection to the vcsserver
612 595 vcs.connection_timeout = 3600
613 596
614 597 ; Cache flag to cache vcsserver remote calls locally
615 598 ; It uses cache_region `cache_repo`
616 599 vcs.methods.cache = true
617 600
618 601 ; ####################################################
619 602 ; Subversion proxy support (mod_dav_svn)
620 603 ; Maps RhodeCode repo groups into SVN paths for Apache
621 604 ; ####################################################
622 605
623 606 ; Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
624 607 ; Set a numeric version for your current SVN e.g 1.8, or 1.12
625 608 ; 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 609 #vcs.svn.compatible_version = 1.8
627 610
628 611 ; Enable SVN proxy of requests over HTTP
629 612 vcs.svn.proxy.enabled = true
630 613
631 614 ; host to connect to running SVN subsystem
632 615 vcs.svn.proxy.host = http://svn:8090
633 616
634 617 ; Enable or disable the config file generation.
635 618 svn.proxy.generate_config = true
636 619
637 620 ; Generate config file with `SVNListParentPath` set to `On`.
638 621 svn.proxy.list_parent_path = true
639 622
640 623 ; Set location and file name of generated config file.
641 624 svn.proxy.config_file_path = /etc/rhodecode/conf/svn/mod_dav_svn.conf
642 625
643 626 ; alternative mod_dav config template. This needs to be a valid mako template
644 627 ; Example template can be found in the source code:
645 628 ; rhodecode/apps/svn_support/templates/mod-dav-svn.conf.mako
646 629 #svn.proxy.config_template = ~/.rccontrol/enterprise-1/custom_svn_conf.mako
647 630
648 631 ; Used as a prefix to the `Location` block in the generated config file.
649 632 ; In most cases it should be set to `/`.
650 633 svn.proxy.location_root = /
651 634
652 635 ; Command to reload the mod dav svn configuration on change.
653 636 ; Example: `/etc/init.d/apache2 reload` or /home/USER/apache_reload.sh
654 637 ; Make sure user who runs RhodeCode process is allowed to reload Apache
655 638 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
656 639
657 640 ; If the timeout expires before the reload command finishes, the command will
658 641 ; be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
659 642 #svn.proxy.reload_timeout = 10
660 643
661 644 ; ####################
662 645 ; SSH Support Settings
663 646 ; ####################
664 647
665 648 ; Defines if a custom authorized_keys file should be created and written on
666 649 ; any change user ssh keys. Setting this to false also disables possibility
667 650 ; of adding SSH keys by users from web interface. Super admins can still
668 651 ; manage SSH Keys.
669 652 ssh.generate_authorized_keyfile = true
670 653
671 654 ; Options for ssh, default is `no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding`
672 655 # ssh.authorized_keys_ssh_opts =
673 656
674 657 ; Path to the authorized_keys file where the generate entries are placed.
675 658 ; It is possible to have multiple key files specified in `sshd_config` e.g.
676 659 ; AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_rhodecode
677 660 ssh.authorized_keys_file_path = /etc/rhodecode/conf/ssh/authorized_keys_rhodecode
678 661
679 662 ; Command to execute the SSH wrapper. The binary is available in the
680 663 ; RhodeCode installation directory.
681 664 ; legacy: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper
682 665 ; new rewrite: /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper-v2
683 666 ssh.wrapper_cmd = /usr/local/bin/rhodecode_bin/bin/rc-ssh-wrapper
684 667
685 668 ; Allow shell when executing the ssh-wrapper command
686 669 ssh.wrapper_cmd_allow_shell = false
687 670
688 671 ; Enables logging, and detailed output send back to the client during SSH
689 672 ; operations. Useful for debugging, shouldn't be used in production.
690 673 ssh.enable_debug_logging = true
691 674
692 675 ; Paths to binary executable, by default they are the names, but we can
693 676 ; override them if we want to use a custom one
694 677 ssh.executable.hg = /usr/local/bin/rhodecode_bin/vcs_bin/hg
695 678 ssh.executable.git = /usr/local/bin/rhodecode_bin/vcs_bin/git
696 679 ssh.executable.svn = /usr/local/bin/rhodecode_bin/vcs_bin/svnserve
697 680
698 681 ; Enables SSH key generator web interface. Disabling this still allows users
699 682 ; to add their own keys.
700 683 ssh.enable_ui_key_generator = true
701 684
702 685 ; Statsd client config, this is used to send metrics to statsd
703 686 ; We recommend setting statsd_exported and scrape them using Prometheus
704 687 #statsd.enabled = false
705 688 #statsd.statsd_host = 0.0.0.0
706 689 #statsd.statsd_port = 8125
707 690 #statsd.statsd_prefix =
708 691 #statsd.statsd_ipv6 = false
709 692
710 693 ; configure logging automatically at server startup set to false
711 694 ; to use the below custom logging config.
712 695 ; RC_LOGGING_FORMATTER
713 696 ; RC_LOGGING_LEVEL
714 697 ; env variables can control the settings for logging in case of autoconfigure
715 698
716 699 #logging.autoconfigure = true
717 700
718 701 ; specify your own custom logging config file to configure logging
719 702 #logging.logging_conf_file = /path/to/custom_logging.ini
720 703
721 704 ; Dummy marker to add new entries after.
722 705 ; Add any custom entries below. Please don't remove this marker.
723 706 custom.conf = 1
724 707
725 708
726 709 ; #####################
727 710 ; LOGGING CONFIGURATION
728 711 ; #####################
729 712
730 713 [loggers]
731 714 keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper
732 715
733 716 [handlers]
734 717 keys = console, console_sql
735 718
736 719 [formatters]
737 720 keys = generic, json, color_formatter, color_formatter_sql
738 721
739 722 ; #######
740 723 ; LOGGERS
741 724 ; #######
742 725 [logger_root]
743 726 level = NOTSET
744 727 handlers = console
745 728
746 729 [logger_sqlalchemy]
747 730 level = INFO
748 731 handlers = console_sql
749 732 qualname = sqlalchemy.engine
750 733 propagate = 0
751 734
752 735 [logger_beaker]
753 736 level = DEBUG
754 737 handlers =
755 738 qualname = beaker.container
756 739 propagate = 1
757 740
758 741 [logger_rhodecode]
759 742 level = DEBUG
760 743 handlers =
761 744 qualname = rhodecode
762 745 propagate = 1
763 746
764 747 [logger_ssh_wrapper]
765 748 level = DEBUG
766 749 handlers =
767 750 qualname = ssh_wrapper
768 751 propagate = 1
769 752
770 753 [logger_celery]
771 754 level = DEBUG
772 755 handlers =
773 756 qualname = celery
774 757
775 758
776 759 ; ########
777 760 ; HANDLERS
778 761 ; ########
779 762
780 763 [handler_console]
781 764 class = StreamHandler
782 765 args = (sys.stderr, )
783 766 level = DEBUG
784 767 ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json'
785 768 ; This allows sending properly formatted logs to grafana loki or elasticsearch
786 769 formatter = color_formatter
787 770
788 771 [handler_console_sql]
789 772 ; "level = DEBUG" logs SQL queries and results.
790 773 ; "level = INFO" logs SQL queries.
791 774 ; "level = WARN" logs neither. (Recommended for production systems.)
792 775 class = StreamHandler
793 776 args = (sys.stderr, )
794 777 level = WARN
795 778 ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json'
796 779 ; This allows sending properly formatted logs to grafana loki or elasticsearch
797 780 formatter = color_formatter_sql
798 781
799 782 ; ##########
800 783 ; FORMATTERS
801 784 ; ##########
802 785
803 786 [formatter_generic]
804 787 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
805 788 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
806 789 datefmt = %Y-%m-%d %H:%M:%S
807 790
808 791 [formatter_color_formatter]
809 792 class = rhodecode.lib.logging_formatter.ColorFormatter
810 793 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
811 794 datefmt = %Y-%m-%d %H:%M:%S
812 795
813 796 [formatter_color_formatter_sql]
814 797 class = rhodecode.lib.logging_formatter.ColorFormatterSql
815 798 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
816 799 datefmt = %Y-%m-%d %H:%M:%S
817 800
818 801 [formatter_json]
819 802 format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s
820 803 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter
General Comments 0
You need to be logged in to leave comments. Login now