smartcloud 0.0.180 → 0.0.185
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartcloud/grids/buildpacker.rb +6 -15
- data/lib/smartcloud/grids/runner.rb +9 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c484a6fcf7dcb984273371aa62fdd8276a1ac34f8198e7bd14b54e6ca3c6f7a2
|
4
|
+
data.tar.gz: f003009d8c5849c28540a4c7e807540015afdda3996d59464cf075be16c67f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84e907973d6c90a7a8b72ff84c7b21d92ff9a1e57d8b63947ad26490473c6f506caad65fa83dad6a9f750f7e8c6da154dcd93da2d28748c081ec6e8b01f5483
|
7
|
+
data.tar.gz: e35384f303b0d2b381371c412672686ff1ba8c199fad3097063694b90e6ce3ff3b41351a09da38a0d10acf38c5b7a2a62785701ab87acc6d62fc4c280ac02151
|
@@ -26,7 +26,6 @@ module Smartcloud
|
|
26
26
|
|
27
27
|
# Perform bundle install
|
28
28
|
def bundle_install?
|
29
|
-
logger.info ""
|
30
29
|
logger.info "Performing bundle install ..."
|
31
30
|
|
32
31
|
set_logger_formatter_tabs
|
@@ -47,7 +46,6 @@ module Smartcloud
|
|
47
46
|
|
48
47
|
# Perform pre-compiling of assets
|
49
48
|
def precompile_assets?
|
50
|
-
logger.info ""
|
51
49
|
logger.info "Installing Javascript dependencies & pre-compiling assets ..."
|
52
50
|
|
53
51
|
set_logger_formatter_tabs
|
@@ -68,31 +66,24 @@ module Smartcloud
|
|
68
66
|
|
69
67
|
# Perform starting of web server
|
70
68
|
def start_web_server?
|
71
|
-
logger.debug ""
|
72
69
|
logger.debug "Starting Web Server ..."
|
73
70
|
|
74
71
|
# Remove server.pid if it exists
|
75
72
|
FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
|
76
73
|
|
77
74
|
# if system("god -c Godfile -D")
|
78
|
-
logger.info ""
|
79
75
|
logger.info "Launched Application ... Success."
|
80
|
-
|
76
|
+
return true
|
81
77
|
# end
|
82
|
-
return false
|
78
|
+
# return false
|
83
79
|
end
|
84
80
|
|
85
81
|
def set_logger_formatter_arrow
|
86
82
|
logger.formatter = proc do |severity, datetime, progname, message|
|
87
|
-
severity_text =
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
SYMBOL_WARN = "\u{2753}"
|
92
|
-
SYMBOL_ERROR, SYMBOL_FATAL = "\u{274c}"
|
93
|
-
symbol_text = (message == "") ? "" : Object.const_get("SYMBOL_#{severity}")
|
94
|
-
|
95
|
-
"\t\t\t\t#{symbol_text} #{severity_text}#{message}\n"
|
83
|
+
severity_text = { "DEBUG" => "\u{1f527} #{severity}:", "INFO" => " \u{276f}", "WARN" => "\u{2757} #{severity}:",
|
84
|
+
"ERROR" => "\u{274c} #{severity}:", "FATAL" => "\u{2b55} #{severity}:", "UNKNOWN" => "\u{2753} #{severity}:"
|
85
|
+
}
|
86
|
+
"\t\t\t\t#{severity_text[severity]} #{message}\n"
|
96
87
|
end
|
97
88
|
end
|
98
89
|
|
@@ -220,15 +220,10 @@ module Smartcloud
|
|
220
220
|
|
221
221
|
def self.prereceive_app(appname, username, oldrev, newrev, refname)
|
222
222
|
logger.formatter = proc do |severity, datetime, progname, message|
|
223
|
-
severity_text =
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
SYMBOL_WARN = "\u{2753}"
|
228
|
-
SYMBOL_ERROR, SYMBOL_FATAL = "\u{274c}"
|
229
|
-
symbol_text = (message == "") ? "" : Object.const_get("SYMBOL_#{severity}")
|
230
|
-
|
231
|
-
"\t\t\t\t#{symbol_text} #{severity_text}#{message}\n"
|
223
|
+
severity_text = { "DEBUG" => "\u{1f527} #{severity}:", "INFO" => " \u{276f}", "WARN" => "\u{2757} #{severity}:",
|
224
|
+
"ERROR" => "\u{274c} #{severity}:", "FATAL" => "\u{2b55} #{severity}:", "UNKNOWN" => "\u{2753} #{severity}:"
|
225
|
+
}
|
226
|
+
"\t\t\t\t#{severity_text[severity]} #{message}\n"
|
232
227
|
end
|
233
228
|
|
234
229
|
# Load vars and environment
|
@@ -296,7 +291,6 @@ module Smartcloud
|
|
296
291
|
end
|
297
292
|
|
298
293
|
def self.start_app_rails(appname, container_path, container_path_with_version)
|
299
|
-
logger.info ""
|
300
294
|
logger.info "Ruby on Rails application detected."
|
301
295
|
|
302
296
|
# Setup rails env
|
@@ -310,9 +304,10 @@ module Smartcloud
|
|
310
304
|
system("grep -q '^RAILS_MASTER_KEY=' #{env_path} || echo 'RAILS_MASTER_KEY=yourmasterkey' >> #{env_path}")
|
311
305
|
logger.warn "Please set your RAILS_MASTER_KEY env var for this rails app." if system("grep -q '^RAILS_MASTER_KEY=yourmasterkey' #{env_path}")
|
312
306
|
|
313
|
-
# Setup
|
307
|
+
# Setup app folders. If this is not created then docker will create it while running the container,
|
314
308
|
# but the folder will have root user assigned instead of the current user.
|
315
|
-
FileUtils.mkdir_p("#{container_path}/
|
309
|
+
FileUtils.mkdir_p("#{container_path}/app/vendor/bundle")
|
310
|
+
FileUtils.mkdir_p("#{container_path}/app/public")
|
316
311
|
|
317
312
|
# Setup Godfile
|
318
313
|
unless File.exist? "#{container_path_with_version}/Godfile"
|
@@ -336,7 +331,8 @@ module Smartcloud
|
|
336
331
|
--expose='5000' \
|
337
332
|
--volume='#{Smartcloud.config.user_home_path}/.smartcloud/config:#{Smartcloud.config.user_home_path}/.smartcloud/config' \
|
338
333
|
--volume='#{container_path_with_version}:/app' \
|
339
|
-
--volume='#{container_path}/
|
334
|
+
--volume='#{container_path}/app/vendor/bundle:/app/vendor/bundle' \
|
335
|
+
--volume='#{container_path}/app/public:/app/public' \
|
340
336
|
--workdir='/app' \
|
341
337
|
--restart='always' \
|
342
338
|
--network='nginx-network' \
|