Skip to content

Instantly share code, notes, and snippets.

@ktkaushik
Created May 4, 2012 05:47
Show Gist options
  • Select an option

  • Save ktkaushik/2592375 to your computer and use it in GitHub Desktop.

Select an option

Save ktkaushik/2592375 to your computer and use it in GitHub Desktop.
my capistrano setup for app on MongoDB
require "bundler/capistrano"
set :application, "quadmint"
set :repository, "[email protected]:quadmint"
default_run_options[:pty] = true
# set :use_sudo, false
set :scm, :git
# set :scm_command, "/usr/bin/git"
role :app , "127.0.0.1:2222"
role :web , "127.0.0.1:2222"
role :db , "127.0.0.1:2222" , :primary => true
# User vagrant for Vagrant Box.
set :user, "vagrant"
set :deploy_to, "/var/www/#{user}/#{application}"
set :deploy_via, :remote_cache
ssh_options[:forward_agent] = true
# role :db, "your slave db-server here"
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment