Sha256: 25851935ccebbd8ba148f7d2fcbdc6522617131fd033ed4b411133e7ef27de98

Contents?: true

Size: 764 Bytes

Versions: 17

Compression:

Stored size: 764 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}"
    run "#{sudo} rm -f /etc/nginx/sites-enabled/default"
  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

17 entries across 17 versions & 1 rubygems

Version Path
pixelforce_cms-2.2 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-2.0 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-1.0 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.9 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.8 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.7 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.6 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.5 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.4 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.3 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.2 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.9.1 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.8 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.7 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.5 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.4 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
pixelforce_cms-0.9.2 lib/generators/pixelforce_cms/templates/recipes/unicorn.rb