Sha256: f7757df37ba06e9b054d08c7aca98748348feb3ffd35df63e559e132ccc77306

Contents?: true

Size: 792 Bytes

Versions: 1

Compression:

Stored size: 792 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do |configuration|

  namespace :foreman do
    desc "Export the Procfile to Ubuntu's upstart scripts"
    task :export, roles: :app do
      run "cd #{release_path} && sudo bundle exec foreman export upstart /etc/init/sites -a #{application} -u #{user} -l #{shared_path}/log"
    end

    desc "Start the application services"
    task :start, roles: :app do
      sudo "service sites/#{application} start"
    end

    desc "Stop the application services"
    task :stop, roles: :app do
      sudo "service sites/#{application} stop"
    end

    desc "Restart the application services"
    task :restart, roles: :app do
      run "sudo service sites/#{application} start || sudo service sites/#{application} restart"
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-foreman-0.0.1 lib/capistrano/foreman.rb