Sha256: 2d281b50ee389c4837816e157f96dd8c13bd918f6c429de889d0b5aa3ecd8f95
Contents?: true
Size: 707 Bytes
Versions: 4
Compression:
Stored size: 707 Bytes
Contents
namespace :unicorn do desc "Install unicorn" desc "Setup unicorn configuration for this application" task :setup, roles: :web do template "unicorn_init.erb", "/tmp/unicorn" run "#{sudo} mv /tmp/unicorn /etc/init.d/#{application}" run "#{sudo} chmod +x /etc/init.d/#{application}" run "#{sudo} update-rc.d #{application} defaults" template "nginx_config.erb", "/tmp/nginx_config" run "#{sudo} mv /tmp/nginx_config /etc/nginx/sites-enabled/#{application}" end # after "deploy:setup", "nginx:setup" %w[start stop restart].each do |command| desc "#{command} unicorn" task command, roles: :web do run "/etc/init.d/#{application} #{command}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems