Last active
December 28, 2015 03:39
-
-
Save smathy/7436725 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 :rails_env, ( ENV['RAILS_ENV'] = 'staging' ) | |
set :ssh_name, "stage.#{application}" | |
desc "Use with deploy to push live" | |
task :live do | |
set :rails_env, ( ENV['RAILS_ENV'] = 'production' ) | |
set :ssh_name, "live.#{application}" | |
end | |
before 'deploy:setup', :set_server | |
task :set_server do | |
server ssh_name, :app, :web, :db, :primary => true | |
end | |
# then make sure to add `RAILS_ENV=#{rails_env}` in front of any command line things you're running on the server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment