Created
January 13, 2009 21:41
-
-
Save bigtiger/46631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "deezmag" | |
default_run_options[:pty] = true | |
set :scm, "git" | |
set :repository, "git@github.com:obie/#{application}.git" | |
set :repository_cache, "git_cache" | |
set :deploy_via, :copy | |
set :ssh_options, { | |
:keys => ["#{ENV['HOME']}/.ec2/id_rsa-hashrocket-utility-keypair"] | |
} | |
set :git_shallow_clone, 1 | |
set :git_enable_submodules, 1 | |
set :deploy_to, "/var/www/#{application}" | |
set :user, "root" | |
role :web, "ec2-174-129-130-182.compute-1.amazonaws.com" | |
role :app, "ec2-174-129-130-182.compute-1.amazonaws.com" | |
role :db, "ec2-174-129-130-182.compute-1.amazonaws.com", :primary => true | |
set :rails_env, "production" | |
after "deploy:update_code", "deploy:symlink_config_files" | |
namespace :deploy do | |
desc "Symlink config files from shared/config to release dir" | |
task :symlink_config_files, :roles => [ :app ] do | |
run "ln -nfs #{deploy_to}/#{shared_dir}/config/database.yml #{release_path}/config/database.yml" | |
end | |
task :restart do | |
sudo "mongrel_rails cluster::restart -C #{mongrel_config}" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment