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 +4 -4
- data/bin/buildpacker +8 -0
- data/lib/smartcloud/boot.rb +2 -1
- data/lib/smartcloud/docker.rb +1 -1
- data/lib/smartcloud/grids/buildpacker.rb +30 -0
- data/lib/smartcloud/grids/grid-buildpacker/.keep +0 -0
- data/lib/smartcloud/grids/grid-runner/buildpacks/rails/Dockerfile +4 -3
- data/lib/smartcloud/grids/mysql.rb +1 -1
- data/lib/smartcloud/grids/nginx.rb +1 -1
- data/lib/smartcloud/grids/runner.rb +0 -4
- data/lib/smartcloud/grids/solr.rb +1 -1
- data/lib/smartcloud/machine.rb +1 -1
- data/lib/smartcloud/templates/dotsmartcloud/grids/grid-buildpacker/.keep +0 -0
- data/lib/smartcloud/user.rb +1 -1
- metadata +6 -2
- data/lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf79aac78353757357ec423418b2d68cd71e48dcdc5adc3c403f20a5c67a393
|
4
|
+
data.tar.gz: 2d7f15ae683490d9a4f59b0d80e7c99398493e25e0ecdd3859c93cb7fbdf27a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ef4183459fce92ebafe55776f065e15dd4d0d56b772a0b80bc1ba59d5f4f7e31f0ec38b7c4ebb1238424ae2cbd46d871d38de912fd6f11f0faab30d4cd49b9
|
7
|
+
data.tar.gz: f67226982bcf81d4437701b5d96fc6d6ea769d8dd08799fa4364a71a442353fb73d1f87053c7a54a21c69db869a09cb5ec915c37646226a5762e8924328725cd
|
data/bin/buildpacker
ADDED
data/lib/smartcloud/boot.rb
CHANGED
@@ -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
|
|
data/lib/smartcloud/docker.rb
CHANGED
@@ -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
|
File without changes
|
@@ -22,9 +22,10 @@ RUN apk add --update build-base && \
|
|
22
22
|
|
23
23
|
USER "$USER_NAME"
|
24
24
|
|
25
|
-
# Install
|
26
|
-
RUN gem install
|
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 ["
|
31
|
+
CMD ["buildpacker", "start"]
|
@@ -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"
|
data/lib/smartcloud/machine.rb
CHANGED
File without changes
|
data/lib/smartcloud/user.rb
CHANGED
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.
|
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
|