meroku 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meroku/cli/server.rb +1 -0
- data/lib/meroku/util.rb +9 -1
- data/lib/meroku/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f07a70cb35457a12605fcf9885eb4cc7598c0fb5
|
4
|
+
data.tar.gz: d613be7e49cf4c6ecec5c0f75389d93293f968a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37b6c1361ae5c4631118feaca1adea8860aa516c3edeeba27524d0f5aa08fed45db7e9d9f514ff8021c035975c9515885d07328006b98deac06fbfb48250194
|
7
|
+
data.tar.gz: a26af9d253cde6e069eb7a583df38af18ae92f851c159a16c46027e277bd24283dd0bee006d33bf49b3a895c6841db86a5afd167108c9e538ebff69f25225f3f
|
data/lib/meroku/cli/server.rb
CHANGED
@@ -141,6 +141,7 @@ module Meroku
|
|
141
141
|
|
142
142
|
|
143
143
|
# start customer rails apps here wipwip
|
144
|
+
ssh3(ip,"cd meroku/rails_app; RAILS_ENV=production rake meroku:start_apps")
|
144
145
|
|
145
146
|
ssh3(ip,"sudo /opt/bitnami/ctlscript.sh stop apache")
|
146
147
|
ssh3(ip,"sudo /opt/bitnami/ctlscript.sh restart nginx")
|
data/lib/meroku/util.rb
CHANGED
@@ -130,7 +130,15 @@ module Meroku
|
|
130
130
|
`sudo -i -u u#{user.id} /bin/bash -c 'curl -sSL https://get.rvm.io | bash'`
|
131
131
|
end
|
132
132
|
end
|
133
|
-
|
133
|
+
|
134
|
+
def self.start_apps
|
135
|
+
puts "DB8 Starting #{Meroku::App.all.size} apps ..."
|
136
|
+
Meroku::App.all.each do |app|
|
137
|
+
puts "DB8 Starting app #{app.id} #{app.name}"
|
138
|
+
app_owner_id = Meroku::App::Collaborator.where(app_id: app.id).first.user_id
|
139
|
+
`sudo -i -u u#{app_owner_id} /bin/bash -c 'source /opt/githooks/start_app; start_app "/home/u#{app_owner_id}/#{app.name}.git"'`
|
140
|
+
end
|
141
|
+
|
134
142
|
def public_key_exists?
|
135
143
|
File.exist?(Dir.home + "/.ssh/id_rsa.pub")
|
136
144
|
end
|
data/lib/meroku/version.rb
CHANGED