comparison development.ini @ 4066:ef252630aad8

config: added example uwsgi configuration with auto-scaling workers mode.
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 29 Jun 2013 22:47:26 +0200
parents 9b4ba12ef8c3
children 17e3926c3753
comparison
equal deleted inserted replaced
4065:b1d2d5a16a7c 4066:ef252630aad8
61 #max_requests = 5 61 #max_requests = 5
62 ## ammount of time a worker can handle request before it get's killed and 62 ## ammount of time a worker can handle request before it get's killed and
63 ## restarted 63 ## restarted
64 #timeout = 3600 64 #timeout = 3600
65 65
66 ## UWSGI ##
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
68 #[uwsgi]
69 #socket = /tmp/uwsgi.sock
70 #master = true
71 #http = 0.0.0.0:5000
72
73 ## set as deamon and redirect all output to file
74 #daemonize = ./uwsgi_rhodecode.log
75
76 ## master process PID
77 #pidfile = ./uwsgi_rhodecode.pid
78
79 ## stats server with workers statistics, use uwsgitop
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
81 #stats = 127.0.0.1:1717
82
83 ## log 5XX errors
84 #log-5xx = true
85
86 ## Set the socket listen queue size.
87 #listen = 256
88
89 ## Gracefully Reload workers after the specified amount of managed requests
90 ## (avoid memory leaks).
91 #max-requests = 1000
92
93 ## Log requests slower than the specified number of milliseconds.
94 #log-slow = 10
95
96 ## Exit if no app can be loaded.
97 #need-app = true
98
99 ## Set lazy mode (load apps in workers instead of master).
100 #lazy = true
101
102 ## scaling ##
103 ## set cheaper algorithm to use, if not set default will be used
104 #cheaper-algo = spare
105
106 # minimum number of workers to keep at all times
107 #cheaper = 1
108
109 # number of workers to spawn at startup
110 #cheaper-initial = 1
111
112 # maximum number of workers that can be spawned
113 #workers = 4
114
115 # how many workers should be spawned at a time
116 #cheaper-step = 1
117
66 ## COMMON ## 118 ## COMMON ##
67 host = 0.0.0.0 119 host = 0.0.0.0
68 port = 5000 120 port = 5000
69 121
70 ## prefix middleware for rc 122 ## prefix middleware for rc
128 ## options for showing and identifying changesets 180 ## options for showing and identifying changesets
129 show_sha_length = 12 181 show_sha_length = 12
130 show_revision_number = true 182 show_revision_number = true
131 183
132 ## gist URL alias, used to create nicer urls for gist. This should be an 184 ## gist URL alias, used to create nicer urls for gist. This should be an
133 ## url that does rewrites to _admin/gists/<gistid>. 185 ## url that does rewrites to _admin/gists/<gistid>.
134 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal 186 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
135 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid> 187 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
136 gist_alias_url = 188 gist_alias_url =
137 189
138 ## white list of API enabled controllers. This allows to add list of 190 ## white list of API enabled controllers. This allows to add list of
139 ## controllers to which access will be enabled by api_key. eg: to enable 191 ## controllers to which access will be enabled by api_key. eg: to enable
140 ## api access to raw_files put `FilesController:raw`, to enable access to patches 192 ## api access to raw_files put `FilesController:raw`, to enable access to patches
141 ## add `ChangesetController:changeset_patch`. This list should be "," separated 193 ## add `ChangesetController:changeset_patch`. This list should be "," separated
142 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names 194 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
195 ## Recommended settings bellow are commented out:
143 api_access_controllers_whitelist = 196 api_access_controllers_whitelist =
197 # ChangesetController:changeset_patch,
198 # ChangesetController:changeset_raw,
199 # FilesController:raw,
200 # FilesController:archivefile
144 201
145 ## alternative_gravatar_url allows you to use your own avatar server application 202 ## alternative_gravatar_url allows you to use your own avatar server application
146 ## the following parts of the URL will be replaced 203 ## the following parts of the URL will be replaced
147 ## {email} user email 204 ## {email} user email
148 ## {md5email} md5 hash of the user email (like at gravatar.com) 205 ## {md5email} md5 hash of the user email (like at gravatar.com)
206 263
207 ## instance-id prefix 264 ## instance-id prefix
208 ## a prefix key for this instance used for cache invalidation when running 265 ## a prefix key for this instance used for cache invalidation when running
209 ## multiple instances of rhodecode, make sure it's globally unique for 266 ## multiple instances of rhodecode, make sure it's globally unique for
210 ## all running rhodecode instances. Leave empty if you don't use it 267 ## all running rhodecode instances. Leave empty if you don't use it
211 instance_id = 268 instance_id =
212 269
213 ## alternative return HTTP header for failed authentication. Default HTTP 270 ## alternative return HTTP header for failed authentication. Default HTTP
214 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with 271 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
215 ## handling that. Set this variable to 403 to return HTTPForbidden 272 ## handling that. Set this variable to 403 to return HTTPForbidden
216 auth_ret_code = 273 auth_ret_code =
303 360
304 ## file based cookies (default) ## 361 ## file based cookies (default) ##
305 #beaker.session.type = file 362 #beaker.session.type = file
306 363
307 beaker.session.key = rhodecode 364 beaker.session.key = rhodecode
308 beaker.session.secret = ${app_instance_uuid} 365 beaker.session.secret = develop-rc-uytcxaz
309 366
310 ## Secure encrypted cookie. Requires AES and AES python libraries 367 ## Secure encrypted cookie. Requires AES and AES python libraries
311 ## you must disable beaker.session.secret to use this 368 ## you must disable beaker.session.secret to use this
312 #beaker.session.encrypt_key = <key_for_encryption> 369 #beaker.session.encrypt_key = <key_for_encryption>
313 #beaker.session.validate_key = <validation_key> 370 #beaker.session.validate_key = <validation_key>
423 logview.pylons.util = #eee 480 logview.pylons.util = #eee
424 481
425 ######################################################### 482 #########################################################
426 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### 483 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
427 ######################################################### 484 #########################################################
428 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db 485 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
429 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode 486 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
487 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
430 sqlalchemy.db1.echo = false 488 sqlalchemy.db1.echo = false
431 sqlalchemy.db1.pool_recycle = 3600 489 sqlalchemy.db1.pool_recycle = 3600
432 sqlalchemy.db1.convert_unicode = true 490 sqlalchemy.db1.convert_unicode = true
433 491
434 ################################ 492 ################################