Skip to content

Instantly share code, notes, and snippets.

@cearls
Created July 6, 2012 22:13
Show Gist options
  • Save cearls/3063050 to your computer and use it in GitHub Desktop.
Save cearls/3063050 to your computer and use it in GitHub Desktop.
FuelPHP Capistrano Example
load 'deploy'
set :application, "ashcraft"
set :domain, "XXX.XX.XX.XXX"
set :deploy_to, "/home/admin/public_html/ashcraft/www"
set :scm, :git
set :repository, "git@github.com:flex360/ashcraft.git"
set :branch, "master"
set :deploy_via, :remote_cache
set :user, "admin"
set :use_sudo, false
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:port] = 30000
role :web, domain
role :db, domain, :primary => true
set :keep_releases, 3
namespace :deploy do
task :restart do ; end
desc "Migrate the database"
task :migrate do
run "php #{latest_release}/oil refine migrate --env=production"
end
end
after "deploy", "deploy:migrate"
after "deploy:update", "deploy:cleanup"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment