I intend to deploy web2py using Nginx and uwsgi on a VPS. On the same 
server, I also installed virtualenv to manage other python packages needed 
for my application.

At the end of this this setup 
script<http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh>,
 
these lines seem to deploy web2py:

chown -R www-data:www-data web2py
cd /home/www-data/web2py
sudo -u www-data python -c "from gluon.main import save_password; 
save_password('$PW',443)"
/etc/init.d/uwsgi restart
/etc/init.d/nginx restart

which brings up the first couple of questions I have:

1. what is the 'save_password' line for? It seems that it is executing some 
python code to save down some pwd, but what is the pwd for?
2. does the above deployment method deploys every single app inside 
'/applications' of web2py directory? if so, how do I selectively deploy 
app? For example, I would only want to deploy '/applications/my_app/'

My next questions concern the involvement of virtualenv during deployment:

3. how exactly do I tell the Nginx and uwsgi to use the web2py code as well 
as related packages inside a particular virtualenv? Is it done 
programatically by some code, or by some config file(s)?
4. again, related to (2), how do I tell uwsgi to only deploy one specific 
app in the web2py directory inside virtualenv?

Thanks a lot.

Reply via email to