简体   繁体   中英

Rails why use capistrano when you have git post-receive hook?

I'm not familiar with Capistrano at all, I've just read some basic posts about configuring it. But my question is why bother with Capistrano if you can deploy your Rails application files using a git post-receive hook?

What does Capistrano offer that the hook doesn't?

I was looking into automated ways of deploying my Rails apps without using FTP and came across both git hooks and Capistrano.

Or am I missing something?

Thanks.

Git hooks allow you to execute script related to the git repository on a given action.

Capistrano allows you to administer your production deploys.

A single call to 'cap deploy' will clone your master branch on your target machine, archive the previous release, precompile your assets, restart passenger. Capistrano can also migrate your database, or execute any number of arbitrary commands you want on any server configured in your deploy.rb file.

Go with Capistrano for deploying to app/db server environments, you will have no trouble finding help when you get a problem with a deploy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM