I am working on getting Capistrano running for an app but need to ask it
to
download source to a local directory and then send it to the deployment
server via scp/etc (there are reasons for this I won’t get into). Below
is
where I am and what I am trying — if anyone has done this or can show
me
where I am going wrong I’d appreciate it.
I found the following info but it does not seem to work, cap deploy
seems to
run the same as without it:
set :copy_strategy, :export
set :copy_cache, true
set :copy_exclude, “.git/*”
set :copy_cache, “/tmp/caches/myapp”
Following is my deploy.rb:
set :application, “compare”
set :repository, “[email protected]:structuralartistry/compare.git”
set :scm, “git”
set :user, “myuser” # The server’s user for deploys
set :scm_passphrase, “mypassphrase”
set :copy_strategy, :export
set :copy_cache, true
set :copy_exclude, “.git/*”
set :copy_cache, “~/Documents/ror/deployment/compare”
set :use_sudo, false
set :branch, “master”
#set :deploy_via, :remote_cache
set :deploy_to, “/home/myuser/webapps/compare”
role :web, “xxx.xxx.xxx.xxx” # Your HTTP
server,
Apache/etc
role :app, “xxx.xxx.xxx.xxx” # This may be the
same
as your Web
server
role :db, “xxx.xxx.xxx.xxx”, :primary => true # This is where Rails
migrations will run
namespace :deploy do
task :start, :roles => :app do
run “touch #{current_release}/tmp/restart.txt”
end
task :stop, :roles => :app do
# Do nothing.
end
desc “Restart Application”
task :restart, :roles => :app do
run “touch #{current_release}/tmp/restart.txt”
end
end