fly.io-rails 0.0.11-aarch64-linux → 0.0.12-aarch64-linux

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: 76bcbaf48e61e7290fcc049ea352f42f2e204688319261ee224589874243d817
4
- data.tar.gz: 202703de14c542581c1fd49d7f5e83ddbe7bda837efd6a90524683e33a77c934
3
+ metadata.gz: 3bcddb38cb8fd9cd82ccea07d5b749cdcf331b6807d3726a4744d1dc600c226c
4
+ data.tar.gz: e9432d6483f660fc447ba6d64e8e9151e0b9c28d0755df6793ed663629210fc7
5
5
  SHA512:
6
- metadata.gz: 3429cec2d24eefe1b17ec2e680aa1269f7f6dff655a24990045e49fbaee6714034af02c7e2b97109ce167a693f5b6e18a05ef2d5569d8a27a592bb47922b2a36
7
- data.tar.gz: ec65834db700de4af067679dabe149da3fc51f12f4eebb61e01fe57b73391121b0a4139646332249dff8e9d29ae379eb43b513361c1eea9d379912b186e9d662
6
+ metadata.gz: 9dd3faa5b430caa7838d4f1f0cc2e7a25f946dbc2f23459817b384b74da42db1919f797f8558f01a2bf6279aa32fd3ce7cf10060e15a1374b1e40cadb8de7469
7
+ data.tar.gz: 861978003e108b30f036a8f1fac3d2e02066bc8c58a07009e002fce9c68ff8549c39749861fe6e1562f690e361e229029dbf65debacfad6a37691a5308321134
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
@@ -21,6 +21,9 @@ ARG RUBY_VERSION=<%= @ruby_version %>
21
21
  ARG VARIANT=jemalloc-slim
22
22
  FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-${VARIANT} as base
23
23
 
24
+ <% if @node -%>
25
+ ARG NODE_VERSION=<%= @node_version %>
26
+ <% end -%>
24
27
  ARG BUNDLER_VERSION=<%= @bundler_version %>
25
28
 
26
29
  ARG RAILS_ENV=production
@@ -38,6 +41,13 @@ RUN mkdir /app
38
41
  WORKDIR /app
39
42
  RUN mkdir -p tmp/pids
40
43
 
44
+ <% if @node -%>
45
+ RUN curl https://get.volta.sh | bash
46
+ ENV VOLTA_HOME /root/.volta
47
+ ENV PATH $VOLTA_HOME/bin:/usr/local/bin:$PATH
48
+ RUN volta install node@${NODE_VERSION}
49
+
50
+ <% end -%>
41
51
  #######################################################################
42
52
 
43
53
  # install packages only needed at build time
@@ -65,6 +75,22 @@ RUN gem update --system --no-document && \
65
75
  COPY Gemfile* ./
66
76
  RUN bundle install && rm -rf vendor/bundle/ruby/*/cache
67
77
 
78
+ <% if @node -%>
79
+ #######################################################################
80
+
81
+ # install node modules
82
+
83
+ FROM build_deps as node_modules
84
+
85
+ COPY package*json ./
86
+ <% if @yarn -%>
87
+ COPY yarn.* ./
88
+ RUN volta install yarn && yarn install;
89
+ <% else -%>
90
+ RUN npm install
91
+ <% end -%>
92
+
93
+ <% end -%>
68
94
  #######################################################################
69
95
 
70
96
  # install deployment packages
@@ -86,6 +112,11 @@ COPY --from=gems /app /app
86
112
  COPY --from=gems /usr/lib/fullstaq-ruby/versions /usr/lib/fullstaq-ruby/versions
87
113
  COPY --from=gems /usr/local/bundle /usr/local/bundle
88
114
 
115
+ <% if @node -%>
116
+ # copy installed node modules
117
+ COPY --from=node_modules /app/node_modules /app/node_modules
118
+
119
+ <% end -%>
89
120
  #######################################################################
90
121
 
91
122
  # Deploy your application
@@ -31,7 +31,11 @@ class TerraformGenerator < Rails::Generators::Base
31
31
 
32
32
  @ruby_version = RUBY_VERSION
33
33
  @bundler_version = Bundler::VERSION
34
+ @node = File.exist? 'node_modules'
35
+ @yarn = File.exist? 'yarn.lock'
36
+ @node_version = @node ? `node --version`.chomp.sub(/^v/, '') : '16.17.0'
34
37
  @appName = @app.gsub('-', '_').camelcase(:lower)
38
+
35
39
  template 'Dockerfile.erb', 'Dockerfile'
36
40
  template 'dockerignore.erb', '.dockerignore'
37
41
  template 'main.tf.erb', 'main.tf'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Sam Ruby