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

I am not familiar with Capistrano at all, I just read some basic messages about setting it up. But my question is, why bother with Capistrano if you can deploy Rails application files with a git post-receive hook?

What does Capistrano offer that the hook does not have?

I studied automated ways to deploy Rails applications without using FTP and came across git and Capistrano hooks.

Or am I missing something?

Thanks.

+6
source share
1 answer

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

Capistrano allows you to manage the deployment of your production.

A single “deploy cap” call will clone your main branch on your target machine, archive the previous version, precompile your assets, restart the passenger. Capistrano can also transfer your database or execute any number of arbitrary commands that you want on any server configured in the deploy.rb file.

Go with Capistrano to deploy to the / db application server environment, it’s easy for you to find help when you have a deployment problem.

+7
source

Source: https://habr.com/ru/post/918968/


All Articles