Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (60 sloc) 1.908 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
##########
# This capfile is intended for use by our CI server!
#
# DO NOT USE MANUALLY
##########
load 'deploy'

# Basic settings
set :application, "kohana-website"
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_dir, "/tmp/#{application}/"
set :user, "kohana"
set :runner, "kohana"
set :use_sudo, false

# Stages
task :production do
role :app, "vm01.kohanaframework.org"
role :db, "vm01.kohanaframework.org", {:primary=>true}
role :web, "vm01.kohanaframework.org"

set :deploy_to, "/home/kohana/sites/www.kohanaframework.org/"
end

task :staging do
role :app, "vm01.kohanaframework.org"
role :db, "vm01.kohanaframework.org", {:primary=>true}
role :web, "vm01.kohanaframework.org"

set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
end

# Workaround a cap bug..
Dir.mkdir("/tmp/#{application}/") unless File.directory?("/tmp/#{application}/")

# Hooks
before "deploy:setup", "kohana:before_setup"
after "deploy:finalize_update", "kohana:finalize_update"

# Kohana specific deployment ..
namespace :kohana do
task :before_setup, :except => { :no_release => true } do
shared_children.push("upload")
end

task :finalize_update, :except => { :no_release => true } do
run "rm -rf #{latest_release}/application/logs"
run "ln -s #{shared_path}/log #{latest_release}/application/logs"

run "rm -rf #{latest_release}/upload"
run "ln -s #{shared_path}/upload #{latest_release}/upload"
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
# do nothing
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
end
Something went wrong with that request. Please try again.