Created
November 16, 2012 22:20
-
-
Save natew/4091414 to your computer and use it in GitHub Desktop.
deploy.rb
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
# Uncomment if you are using Rails' asset pipeline | |
# load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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
# Bundler | |
require "bundler/capistrano" | |
# Pretty colors | |
# require 'capistrano_colors' | |
# Assets | |
load 'deploy/assets' | |
# For if you need to enter passwords | |
default_run_options[:pty] = true | |
set :user, "nwienert" | |
set :application, "2u" | |
set :domain, "199.19.19.19" | |
set :repository, "ssh://[email protected]/var/git/#{application}.git" | |
set :deploy_to, "/var/www/#{application}.fm/web" | |
set :scm, :git | |
set :branch, 'master' | |
set :scm_verbose, false | |
set :rails_env, "production" | |
set :keep_releases, 3 | |
role :web, domain | |
role :app, domain | |
role :db, domain, :primary => true # This is where Rails migrations will run | |
namespace :deploy do | |
task :start, :roles => :app do | |
surun "cd #{current_path};RAILS_ENV=production bundle exec thin start -C config/thin.yml" | |
end | |
task :stop, :roles => :app do | |
surun "cd #{current_path};RAILS_ENV=production bundle exec thin stop -C config/thin.yml" | |
end | |
desc "Restart Application" | |
task :restart, :roles => :app do | |
surun "cd #{current_path};RAILS_ENV=production bundle exec thin restart -C config/thin.yml" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment