require 'fingercap/recipes' Capistrano::Configuration.instance(:must_exist).load do default_run_options[:pty] = true set :runner, 'app' set :user, 'deploy' set :domain, 'miller.fngtps.com' set :deploy_to, "/var/www/#{application}" role :web, domain role :app, domain role :db, domain, :primary => true namespace :deploy do desc "Stop the application (empty operation on Miller)" task :stop do end desc "Start the application" task :start do apache.restart end desc "Restart the application" task :restart do passenger.restart end desc "Make sure the permissions are correct for all the directories" task :fix_permissions do try_sudo "chown -R #{user}:wheel #{deploy_to}" try_sudo "chown -R #{fetch(:runner, "app")}:wheel #{shared_path}" end namespace :db do desc "Create the production database defined in config/database.yml." task :create do rake = fetch(:rake, "rake") run "cd #{current_path}; #{rake} RAILS_ENV=production db:create" end end end end