Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (62 sloc) 2.081 kb
##########
# This capfile is intended for use by our CI server!
#
# DO NOT USE MANUALLY
##########
load 'deploy'
# Basic settings
set :application, "kohana-forums"
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_dir, "/tmp/#{application}/"
set :user, "www-forum.kohanaframework.org"
set :runner, "www-forum.kohanaframework.org"
set :use_sudo, false
# Stages
task :production do
role :app, "forum.kohanaframework.org"
role :db, "forum.kohanaframework.org", {:primary=>true}
role :web, "forum.kohanaframework.org"
set :deploy_to, "/home/www-forum.kohanaframework.org"
end
# Workaround a cap bug..
Dir.mkdir("/tmp/#{application}/") unless File.directory?("/tmp/#{application}/")
# Hooks
before "deploy:setup", "vanilla:before_setup"
after "deploy:finalize_update", "vanilla:finalize_update"
after "deploy:migrate", "vanilla:migrate"
# Vanilla specific deployment ..
namespace :vanilla do
task :before_setup, :except => { :no_release => true } do
shared_children.push("uploads")
shared_children.push("conf")
end
task :finalize_update, :except => { :no_release => true } do
#run "rm -rf #{latest_release}/conf"
run "ln -s #{shared_path}/conf/config.php #{latest_release}/conf/config.php"
run "rm -rf #{latest_release}/uploads"
run "ln -s #{shared_path}/uploads #{latest_release}/uploads"
end
task :migrate, :roles => :db, :only => { :primary => true } do
run "curl -I --silent http://forum.kohanaframework.org/utility/update | grep HTTP | cut -d' ' -f2"
end
end
# Override some defaults..
namespace :deploy do
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
end
task :restart, :roles => :app, :except => { :no_release => true } do
sudo "service php5-fpm restart"
end
task :start, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :stop, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :migrate, :roles => :db, :only => { :primary => true } do
# do nothing
end
end
Jump to Line
Something went wrong with that request. Please try again.