I have a ruby on rails app running a server and sometimes it needs to be taken down for updates/etc. As of now, one way I see to have a general display screen during update periods (when the app is down) is to substitute the files within /srv/www/ directory to just have it display a general screen everywhere that the user could possibly navigate to. I also thought of having a central controller file that connects all others (essentially a main) but this seems counter intuitive for rails.
There are many external links to these different components of the site that the user could navigate to from outside and I need to make sure that they always receive this general update screen when the app is taken down for a little.
I was wondering if anyone had any other ideas…. maybe a library or something like that, I can’t seem to find anything online. any suggestions would be appreciated.
Thanks
I use this Capistrano task:
The
app/views/admin/maintenance.html.erbfile should contain:The final step is to configure the Apache virtual host with some directives to look for the
maintenance.htmlfile and redirect all requests to it if it’s present:To put the application into maintenance mode, run
cap deploy:web:disableand to make it live again docap deploy:web:enable.