Sha256: 5ad48d233ea5cce372b3f1fec9a5cf9a99346c0bb629cea60054545b60a7d659

Contents?: true

Size: 994 Bytes

Versions: 5

Compression:

Stored size: 994 Bytes

Contents

namespace :passenger do
  desc 'Start passenger'
  task :start do
    on roles(fetch(:passenger_roles)) do
      within current_path do
        execute fetch(:passenger_cmd), 'start', '-e', fetch(:passenger_env), '-p', fetch(:passenger_port), '-d'
      end
    end
  end

  desc 'Stop passenger'
  task :stop do
    on roles(fetch(:passenger_roles)) do
      within current_path do
        execute fetch(:passenger_cmd), 'stop', '-p', fetch(:passenger_port)
      end
    end
  end

  desc 'Restart passenger'
  task :restart do
    on roles(fetch(:passenger_roles)) do
      within current_path do
        if test " [ -f tmp/pids/passenger.#{fetch(:passenger_port)}.pid ] "
          invoke 'passenger:stop'
        end

        invoke 'passenger:start'
      end
    end
  end
end

namespace :load do
  task :defaults do
    set :passenger_cmd,   'bundle exec passenger'
    set :passenger_env,   -> { fetch(:stage) }
    set :passenger_port,  9292
    set :passenger_roles, :app
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mascherano-1.2.0 lib/mascherano/tasks/passenger.cap
mascherano-1.1.0 lib/mascherano/tasks/passenger.cap
mascherano-1.0.4 lib/mascherano/tasks/passenger.cap
mascherano-1.0.3 lib/mascherano/tasks/passenger.cap
mascherano-1.0.2 lib/mascherano/tasks/passenger.cap