开发者

Take Rails app offline during deployment

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:

  1. Pull the source code.
  2. Take the app offline.
  3. Backup the database and (maybe some other stuff).
  4. Symlink everything.
  5. Run migrations.
  6. Minimise JS/CSS and do other processing.
  7. Restart the server.
  8. 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜