Skip to content

Instantly share code, notes, and snippets.

@awd
Created December 3, 2009 12:51
Show Gist options
  • Save awd/248133 to your computer and use it in GitHub Desktop.
Save awd/248133 to your computer and use it in GitHub Desktop.
# =============================================================================
# ENVIRONMENTS
# =============================================================================
task :dev do
desc "Deploys to the development server specifically"
puts "*** Deploying to the \033[1;42m DEVELOPMENT \033[0m server!"
set :rails_env, "development"
role :web, "dev.#{domain}"
role :app, "dev.#{domain}"
role :db, "dev.#{domain}", :primary => true
set :user, "_something_here_"
set :deploy_via, :remote_cache
set :use_sudo, false
set :keep_releases, 5
set :deploy_to, "/home/#{user}/apps/dev.#{domain}"
end
task :staging do
desc "Deploys to the staging server specifically"
puts "*** Deploying to the \033[1;42m STAGING \033[0m server!"
set :rails_env, "staging"
role :web, "staging.#{domain}"
role :app, "staging.#{domain}"
role :db, "staging.#{domain}", :primary => true
set :user, "_something_here_"
set :deploy_via, :remote_cache
set :use_sudo, false
set :keep_releases, 5
set :deploy_to, "/home/#{user}/apps/staging.#{domain}"
end
task :production do
desc "Deploys to the production server specifically"
puts "*** Deploying to the \033[1;42m PRODUCTION \033[0m server!"
set :rails_env, "production"
role :web, "#{domain}"
role :app, "#{domain}"
role :db, "#{domain}", :primary => true
set :user, "_something_here_"
set :deploy_via, :remote_cache
set :use_sudo, false
set :keep_releases, 5
set :deploy_to, "/home/#{user}/apps/#{domain}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment