I see your point. I'm reconsidering the whole thing. Your answer made me 
think that maybe my setup isn't quite right.

First of all, I've found a solution for my problem of the error when 
updating code: I will just copy the modules from one app to another, 
instead of symlinking. I think now it's the best practical solution, and it 
can be done quickly and easy. This solves the "problem" and allows me to 
update my web2py apps without reloading uwsgi (of course there will be 
cases where reloading will have to be done).


Now, regarding the setup. You say multiple apps --> multiple uwsgi 
processes, but I think my configuration is different (and maybe wrong). 

What I have is the result of having followed this steps of the book:
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Nginx

So I have:
 - one only web2py instance
 - one only uwsgi configuration file, as in the book: /etc/uwsgi/web2py.xml

Then, I installed several web2py apps under /var/www/web2py/applications, 
and I've configured routes.py to serve each web2py app through a specific 
domain. Inside nginx's configuration, I've defined one virtual host (server 
block) per domain, and all of them make an uwsgi_pass to the same socket, 
thus, all web2py apps are using the same socket.

I also have uwsgi emperor mode. I know, what's the point of having emperor 
mode if I have only one uwsgi configuration file? It's because I'm planning 
to run two more web2py instances, but not right now. Right now, emperor 
mode is only watching the file /etc/uwsgi/web2py.xml. That file is pretty 
much like the one showed by the book. So, when I say "reload or restart 
uwsgi" I mean touching that file, in order to emperor reloading the 
configuration.

Is this setup correct (or at least acceptable) for deploying multiple 
web2py apps?


El miércoles, 17 de junio de 2015, 18:23:59 (UTC-3), Niphlod escribió:
>
> there's a distinct lack of singular/plurals in your statements that may 
> pinpoint the problem.
>
> multiple apps --> multiple uwsgi processes
>
> either you "hg update" all the apps, and restart ALL uwsgi processes (more 
> a reload than a restart, hopefully, touching EACH and EVERYONE of the files 
> uwsgi watches for changes, without them being simlinked) OR for every app, 
> you hg update and then restart THE uwsgi process, touching the single file 
> that reloads THAT app.
>
> IMHO you'd need to do the latter, without EVER simlinking anything. There 
> are tons of deploy facilities lying around that will make symlinking an 
> old-fashioned thingy.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to