Skip to content

Instantly share code, notes, and snippets.

@handersonbf
Created January 18, 2012 15:17
Show Gist options
  • Select an option

  • Save handersonbf/1633478 to your computer and use it in GitHub Desktop.

Select an option

Save handersonbf/1633478 to your computer and use it in GitHub Desktop.
Exemplo deploy com capistrano
set :application, "ProjetoEstudoRails"
set :scm, :git
set :scm_username, "[email protected]"
set :repository, "[email protected]:handersonbf/ProjetoEstudoRails.git"
set :branch, "master"
set :git_enable_submodules, 1
set :deploy_to, "/home/deployer/apps/"
#set :deploy_via, :remote_cache
set :user, "root"
set :runner,"root"
set :password,"senha"
set :use_sudo, false
ssh_options[:paranoid] = false
default_run_options[:pty] = true
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "###.###.##.##" # Your HTTP server, Apache/etc
role :app, "###.###.##.##" # This may be the same as your `Web` server
role :db, "###.###.##.##", :primary => true # This is where Rails migrations will run
#role :db, "127.0.0.1"
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
end
[:start, :stop].each do |t|
desc "#{t} task is a no­op with mod_rails"
task t, :roles => :app do ; end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment