smartcloud 0.1.0.beta5 → 0.1.0.rc1

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: 62498c1f68025b362a0887fe07ff16f8f43eeae99955e9ff60b2098c10d7b0da
4
- data.tar.gz: a85f8a5ac34a078ab695a6ca91db41c5aa06692b2ab45b951cd7e81f31a741a3
3
+ metadata.gz: 4094db7f5c7049fe2e91e374c2decd61707993cc47aab0053d589ab716800aff
4
+ data.tar.gz: '09707b086277545f251db67ac40aa0ae4d701e6ad4449691ff344216ef771aa1'
5
5
  SHA512:
6
- metadata.gz: 2bc01a890b6cefe16b7aab7f6fce7901a73de54a22ff2eceb05999be9cfd31218a9e4e02670470f09992e513c6036ccb365b9563dfe22761e76fa7c1d03a5fc3
7
- data.tar.gz: 502d8097742296cbc37ad72114904123d7d8f4bbcbf8d66fc8d5bc010e016aea0905bd6abb1d41c99f5e037f01c58cbd98c0db25088df8984e6e9c1873d4a7fc
6
+ metadata.gz: 75daedc25cfaac3fd7e5516a3862e9a29b20bc6674b438f32dd93e6d23be0450e0b4829deb1d0a4fea7a22e659c2246fb08056f6be533a71b5eff7e6c8ea50cf
7
+ data.tar.gz: 389012688563fc281f2e4464f44f37b5977b20c3dee6fec5760f1b1157b696ddd8193b4e032df0ec12eb6944a73e6f484f83acc47e3c2b473aad4e6ebfffc680
@@ -68,13 +68,26 @@ module Smartcloud
68
68
  def start_web_server?
69
69
  logger.debug "Starting Web Server ..."
70
70
 
71
- # Remove server.pid if it exists
72
- FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
73
-
74
- if system("bundle", "exec", "puma", "-C", "config/puma.rb")
75
- return true
71
+ # Spawn Process
72
+ pid = Process.spawn("bundle", "exec", "puma", "--config", "config/puma.rb")
73
+ Process.detach(pid)
74
+
75
+ # Sleep
76
+ sleep 5
77
+
78
+ # Check PID running
79
+ status = nil
80
+ begin
81
+ Process.kill(0, pid)
82
+ puts "Web Server started successfully."
83
+ status = true
84
+ rescue Errno::ESRCH # No such process
85
+ puts "Web Server cound not start"
86
+ status = false
76
87
  end
77
- return false
88
+
89
+ # Return status
90
+ return status
78
91
  end
79
92
 
80
93
  def set_logger_formatter_arrow
@@ -293,6 +293,7 @@ module Smartcloud
293
293
  # Setup rails env
294
294
  env_path = "#{container_path}/env"
295
295
  system("grep -q '^## Rails' #{env_path} || echo '## Rails' >> #{env_path}")
296
+ system("grep -q '^MALLOC_ARENA_MAX=' #{env_path} || echo '# MALLOC_ARENA_MAX=2' >> #{env_path}")
296
297
  system("grep -q '^RAILS_ENV=' #{env_path} || echo 'RAILS_ENV=production' >> #{env_path}")
297
298
  system("grep -q '^RACK_ENV=' #{env_path} || echo 'RACK_ENV=production' >> #{env_path}")
298
299
  system("grep -q '^RAILS_LOG_TO_STDOUT=' #{env_path} || echo 'RAILS_LOG_TO_STDOUT=enabled' >> #{env_path}")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta5
4
+ version: 0.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-05 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh