smartcloud 0.0.157 → 0.0.162

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: 032f1337c34584f6feeb39a11d56a506767512c20bce09d720e0eae56920acec
4
- data.tar.gz: 88c4779b043ec39965c2b0ed5c9ca0cb03b9cf4a0e1dd36983e32e94066f17dc
3
+ metadata.gz: baf79aac78353757357ec423418b2d68cd71e48dcdc5adc3c403f20a5c67a393
4
+ data.tar.gz: 2d7f15ae683490d9a4f59b0d80e7c99398493e25e0ecdd3859c93cb7fbdf27a7
5
5
  SHA512:
6
- metadata.gz: 97ccd5c3e2625198d0b5afb756f9e1d61f923d8e99409621ac290ed732d0fc05c5134f70c712e7d37b511c328d970c63e0e78a5e079123741267948b626d1af4
7
- data.tar.gz: e5424293c420c75ab9c00f9c1ec6b7eb94fe6b5086cec3be1cc5ad918e80b6d50bc31c0cc2d7c20659665aa69e791f66c6f7d676351d8435d8687bef74a140a9
6
+ metadata.gz: 66ef4183459fce92ebafe55776f065e15dd4d0d56b772a0b80bc1ba59d5f4f7e31f0ec38b7c4ebb1238424ae2cbd46d871d38de912fd6f11f0faab30d4cd49b9
7
+ data.tar.gz: f67226982bcf81d4437701b5d96fc6d6ea769d8dd08799fa4364a71a442353fb73d1f87053c7a54a21c69db869a09cb5ec915c37646226a5762e8924328725cd
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'smartcloud'
4
+
5
+ if ARGV[0] == 'start'
6
+ buildpacker = Smartcloud::Grids::Buildpacker.new
7
+ buildpacker.pack
8
+ end
@@ -3,7 +3,7 @@ require "tempfile"
3
3
 
4
4
  # The main Smartcloud Boot driver
5
5
  module Smartcloud
6
- class Boot
6
+ class Boot < Smartcloud::Base
7
7
  def initialize
8
8
  end
9
9
 
@@ -87,6 +87,7 @@ require 'smartcloud/docker'
87
87
 
88
88
  require 'smartcloud/grids/nginx'
89
89
  require 'smartcloud/grids/runner'
90
+ require 'smartcloud/grids/buildpacker'
90
91
  require 'smartcloud/grids/solr'
91
92
  require 'smartcloud/grids/mysql'
92
93
 
@@ -1,6 +1,6 @@
1
1
  # The main Smartcloud Docker driver
2
2
  module Smartcloud
3
- class Docker
3
+ class Docker < Smartcloud::Base
4
4
  def initialize
5
5
  end
6
6
 
@@ -0,0 +1,30 @@
1
+ module Smartcloud
2
+ module Grids
3
+ class Buildpacker < Smartcloud::Base
4
+ def initialize
5
+ end
6
+
7
+ def pack
8
+ pack_rails if File.exist? "bin/rails"
9
+ logger.info "Could not continue ... Launch Failed."
10
+ end
11
+
12
+ def pack_rails
13
+ # Remove server.pid if it exists
14
+ FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
15
+
16
+ logger.info "Performing bundle install ..."
17
+ if system("bundle install --deployment --clean")
18
+ logger.info "Installing Javascript Dependencies & Pre-compiling Assets ..."
19
+ if system("bundle exec rails assets:precompile", out: File::NULL)
20
+ logger.debug "Starting Server ..."
21
+ if system("god -c Godfile -D")
22
+ logger.info "Launched Application ... Success."
23
+ end
24
+ # exit 0
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -22,9 +22,10 @@ RUN apk add --update build-base && \
22
22
 
23
23
  USER "$USER_NAME"
24
24
 
25
- # Install bundler and god gems
26
- RUN gem install bundler && \
25
+ # Install gems
26
+ RUN gem install smartcloud && \
27
+ gem install bundler && \
27
28
  gem install god
28
29
 
29
30
  # Command to execute at container start
30
- CMD ["ruby", "buildpacker.rb"]
31
+ CMD ["buildpacker", "start"]
@@ -1,7 +1,7 @@
1
1
  # The main Smartcloud Grids Mysql driver
2
2
  module Smartcloud
3
3
  module Grids
4
- class Mysql
4
+ class Mysql < Smartcloud::Base
5
5
  def initialize
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  # The main Smartcloud Grids Nginx driver
2
2
  module Smartcloud
3
3
  module Grids
4
- class Nginx
4
+ class Nginx < Smartcloud::Base
5
5
  def initialize
6
6
  end
7
7
 
@@ -275,10 +275,6 @@ module Smartcloud
275
275
  end
276
276
  container_path_with_version = "#{container_path}/releases/#{app_version}"
277
277
 
278
- # Setup Buildpacker
279
- buildpacker_path = "#{Smartcloud.config.root_path}/lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb"
280
- FileUtils.cp(buildpacker_path, container_path_with_version)
281
-
282
278
  # Launching Application
283
279
  logger.info "Launching Application ..."
284
280
  if File.exist? "#{container_path_with_version}/bin/rails"
@@ -1,7 +1,7 @@
1
1
  # The main Smartcloud Grids Solr driver
2
2
  module Smartcloud
3
3
  module Grids
4
- class Solr
4
+ class Solr < Smartcloud::Base
5
5
  def initialize
6
6
  end
7
7
 
@@ -1,6 +1,6 @@
1
1
  # The main Smartcloud Machine driver
2
2
  module Smartcloud
3
- class Machine
3
+ class Machine < Smartcloud::Base
4
4
  def initialize
5
5
  end
6
6
 
@@ -3,7 +3,7 @@ require "base64"
3
3
 
4
4
  # The main Smartcloud User driver
5
5
  module Smartcloud
6
- class User
6
+ class User < Smartcloud::Base
7
7
  def initialize
8
8
  end
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.157
4
+ version: 0.0.162
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard
@@ -17,22 +17,25 @@ email: hello@timeboard.me
17
17
  executables:
18
18
  - smartcloud
19
19
  - runner
20
+ - buildpacker
20
21
  extensions: []
21
22
  extra_rdoc_files: []
22
23
  files:
23
24
  - MIT-LICENSE
24
25
  - README.md
26
+ - bin/buildpacker
25
27
  - bin/runner
26
28
  - bin/smartcloud
27
29
  - lib/smartcloud.rb
28
30
  - lib/smartcloud/base.rb
29
31
  - lib/smartcloud/boot.rb
30
32
  - lib/smartcloud/docker.rb
33
+ - lib/smartcloud/grids/buildpacker.rb
34
+ - lib/smartcloud/grids/grid-buildpacker/.keep
31
35
  - lib/smartcloud/grids/grid-mysql/docker-entrypoint-initdb.d/.keep
32
36
  - lib/smartcloud/grids/grid-nginx/fastcgi.conf
33
37
  - lib/smartcloud/grids/grid-nginx/nginx.tmpl
34
38
  - lib/smartcloud/grids/grid-runner/Dockerfile
35
- - lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
36
39
  - lib/smartcloud/grids/grid-runner/buildpacks/rails/Dockerfile
37
40
  - lib/smartcloud/grids/grid-runner/fcgiwrap/APKBUILD
38
41
  - lib/smartcloud/grids/grid-runner/fcgiwrap/fcgiwrap.confd
@@ -52,6 +55,7 @@ files:
52
55
  - lib/smartcloud/logger.rb
53
56
  - lib/smartcloud/machine.rb
54
57
  - lib/smartcloud/templates/dotsmartcloud/config/environment.rb
58
+ - lib/smartcloud/templates/dotsmartcloud/grids/grid-buildpacker/.keep
55
59
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-mysql/data/.keep
56
60
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/certificates/.keep
57
61
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/htpasswd/.keep
@@ -1,31 +0,0 @@
1
- class Buildpacker
2
- def initialize
3
- end
4
-
5
- def pack
6
- pack_rails if File.exist? "bin/rails"
7
- puts "-----> Could not continue ... Launch Failed."
8
- end
9
-
10
- def pack_rails
11
- # Remove server.pid if it exists
12
- FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
13
-
14
- puts "-----> Performing bundle install ... "
15
- if system("bundle install --deployment --clean")
16
- puts "-----> Installing Javascript Dependencies & Pre-compiling Assets ... "
17
- if system("bundle exec rails assets:precompile", out: File::NULL)
18
- puts "done"
19
-
20
- puts "-----> Running Web Server ... "
21
- if system("god -c Godfile -D")
22
- puts "-----> Launched Application ... Success."
23
- end
24
- # exit 0
25
- end
26
- end
27
- end
28
- end
29
-
30
- buildpacker = Buildpacker.new
31
- buildpacker.pack