Skip to content

Instantly share code, notes, and snippets.

@7hunderbird
Created January 16, 2009 17:45
Show Gist options
  • Save 7hunderbird/48029 to your computer and use it in GitHub Desktop.
Save 7hunderbird/48029 to your computer and use it in GitHub Desktop.
set :staging_database, "app_name_staging"
set :staging_dbhost, "mysql50-staging-1"
set :production_database, "app_name_production"
set :production_dbhost, "mysql50-production-1"
task :staging do
role :web, "1.2.3.4"
role :app, "1.2.3.4"
role :db , "1.2.3.4", :primary => true
set :rails_env, "staging"
set :environment_database, defer { staging_database }
set :environment_dbhost, defer { staging_dbhost }
end
task :production do
role :web, "1.2.3.5"
role :app, "1.2.3.5"
role :db , "1.2.3.5", :primary => true
set :rails_env, "production"
set :environment_database, defer { production_database }
set :environment_dbhost, defer { production_dbhost }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment