I was just wondering if there something similar to App_Offline.htm
(it cuts all dynamic requests to the app and returns a static page) in Rails/Passenger/Capistrano to?
I am looking for the following flow when deploying to the server:
- Pull the source code.
- Take the app offline.
- Backup the database and (maybe some other stuff).
- Symlink everything.
- Run migrations.
- Minimise JS/CSS and do other processing.
- Restart the server.
- Take the app back online开发者_运维技巧 (revert step 2).
All is pretty easy with capistrano, except taking app offline and getting it back.
I could probably come up with a Rack application that could be plugged in when I need to take the app offline, but just wondering maybe such rack app already exists or maybe there is a better way of doing it?
Thanks.
It takes a bit of configuration in your web server, but Capistrano makes this pretty easy.
Capistrano to deploy rails application - how to handle long migrations?
精彩评论