Reputation: 3056
I'm having a bit trouble while using capistrano, What I need to do is deploy from a Repository which resides in my local machine to my private VPS
So far my deploy.rb file looks like this:
set :application, "store"
set :repository, "/home/jose/linode/store"
#set :local_repository, "/home/jose/linode/store"
set :branch, "master"
set :scm, :git
set :user, "root"
set :scm_username, "my_git_user"
set :use_sudo, false
set :deploy_to, '/home/www/store'
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "169.255.255.255" # Your HTTP server, Apache/etc
role :app, "169.255.255.255" # This may be the same as your `Web` server
role :db, "169.255.255.255", :primary => true # This is where Rails migrations will run
#role :db, "your slave db-server here"
However, this is failing, it's outputting the following error:
**** [169.255.255.255 :: err] fatal: repository '/home/jose/linode/store' does not exist**
This leads me to believe that it's looking for the repository in the remote server!
What configuration is needed to tell Capistrano that the Repo is located right here, not on: 169.255.255.255?
Many thanks in advance!
Upvotes: 2
Views: 4635
Reputation: 17790
The setting that you are looking for is:
set :deploy_via, :copy
That creates a local .tar.gz
file in your /tmp/
directory and pushes that to the server during deployment.
If you look at the source code, specifically lib/capistrano/recipes/deploy/strategy/copy.rb
, you'll see a large block of comments beginning with the following.
# This class implements the strategy for deployments which work # by preparing the source code locally, compressing it, copying the # file to each target host, and uncompressing it to the deployment # directory.
This article was written for an older version, but it's still quite interesting and covers deployment options and optimizations.
Upvotes: 3