Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add initial capfile..

  • Loading branch information...
commit fbe68d565061364d01f838f7a3ee9bcd3e24ac57 1 parent 80f94ad
@kiall kiall authored
Showing with 57 additions and 0 deletions.
  1. +57 −0 capfile
View
57 capfile
@@ -0,0 +1,57 @@
+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
+set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
+
+# Servers
+role :app, "vm02.kohanaframework.org"
+role :db, "vm02.kohanaframework.org", {:primary=>true}
+role :web, "vm02.kohanaframework.org"
+
+# 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("logs")
+ 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}/logs #{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
Please sign in to comment.
Something went wrong with that request. Please try again.