if its just for displaying a static page during upgrade i would also choose the way jonathan recommended.
there is at least two killer-arguments to do so: - its simple - its gracefully possible simple I: - unlink your webapp-config in ``/etc/nginx/sites-enabled`` - link your maintenance-config to ``/etc/nginx/sites-enabled`` graceful I: - ``service nginx reload`` simple II - upgrade webapp - ``service uwsgi reload`` - unlink your maintenance-config in ``/etc/nginx/sites-enabled`` - link your webapp-config to ``/etc/nginx/sites-enabled`` graceful II: - ``service nginx reload`` advanced: if you want it professional, you can use something like https://github.com/jordansissel/fpm to build your own debian package (supersweet...) and perform all the actions above in pre-install and post-install hooks. i’m using the fpm to build packages, but i did not implement the graceful restart using a static page yet. but for example my db-schema migration is running in the post-install hook which works excellent. On 15.07.2013, at 17:15, Jonathan Vanasco <[email protected]> wrote: > The easiest way is to enter/exit maintenance mode on the port 80 server ( > nginx / apache ) > > with nginx, it's popular to 'touch' a file to enter maintenance mode -- so if > "/var/www/sites/maintenance" exists, nginx will dispatch to another set of > rules. some people will also just use a different nginx config file. > > using a staging site is better, but if you want to test the same exact > deployment ( which is useful ), i would have nginx/apache host two separate > domains that proxy to the same destination: > > * www.domain.com ( public ) > * admin.domain.com ( htaccess with a rotating user/pass ) > > you can set your routing rules so that when you go into maintenance mode, > everything under your "public" site is rewritten to "/maintenance" [ either > apache or pyramid ], but the admin.domain.com requests aren't changed. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
