-
-
Save quellhorst/27125 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
# multi environment merb deployment with vlad and god | |
set :application, "ninja" | |
set :deploy_to, "/data/ninja" | |
set :code_repo, 'git@github.com:atmos/ninja.git' | |
set :revision, "origin/master" | |
set :user, "ey" | |
set :use_sudo, false | |
task :production do | |
role :app, 'eyYY-s00020' | |
role :app, 'eyYY-s00021' | |
set :deploy_host, 'eyYY-s00020' | |
set :merb_env, 'production' | |
end | |
task :staging do | |
role :app, 'eyXX-s00224' | |
set :deploy_host, 'eyXX-s00224' | |
set :merb_env, 'staging' | |
end | |
task :deploy => [ :define_roles, 'vlad:stop', 'vlad:update', 'vlad:symlink_configs', 'vlad:start'] | |
task :long_deploy => [ :define_roles, 'vlad:stop', 'vlad:update', 'vlad:merb:symlink_configs', 'vlad:dm:migrate', 'vlad:start'] | |
remote_task :tail, :roles => [:app] do | |
run "tail -n1000 -f #{current_path}/log/#{merb_env}.log" | |
end | |
task :define_roles do | |
raise "You have to specify an environment name 'rake production #{application}:deploy'" if merb_env.nil? or merb_env.empty? | |
role :web, deploy_host | |
role :db, deploy_host, :primary => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment