smartcloud 0.0.60 → 0.0.61
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c4a12cc5b76d2ef4beade090ae25d0ace5b859dfc4cc16d907bf5be47a82284
|
4
|
+
data.tar.gz: 8d618cccb5ef06a31657d2f19dc996ef9bb137a5c0d4c5a2f9c845082766ac4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 825c357f42ddb91660b77508a5bf5fbdc9905603ae8c29029cb0c324c93b43cad442c747483db9a04ab7a99e37f6ffdd27bab99d354cd8441b08c5f482d86432
|
7
|
+
data.tar.gz: c6d82cd5f710c9d45569999cf5ff729cf91de4b7d58e6730c3b1f688984bcd99d8b935424a6ef85f0b4268152187fd926f7fc8e75b47cbfb4aa359006bb93a6e
|
@@ -7,24 +7,11 @@ RUN apk add --update tzdata && \
|
|
7
7
|
rm -rf /var/cache/apk/*
|
8
8
|
|
9
9
|
# Install bundler and foreman gems
|
10
|
-
RUN gem install bundler
|
11
|
-
|
12
|
-
# Generating entrypoint file
|
13
|
-
RUN echo -e '#!/bin/sh\n\
|
14
|
-
\n\
|
15
|
-
cd /code\n\
|
16
|
-
test -f ./tmp/pids/server.pid && rf ./tmp/pids/server.pid; true\n\
|
17
|
-
\n\
|
18
|
-
echo "---------------------------------------------------------------"\n\
|
19
|
-
echo "-----> Performing bundle install"\n\
|
20
|
-
bundle install\n\
|
21
|
-
echo "-----> Compiling Assets"\n\
|
22
|
-
bundle exec rails assets:precompile\n\
|
23
|
-
\n\
|
24
|
-
exec "$@"' >> /entrypoint; chmod +x /entrypoint;
|
10
|
+
RUN gem install bundler && \
|
11
|
+
gem install foreman
|
25
12
|
|
26
13
|
# Set entrypoint
|
27
|
-
ENTRYPOINT ["
|
14
|
+
ENTRYPOINT ["ruby", "builder.rb"]
|
28
15
|
|
29
16
|
# Command to execute at container start
|
30
17
|
CMD foreman start -f Procfile
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class Builder
|
2
|
+
def initialize
|
3
|
+
puts "---------------------------------------------------------------"
|
4
|
+
|
5
|
+
FileUtils.rm("./tmp/pids/server.pid") if File.exist? "./tmp/pids/server.pid"
|
6
|
+
|
7
|
+
puts "Performing bundle install ... "
|
8
|
+
if system("bundle install")
|
9
|
+
puts "done"
|
10
|
+
puts "Compiling Assets ... "
|
11
|
+
if system("bundle exec rails assets:precompile")
|
12
|
+
puts "done"
|
13
|
+
# exec "$@"
|
14
|
+
exit 0
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
exit 1
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Builder.new
|
@@ -294,12 +294,12 @@ module Smartcloud
|
|
294
294
|
# Starting Rails App
|
295
295
|
self.start_rails_app(appname, container_path, container_path_with_now_date)
|
296
296
|
end
|
297
|
-
end
|
298
|
-
|
299
|
-
# This line is important to cancel pre-receive push if finally the app could not be started.
|
300
|
-
# If the app was finally started, then this line should never be executed.
|
301
|
-
exit 1
|
297
|
+
end
|
302
298
|
end
|
299
|
+
|
300
|
+
# This line is important to cancel pre-receive push if finally the app could not be started.
|
301
|
+
# If the app was finally started, then this line should never be executed.
|
302
|
+
exit 1
|
303
303
|
end
|
304
304
|
|
305
305
|
def self.stop_app(appname)
|
@@ -342,6 +342,11 @@ module Smartcloud
|
|
342
342
|
EOF")
|
343
343
|
end
|
344
344
|
|
345
|
+
# Setup Builder
|
346
|
+
builder_path = "#{Smartcloud.config.root_path}/lib/smartcloud/grids/grid-runner/buildpacks/rails/builder.rb"
|
347
|
+
%x[chmod +x #{builder_path}]
|
348
|
+
FileUtils.cp(builder_path, container_path_with_now_date)
|
349
|
+
|
345
350
|
# Creating & Starting container
|
346
351
|
# IMPORTANT NOTE:
|
347
352
|
# The below commands of docker are executed here. However, they run from the host.
|
@@ -353,6 +358,7 @@ module Smartcloud
|
|
353
358
|
--env-file='#{container_path}/env' \
|
354
359
|
--expose='5000' \
|
355
360
|
--volume='#{container_path_with_now_date}:/code' \
|
361
|
+
--workdir='/code' \
|
356
362
|
--restart='always' \
|
357
363
|
--network='nginx-network' \
|
358
364
|
smartcloud/buildpacks/rails", out: File::NULL)
|
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.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timeboard
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- lib/smartcloud/grids/grid-nginx/nginx.tmpl
|
33
33
|
- lib/smartcloud/grids/grid-runner/Dockerfile
|
34
34
|
- lib/smartcloud/grids/grid-runner/buildpacks/rails/Dockerfile
|
35
|
+
- lib/smartcloud/grids/grid-runner/buildpacks/rails/builder.rb
|
35
36
|
- lib/smartcloud/grids/grid-solr/docker-entrypoint-initdb.d/.keep
|
36
37
|
- lib/smartcloud/grids/grid-solr/sunspot/conf/schema.xml
|
37
38
|
- lib/smartcloud/grids/grid-solr/sunspot/conf/solrconfig.xml
|