Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 990
kakubei Avatar asked Jun 25 '12 17:06

kakubei


1 Answers

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.

like image 103
OpenCoderX Avatar answered Oct 27 '22 18:10

OpenCoderX