## [Capistrano] Auto Deployment for nginx + thin

Nginx + Thin are greate, but auto deployment makes them even awesome! Here's HOW-TOs by using capistrano:

First assumed that you've set up a Nginx-Thin server, if you don't, please read this post.

Typically, there're few things you will always do after cap deploy:

1. Bundle install: This is most important, otherwise your app might not work at all. This part is included in this post

2. Copy config files: database.yml, thin_config.yml, some scripts... and so on.

3. Precompile assets: This is of course you must do for performance, I think maybe it could be done before deploy but anyway I do this after cap deploy.

4. Migration

5. Restart thin servers and nginx server.

And we're going to make these things done automatically. Here's a sample configuration for deploy.rb