Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Configure Capistrano to Deploy from Local Git Repository?

What changes do I need to make to the deploy.rb file below to make it deploy my app from a local git repo? If I can't deploy from a local repo, can I have capistrano use the working copying instead?

set :application, "my_app" set :repository, "." set :local_repository, "file:///path/to/application/.git" set :deploy_to, "/data/www/apps/#{application}" set :deploy_via, :copy set :copy_cache, true set :user, "dane" set :use_sudo, false  set :scm, :git # Should I change this to :none set :branch, "master" 
like image 709
DaneS Avatar asked Apr 03 '11 20:04

DaneS


People also ask

How do I publish a local repository remote?

Push a new Git branch to a remote repoClone the remote Git repo locally. Create a new branch with the branch, switch or checkout commands. Perform a git push with the –set-upstream option to set the remote repo for the new branch. Continue to perform Git commits locally on the new branch.


1 Answers

That's easy:

set :scm, :none set :repository, "." set :deploy_via, :copy 

Simply run Capistrano from the root of your project.

like image 96
Ariejan Avatar answered Oct 06 '22 11:10

Ariejan