public
Description: examples of some of the crazy awesome things you can do with God
Clone URL: git://github.com/jnewland/god_examples.git
god_examples / rails / config / deploy.rb
100644 40 lines (31 sloc) 0.786 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
set :application, "test"
set :deploy_to, "/var/www/apps/#{application}"
 
#no scm for this little test app
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_exclude, ".git/*"
 
set :user, "deploy"
set :runner, user
default_run_options[:pty] = true
 
role :app, "test.jnewland.com"
role :web, "test.jnewland.com"
role :db, "test.jnewland.com", :primary => true
 
require 'san_juan'
san_juan.role :app, %w(mongrels)
 
#overwrite the default start, stop, and restart tasks to use god
namespace :deploy do
 
  desc "Use god to restart the app"
  task :restart do
    god.all.reload
    god.app.mongrels.restart
  end
 
  desc "Use god to start the app"
  task :start do
    god.all.start
  end
 
  desc "Use god to stop the app"
  task :stop do
    god.all.terminate
  end
 
end