-
Notifications
You must be signed in to change notification settings - Fork 2
/
services.god
90 lines (73 loc) · 2.57 KB
/
services.god
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
path = File.expand_path(File.dirname(__FILE__))
BASE_URL = 'http://localhost:9000/'
MYSQL_USERNAME = ''
MYSQL_PASSWORD = ''
AUTH_SERVER_PORT = 5000
FRONTEND_SERVER_PORT = 5002
CORE_SERVER_PORT = 5003
GITHUB_PORT = 5004
SEARCH_PORT = 5005
DASHBOARD_PORT = 5006
RAILS_ENV = 'development'
# System files
# God.watch do |w|
# w.name = "redis"
# w.start = "redis-server"
# w.keepalive
# end
# Our Processes
God.watch do |w|
w.name = "authentication server"
w.start = "cd #{path}/speakeasy_bouncer/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} BASE_URL=#{BASE_URL} bundle exec thin start -p #{AUTH_SERVER_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "faye"
w.start = "cd #{path}/speakeasy_dumbwaiter/; ruby faye.rb"
w.keepalive
end
God.watch do |w|
w.name = "frontend server"
w.start = "cd #{path}/speakeasy_vaudeville/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} BASE_URL=#{BASE_URL} bundle exec thin start -p #{FRONTEND_SERVER_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "core server"
w.start = "cd #{path}/speakeasy_core/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} BASE_URL=#{BASE_URL} bundle exec thin start -p #{CORE_SERVER_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "github server"
w.start = "cd #{path}/speakeasy_github/; RAILS_ENV=development BASE_URL=#{BASE_URL} bundle exec thin start -p #{GITHUB_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "search server"
w.start = "cd #{path}/speakeasy_gumshoe/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} BASE_URL=#{BASE_URL} bundle exec thin start -p #{SEARCH_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "cheque (dashboard) server"
w.start = "cd #{path}/speakeasy_cheque/; RAILS_ENV=development BASE_URL=#{BASE_URL} bundle exec thin start -p #{DASHBOARD_PORT}"
w.keepalive
end
God.watch do |w|
w.name = "cheque subscribe"
w.start = "cd #{path}/speakeasy_cheque/; rake subscribe"
w.keepalive
end
God.watch do |w|
w.name = "gumshoe subscribe"
w.start = "cd #{path}/speakeasy_gumshoe/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} rake subscribe"
w.keepalive
end
God.watch do |w|
w.name = "search indexer"
w.start = "cd #{path}/speakeasy_gumshoe/; MYSQL_USERNAME=#{MYSQL_USERNAME} MYSQL_PASSWORD=#{MYSQL_PASSWORD} RAILS_ENV=#{RAILS_ENV} rake index"
w.keepalive
end
# God.watch do |w|
# w.name = "logger mongo db"
# w.start = "mongod"
# w.keepalive
# end