Register now and start sharing your code snippets.
-->

Vlad deployment recipe for Phusion Passenger

Ruby posted 6 months ago by christian

   1  #
   2  # General configuration
   3  #
   4  #set :ssh_flags,             '-p 110000'
   5  set :application,           'app.xxx'
   6  set :domain,                'x.x.x.x'
   7  set :deploy_to,             '/var/www/app.xxx'
   8  set :revision,              'master'
   9  set :repository,            '/var/lib/git/repositories/app.xxx/'
  10  
  11  
  12  namespace :vlad do
  13    set :app_command, "/etc/init.d/apache2"
  14   
  15    desc 'Restart Passenger'
  16    remote_task :start_app, :roles => :app do
  17      run "touch #{current_release}/tmp/restart.txt"
  18    end
  19    
  20    desc 'Restarts the apache servers'
  21    remote_task :start_web, :roles => :app do
  22      run "sudo #{app_command} restart"
  23    end
  24  end

Tagged vlad, phusion, passenger, apache, deployment