| |   |
| 1 | set :application, "git" |
| 2 | set :repository, "git://gitorious.org/gitorious/dustins-clone.git" |
| 3 | set :user, application |
| 4 | set :runner, user |
| 5 | |
| 6 | # If you aren't deploying to /u/apps/#{application} on the target |
| 7 | # servers (which is the default), you can specify the actual location |
| 8 | # via the :deploy_to variable: |
| 9 | set :deploy_to, "/data/web/rails/#{application}" |
| 10 | |
| 11 | set :scm, :git |
| 12 | set :branch, "origin/deploy" |
| 13 | set :deploy_via, :remote_cache |
| 14 | |
| 15 | role :app, "basket.west.spy.net" |
| 16 | role :web, "basket.west.spy.net" |
| 17 | role :db, "basket.west.spy.net", :primary => true |
| 18 | |
| 19 | depend :remote, :command, "git" |
| 20 | depend :remote, :gem, "SyslogLogger", ">= 1.4" |
| 21 | depend :remote, :gem, "memcache-client", ">= 1.5" |
| 22 | depend :remote, :gem, "sqlite3-ruby", "> 1.2" |
| 23 | depend :remote, :gem, "god", ">= 0.6" |
| 24 | depend :remote, :gem, "BlueCloth", ">= 1" |
| 25 | depend :remote, :gem, "mime-types", ">= 1.15" |
| 26 | depend :remote, :gem, "oniguruma", ">= 1.1" |
| 27 | depend :remote, :gem, "textpow", ">= 0.10" |
| 28 | depend :remote, :gem, "chronic", ">= 0.2.3" |
| 29 | # I'm using a FreeBSD port here... |
| 30 | # depend :remote, :gem, "rmagick", ">= x" |
| 31 | |
| 32 | desc "Starting and stopping via god." |
| 33 | deploy.task :start do |
| 34 | sudo "god load #{deploy_to}/current/config/god.config" |
| 35 | sudo "god start #{application}" |
| 36 | end |
| 37 | |
| 38 | desc "Starting and stopping via god." |
| 39 | deploy.task :restart do |
| 40 | sudo "god restart #{application}" |
| 41 | end |
| 42 | |
| 43 | desc "Starting and stopping via god." |
| 44 | deploy.task :stop do |
| 45 | sudo "god stop #{application}" |
| 46 | sudo "god remove #{application}" |
| 47 | end |
| toggle raw diff |
--- /dev/null
+++ b/config/deploy.rb
@@ -0,0 +1,47 @@
+set :application, "git"
+set :repository, "git://gitorious.org/gitorious/dustins-clone.git"
+set :user, application
+set :runner, user
+
+# If you aren't deploying to /u/apps/#{application} on the target
+# servers (which is the default), you can specify the actual location
+# via the :deploy_to variable:
+set :deploy_to, "/data/web/rails/#{application}"
+
+set :scm, :git
+set :branch, "origin/deploy"
+set :deploy_via, :remote_cache
+
+role :app, "basket.west.spy.net"
+role :web, "basket.west.spy.net"
+role :db, "basket.west.spy.net", :primary => true
+
+depend :remote, :command, "git"
+depend :remote, :gem, "SyslogLogger", ">= 1.4"
+depend :remote, :gem, "memcache-client", ">= 1.5"
+depend :remote, :gem, "sqlite3-ruby", "> 1.2"
+depend :remote, :gem, "god", ">= 0.6"
+depend :remote, :gem, "BlueCloth", ">= 1"
+depend :remote, :gem, "mime-types", ">= 1.15"
+depend :remote, :gem, "oniguruma", ">= 1.1"
+depend :remote, :gem, "textpow", ">= 0.10"
+depend :remote, :gem, "chronic", ">= 0.2.3"
+# I'm using a FreeBSD port here...
+# depend :remote, :gem, "rmagick", ">= x"
+
+desc "Starting and stopping via god."
+deploy.task :start do
+ sudo "god load #{deploy_to}/current/config/god.config"
+ sudo "god start #{application}"
+end
+
+desc "Starting and stopping via god."
+deploy.task :restart do
+ sudo "god restart #{application}"
+end
+
+desc "Starting and stopping via god."
+deploy.task :stop do
+ sudo "god stop #{application}"
+ sudo "god remove #{application}"
+end |