Skip to content

Instantly share code, notes, and snippets.

@mariusbutuc
Created February 28, 2013 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariusbutuc/5059868 to your computer and use it in GitHub Desktop.
Save mariusbutuc/5059868 to your computer and use it in GitHub Desktop.
`deploy:setup` is successful, yet `deploy:cold` / `deploy:check` fail
require 'bundler/capistrano'
default_run_options[:pty] = true
set :application, 'example'
# repo
set :scm, :git
set :repository, "git@github.com:mariusbutuc/#{application}.git"
set :branch, 'master'
# deploy
set :user, 'vagrant'
set :deploy_to, "/home/#{user}/#{application}"
set :deploy_via, :remote_cache
set :ssh_options, { forward_agent: true }
server 'example.com', :web, :app, :db, primary: true
namespace :unicorn do
desc "Start unicorn for this application"
task :start do
run "cd #{current_path} && bundle exec unicorn -c /etc/unicorn/#{application}.conf.rb -D"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment