require 'bundler/capistrano'
require 'rvm/capistrano'
load 'deploy/assets'
set :application, "#####"
set :repository, "###@00.000.00.000:#{application}.git"
set :scm, :git
set :user, "####"
set :use_sudo, false
set :deploy_to, "/home/www/#{application}"
server "37.143.13.215", :app, :web, :db, :primary => true
set :keep_releases, 5
set :deploy_via, :remote_cache
set :rvm_ruby_string, :local
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
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
after "deploy:update", "deploy:cleanup"
before 'deploy:setup', 'rvm:install_rvm'
before 'deploy:setup', 'rvm:install_ruby'
after "deploy", "deploy:migrate"