Sha256: 5fee73611febacc4eb4c934ec587c79ee96b8fb84edd42e729342221ad8ec16c
Contents?: true
Size: 962 Bytes
Versions: 7
Compression:
Stored size: 962 Bytes
Contents
require 'bundler/capistrano' require 'rvm/capistrano' set :application, '<%= @application %>' set :scm, :git set :repository, 'https://github.com/rubyonrails3/unicorn_deployer' set :branch, :master server 'localhost', :web, :app, :db, :primary => true set :user, '<%= @user %>' set :deploy_to, "/home/#{user}/#{application}" set :use_sudo, false set :deploy_via, :remote_cache set :ssh_options, { :forward_agent => true } default_run_options[:pty] = true namespace :deploy do %w[start stop restart].each do |command| desc "#{command} unicorn server" task command, :roles => :app, :except => { :no_release => true } do run "/etc/init.d/unicorn_#{application} #{command}" end end task :setup_config, :roles => :app do run "#{sudo} ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}" run "#{sudo} ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}" end end
Version data entries
7 entries across 7 versions & 1 rubygems