For excessively paranoid client authentication.
See other tutorials.
| set :rails_env, "production" | |
| set :passenger_port, 9292 | |
| set :passenger_cmd, "#{bundle_cmd} exec passenger" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{passenger_cmd} start -e #{rails_env} -p #{passenger_port} -d" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| #!/usr/bin/env ruby | |
| # -*- ruby -*- | |
| require 'rubygems' | |
| require 'daemon_spawn' | |
| RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
| class DelayedJobWorker < DaemonSpawn::Base | |
| def start(args) | |
| ENV['RAILS_ENV'] ||= args.first || 'development' |