not much there, really. do whatever you’d do for a Rails app (http://capify.org/getting-started/rails), except put this in your deploy.rb:
namespace :deploy do task :finalize_update do run "chmod -R g+w #{release_path}" run "rm -rf #{release_path}/log && ln -s #{deploy_to}/shared/log #{release_path}/log" end task :restart, :roles => :app do run "#{deploy_to}/shared/system/stop" run "#{deploy_to}/shared/system/start" end end
“:finalize_update” does a bunch of things for Rails you don’t need for
Adhearsion (like linking the “public” directory etc). The above seems
to be enough.
“:restart” calls these two simple scripts:
start:
ahn start daemon /home/ahn/call_center/current --pid-file=/home/ahn/call_center/shared/pids/adhearsion.pid
stop:
#!/usr/bin/env ruby
pid_file = '/home/ahn/call_center/shared/pids/adhearsion.pid' if File.exist?(pid_file) system "kill `cat #{pid_file}`" end
Works for me atm.