public
Clone URL: git://github.com/mvanholstyn/mhs_deployment.git
Updated god config to not use global constants so that multiple configs 
can be loaded at once
mvanholstyn (author)
Mon Jun 23 13:40:21 -0700 2008
commit  f94c6100b3927bf0a2745a06d1c21cc8f1c1bd43
tree    729cbc9e17fbf51a6622ad4ee4693f98334d7cfe
parent  d724881419eaac29c189824de70fb5ef49d9ca13
...
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
...
31
32
33
34
35
 
36
37
38
39
40
 
 
 
 
41
42
43
44
45
 
 
 
 
46
47
48
...
3
4
5
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
8
9
10
 
 
 
11
12
13
14
...
16
17
18
 
 
19
20
 
 
 
 
21
22
23
24
25
 
 
 
 
26
27
28
29
30
31
32
0
@@ -3,27 +3,12 @@
0
 
0
 # run with: god -c /path/to/god.god
0
 
0
-APPLICATION = <%= application.inspect %>
0
-SERVER = <%= "TODO".inspect %>
0
-RAILS_ENV = <%= rails_env.inspect %>
0
-RAILS_ROOT = <%= current_path.inspect %>
0
-PORTS = <%=
0
- ports = []
0
- mongrel_servers.times do |i|
0
- ports << mongrel_port + i
0
- end
0
- ports.inspect
0
-%>
0
-MONGREL_ENV = <%= mongrel_environment.inspect %>
0
-
0
 God::Contacts::Email.message_settings = {
0
- :from => "god@#{SERVER}"
0
+ :from => "god"
0
 }
0
  
0
 God::Contacts::Email.server_settings = {
0
- :address => 'localhost',
0
- :port => 25,
0
- :domain => SERVER
0
+ :address => 'localhost', :port => 25
0
 }
0
 
0
 God.contact(:email) do |c|
0
@@ -31,18 +16,17 @@ God.contact(:email) do |c|
0
   c.email = 'mvanholstyn@mutuallyhuman.com'
0
 end
0
 
0
-# Watches for Trunk mongrels
0
-PORTS.each do |port|
0
+[<%= mongrel.ports.join(',') %>].each do |port|
0
   God.watch do |w|
0
- w.name = "#{RAILS_ENV}-mongrel-#{port}"
0
- w.group = "#{RAILS_ENV}-mongrels"
0
- w.uid = APPLICATION
0
- w.gid = APPLICATION
0
+ w.name = "<%= rails_env %>-mongrel-#{port}"
0
+ w.group = "<%= rails_env %>-mongrels"
0
+ w.uid = "<%= mongrel_user %>"
0
+ w.gid = "<%= mongrel_group %>"
0
     w.interval = 30.seconds
0
- w.start = "mongrel_rails start -d -e #{MONGREL_ENV} -c #{RAILS_ROOT} -p #{port} -P tmp/pids/mongrel.#{port}.pid -l log/mongrel.#{port}.log"
0
- w.stop = "mongrel_rails stop -P #{RAILS_ROOT}/tmp/pids/mongrel.#{port}.pid"
0
- w.restart = "mongrel_rails restart -P #{RAILS_ROOT}/tmp/pids/mongrel.#{port}.pid"
0
- w.pid_file = File.join(RAILS_ROOT, "tmp/pids/mongrel.#{port}.pid")
0
+ w.start = "mongrel_rails start -d -e <%= mongrel_environment %> -c <%= current_path %> -p #{port} -P tmp/pids/mongrel.#{port}.pid -l log/mongrel.#{port}.log"
0
+ w.stop = "mongrel_rails stop -P <%= current_path %>/tmp/pids/mongrel.#{port}.pid"
0
+ w.restart = "mongrel_rails restart -P <%= current_path %>/tmp/pids/mongrel.#{port}.pid"
0
+ w.pid_file = File.join("<%= current_path %>", "tmp/pids/mongrel.#{port}.pid")
0
     w.start_grace = 10.seconds
0
     w.restart_grace = 10.seconds
0
  

Comments

    No one has commented yet.