smartcloud 0.0.193 → 0.0.198

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: 0b1508f6de81ed608939780e8ae23c6db3f67af6f5e28762fe975ba688486fc3
4
- data.tar.gz: 9b98709f1af7d4c4c90094cef42c42a3ebd709d70514950bf9380662ca468bdd
3
+ metadata.gz: dc8b9476cdd5ed8a6993d84f26b2ce1e6ebe966fd35f193622dff8532fd39ef2
4
+ data.tar.gz: 4922222e91746feb348eb887346567fc45cd3290dc3c875dbc882eb3bad11de1
5
5
  SHA512:
6
- metadata.gz: d31be463e5617bede45e97afb61aa15bc27ba86040d166c437a43c48ec4a10f5598d6b65760516f37bfff8e792fa82e79e30d44a658576265bfbe3cf6516df71
7
- data.tar.gz: 5541e2ad73a655d81b278b94d94404e3bd369ca5e1dbe07937de5d5fe599837bfcc43b1a6d01d35dd125a4ff21d3ee1e1a4ae4d15657a64b7555cbe0f6f9dedc
6
+ metadata.gz: 605b518da4a5d290f628198ddaa92aa060be0ec9cceadef487fa1dd1046e3929532aec9569a27db3afe13ecfd5722e7381427bc22eae29806d78ab9d8d0ee107
7
+ data.tar.gz: 720b3575168ecec626b12faedaf9cebd1c30b3d94f7a9dbbdbc7115afcd41e51b7ad30e84b82c028f463d280340460b0309145bd74835f150c7c952e79661cac
@@ -0,0 +1,30 @@
1
+ FROM ruby:2.6.4-alpine3.10
2
+ MAINTAINER Timeboard <hello@timeboard.me>
3
+
4
+ # Setting up group and user
5
+ # - envs
6
+ ARG USER_NAME
7
+ ARG USER_UID
8
+ ARG USER_GID
9
+ ARG DOCKER_GID
10
+ # - fix to change gid of 999 to 99 so that addgroup is free to create a group with 999 as gid
11
+ # - Create group & user. Then add user to group
12
+ RUN sed -i "s/999/99/" /etc/group && \
13
+ adduser --disabled-password --gecos "" --uid $USER_UID $USER_NAME && \
14
+ addgroup --gid $USER_GID $USER_NAME && adduser $USER_NAME $USER_NAME && \
15
+ addgroup --gid $DOCKER_GID "docker" && adduser $USER_NAME docker
16
+ USER "$USER_NAME"
17
+ WORKDIR "/home/$USER_NAME/.smartcloud"
18
+
19
+ # Generating entrypoint file
20
+ RUN echo -e '#!/bin/sh\n\
21
+ gem install --no-document smartcloud\n\
22
+ exec "$@"' >> "/home/$(whoami)/entrypoint"; chmod +x "/home/$(whoami)/entrypoint"
23
+
24
+ RUN apk add --update docker && \
25
+ rm -rf /var/cache/apk/*
26
+
27
+ # Set entrypoint
28
+ ENTRYPOINT "/home/$(whoami)/entrypoint"
29
+
30
+ CMD ["smartcloud"]
@@ -1,4 +1,4 @@
1
- FROM docker:latest
1
+ FROM ruby:2.6.4-alpine3.10
2
2
  MAINTAINER Timeboard <hello@timeboard.me>
3
3
 
4
4
  # Setting up group and user
@@ -12,7 +12,7 @@ RUN sed -i "s/999/99/" /etc/group && \
12
12
  addgroup --gid "$DOCKER_GID" "docker" && \
13
13
  adduser --disabled-password --gecos "" --uid "$USER_UID" "$USER_NAME" && \
14
14
  adduser "$USER_NAME" "docker"
15
-
15
+ USER "$USER_NAME"
16
16
  # We need the following:
17
17
  # - fcgiwrap, because that is how nginx does CGI
18
18
  # ----- IMPORTANT NOTE: This is custom build fcgiwrap package to account for NO_BUFFERING option.
@@ -26,18 +26,21 @@ RUN apk add fcgiwrap --repository /root/apk-packages/fcgiwrap/packages/main --al
26
26
  rm -rf /root/apk-packages
27
27
  RUN apk add --update coreutils && \
28
28
  apk add --update util-linux && \
29
+ apk add --update docker && \
29
30
  apk add --update git && \
30
31
  apk add --update git-daemon && \
31
- apk add --update ruby && \
32
32
  apk add --update spawn-fcgi && \
33
33
  rm -rf /var/cache/apk/*
34
34
 
35
+ USER "$USER_NAME"
36
+ WORKDIR "/home/$USER_NAME/.smartcloud/grids/grid-runner/apps"
37
+
35
38
  # Generating entrypoint file
36
39
  RUN echo -e '#!/bin/sh\n\
37
40
  gem install --no-document --local smartcloud\n\
38
- exec "$@"' >> /entrypoint; chmod +x /entrypoint
41
+ exec "$@"' >> "/home/$(whoami)/entrypoint"; chmod +x "/home/$(whoami)/entrypoint"
39
42
 
40
43
  # Set entrypoint
41
- ENTRYPOINT ["/entrypoint"]
44
+ ENTRYPOINT "/home/$(whoami)/entrypoint"
42
45
 
43
- CMD "git, fcgiwrap & spawn-fcgi installed"
46
+ CMD ["spawn-fcgi", "-n", "-p", "9000", "/usr/bin/fcgiwrap", "-f"]
@@ -20,6 +20,9 @@ RUN apk add --update build-base && \
20
20
  apk add --update mupdf-tools && \
21
21
  rm -rf /var/cache/apk/*
22
22
 
23
+ USER "$USER_NAME"
24
+ WORKDIR "/app"
25
+
23
26
  # Install gems
24
27
  RUN gem install bundler && \
25
28
  gem install god
@@ -27,12 +30,10 @@ RUN gem install bundler && \
27
30
  # Generating entrypoint file
28
31
  RUN echo -e '#!/bin/sh\n\
29
32
  gem install --no-document --local smartcloud\n\
30
- exec "$@"' >> /entrypoint; chmod +x /entrypoint
31
-
32
- USER "$USER_NAME"
33
+ exec "$@"' >> "/home/$(whoami)/entrypoint"; chmod +x "/home/$(whoami)/entrypoint"
33
34
 
34
35
  # Set entrypoint
35
- ENTRYPOINT ["/entrypoint"]
36
+ ENTRYPOINT "/home/$(whoami)/entrypoint"
36
37
 
37
38
  # Command to execute at container start
38
39
  CMD ["buildpacker", "start"]
@@ -27,16 +27,13 @@ module Smartcloud
27
27
  --env GIT_PROJECT_ROOT=#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-runner/apps/repositories \
28
28
  --env GIT_HTTP_EXPORT_ALL="" \
29
29
  --expose='9000' \
30
+ --volume='#{Smartcloud.config.user_home_path}/.gem:#{Smartcloud.config.user_home_path}/.gem' \
30
31
  --volume='#{Smartcloud.config.user_home_path}/.smartcloud/config:#{Smartcloud.config.user_home_path}/.smartcloud/config' \
31
32
  --volume='#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-runner:#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-runner' \
32
- --volume='#{Smartcloud.config.user_home_path}/.gem/ruby:/usr/lib/ruby/gems' \
33
33
  --volume='/var/run/docker.sock:/var/run/docker.sock' \
34
- --user=#{File.basename(Smartcloud.config.user_home_path)} \
35
- --workdir='#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-runner/apps' \
36
34
  --restart='always' \
37
35
  --network='nginx-network' \
38
- smartcloud/runner \
39
- spawn-fcgi -n -p 9000 /usr/bin/fcgiwrap -f", out: File::NULL)
36
+ smartcloud/runner", out: File::NULL)
40
37
  puts "done"
41
38
 
42
39
  print "-----> Starting container runner ... "
@@ -331,13 +328,12 @@ module Smartcloud
331
328
  --name='#{appname}_new' \
332
329
  --env-file='#{container_path}/env' \
333
330
  --expose='5000' \
331
+ --volume='#{Smartcloud.config.user_home_path}/.gem:#{Smartcloud.config.user_home_path}/.gem' \
334
332
  --volume='#{Smartcloud.config.user_home_path}/.smartcloud/config:#{Smartcloud.config.user_home_path}/.smartcloud/config' \
335
333
  --volume='#{container_path_with_version}:/app' \
336
334
  --volume='#{container_path}/app/vendor/bundle:/app/vendor/bundle' \
337
335
  --volume='#{container_path}/app/public:/app/public' \
338
336
  --volume='#{container_path}/app/node_modules:/app/node_modules' \
339
- --volume='#{Smartcloud.config.user_home_path}/.gem/ruby:/usr/lib/ruby/gems' \
340
- --workdir='/app' \
341
337
  --restart='always' \
342
338
  --network='nginx-network' \
343
339
  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.193
4
+ version: 0.0.198
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard
@@ -30,6 +30,7 @@ files:
30
30
  - lib/smartcloud/base.rb
31
31
  - lib/smartcloud/boot.rb
32
32
  - lib/smartcloud/docker.rb
33
+ - lib/smartcloud/engine/Dockerfile
33
34
  - lib/smartcloud/grids/buildpacker.rb
34
35
  - lib/smartcloud/grids/grid-buildpacker/.keep
35
36
  - lib/smartcloud/grids/grid-mysql/docker-entrypoint-initdb.d/.keep