Skip to content

Instantly share code, notes, and snippets.

@benoror
Created March 3, 2011 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benoror/852286 to your computer and use it in GitHub Desktop.
Save benoror/852286 to your computer and use it in GitHub Desktop.
File: benoror@macmini:~/simpleapp/config/deploy.rb
default_run_options[:pty] = true
set :user, 'benoror'
set :domain, 'simpleapp.com'
set :application, 'simpleapp'
# the rest should be good
set :repository, "#{user}@#{domain}:#{application}.git"
set :deploy_to, "/home/#{user}/#{domain}"
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
#set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
server domain, :app, :web, :db, :primary => true
after "deploy:restart", "deploy:search_index"
namespace :deploy do
desc "Restart Passenger"
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
desc "Index Search"
task :search_index, :roles => :app do
run "cd #{current_path} && rake ts:index RAILS_ENV=production"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment