smartcloud 0.0.68 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 052ca956033d9e55075c61276b569b157d68cc62895551e338794b33d1924c09
|
4
|
+
data.tar.gz: bf253135cb04e61b91ffce192e390bd7d924a6e51709e1098f5bd865c56da28c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00befee63000beb0e64cb83b05ea43a6403850270fc21b9703bb6c0f3ebbc5f859ee883031e2b909e168e0d3448d60405d904a8539624aae7fe7abb52471335d
|
7
|
+
data.tar.gz: b87c05603378b5249fbfea06dfa4f4801b2c587b4e723e03fce6b8155e86096eb47c7bb7b771a93f6ba4cbad749997f0a665ffb07f9c934469664f46f6a87718
|
@@ -3,7 +3,9 @@ MAINTAINER Timeboard
|
|
3
3
|
|
4
4
|
############### INSTALL RUBY ON RAILS ESSENTIALS ###############
|
5
5
|
|
6
|
-
RUN apk add --update
|
6
|
+
RUN apk add --update build-base && \
|
7
|
+
apk add --update ruby-mysql2 && \
|
8
|
+
apk add --update tzdata && \
|
7
9
|
rm -rf /var/cache/apk/*
|
8
10
|
|
9
11
|
# Install bundler and foreman gems
|
@@ -198,7 +198,7 @@ module Smartcloud
|
|
198
198
|
end
|
199
199
|
end
|
200
200
|
end
|
201
|
-
|
201
|
+
|
202
202
|
def self.destroy_app(appname)
|
203
203
|
if Smartcloud::Docker.running?
|
204
204
|
# Stopping & Removing old container
|
@@ -259,7 +259,7 @@ module Smartcloud
|
|
259
259
|
app_versions = Dir.glob('*').select { |f| File.directory? f }.sort
|
260
260
|
destroy_count = app_versions.count - ENV['KEEP_RELEASES'].to_i
|
261
261
|
if destroy_count > 0
|
262
|
-
print "-----> Deleting older application
|
262
|
+
print "-----> Deleting older application releases ... "
|
263
263
|
destroy_count.times do
|
264
264
|
FileUtils.rm_r(File.join(Dir.pwd, app_versions.shift))
|
265
265
|
end
|
@@ -298,15 +298,16 @@ module Smartcloud
|
|
298
298
|
if File.exist? "#{container_path_with_now_date}/bin/rails"
|
299
299
|
# Stopping & Removing container
|
300
300
|
self.stop_app(appname)
|
301
|
-
|
301
|
+
|
302
302
|
# Starting Rails App
|
303
303
|
self.start_app_rails(appname, container_path, container_path_with_now_date)
|
304
304
|
end
|
305
|
-
end
|
305
|
+
end
|
306
306
|
end
|
307
307
|
|
308
|
-
#
|
309
|
-
# If the app was finally started, then
|
308
|
+
# These two lines are important to stop and remove container and then cancel pre-receive push if finally the app could not be started.
|
309
|
+
# If the app was finally started, then these two lines should never be executed.
|
310
|
+
self.stop_app(appname)
|
310
311
|
exit 1
|
311
312
|
end
|
312
313
|
|
@@ -325,9 +326,9 @@ module Smartcloud
|
|
325
326
|
end
|
326
327
|
end
|
327
328
|
end
|
328
|
-
|
329
|
+
|
329
330
|
def self.start_app_rails(appname, container_path, container_path_with_now_date)
|
330
|
-
puts "-----> Ruby on Rails
|
331
|
+
puts "-----> Ruby on Rails application detected"
|
331
332
|
|
332
333
|
# Setup rails env
|
333
334
|
env_path = "#{container_path}/env"
|