fly.io-rails 0.0.11-arm64-darwin → 0.0.12-arm64-darwin

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: 4bc9af056f11bcb7edaa2b0a9261df54c1b327e2310ae7ef1ee0fb025b118092
4
- data.tar.gz: d3340bfc6a9609e084c6c30e4e4952d3e07b3f9425498dbfa5425ffb37edd37a
3
+ metadata.gz: e17efc91a4fb6e5627bae59e0097ee539559ad62afa7baf189b08384e073b61e
4
+ data.tar.gz: 0c1db0d460aa82b042887ee2663d9318707854a2e6834a6678945c6815b061e4
5
5
  SHA512:
6
- metadata.gz: 1eab05f393c016bee74aecefe87b00ac3606dba38d43562cb86b352924db809f5b7e6757bbcd50bc7942dcbed0bda0aae53cb5aadb9cf6b2c810fbce675dcd9d
7
- data.tar.gz: 8d674ee17a73bfd01c4acfb77fffd3f400d15f631e0c2f43214a44c057dbb06114ad97826d66da4074a8055cdbc20365a5f4918d42d1f96fb3d2ce79dcc4de32
6
+ metadata.gz: da446db34ff0657ebc8cba804fe408bab177f5c4f7638da28d463e2eb5bb25e4107852ac4b9dabc7a08b40459eeac1047b7a79ac1356f522e22d71670c98ee4d
7
+ data.tar.gz: 38f6f43b488e9f35335a2aa3cd1d927d6ba4a6d4a13a124511fffe1590b997c86adc5930a9c66c55d5f28a80ed4cbf3b367c2b8d137da2fc22b7cad9cc615ce5
@@ -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: arm64-darwin
6
6
  authors:
7
7
  - Sam Ruby