dockerfile-rails 1.6.1 → 1.6.3
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: 1ee863e3eae2b33b85291826856413562be9239b95bf64987c04b2c983fb6ed1
|
4
|
+
data.tar.gz: 110b65ba0c47dd4c8787ea3a594da5ca24de98b857a7c2b254b4d24a417b1e21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6ef088a9e2d1c1920d58299f17ecb175ed68233e500e12c635061ba93d5fe0a4029492b8591f029fcd3cb5e0670432f5b536d0a60d33afa903efaf77688150
|
7
|
+
data.tar.gz: 884faca812d4dc1ff79ca131cdee688c67f3bc591a89bc0f5fda914ae18387448ae41c1da92cd8064987aff2cc180fd783396ca06ffd593deb589db64b79877b
|
data/README.md
CHANGED
@@ -99,15 +99,15 @@ Args and environment variables can be tailored to a specific build phase by addi
|
|
99
99
|
|
100
100
|
### Advanced Customization:
|
101
101
|
|
102
|
-
There may be times where feature detection plus flags just aren't enough. As an example, you may wish to configure and run multiple processes.
|
102
|
+
There may be times where feature detection plus flags just aren't enough. As an example, you may wish to configure and run multiple processes.
|
103
103
|
|
104
|
-
* `--instructions=path` - a dockerfile fragment to be inserted into the final document.
|
104
|
+
* `--instructions=path` - a dockerfile fragment to be inserted into the final document.
|
105
105
|
* `--migration=cmd` - a replacement (generally a script) for `db:prepare`/`db:migrate`.
|
106
106
|
* `--procfile=path` - a [Procfile](https://github.com/ddollar/foreman#foreman) to use in place of launching Rails directly.
|
107
107
|
|
108
108
|
Like with environment variables, packages, and build args, `--instructions` can be tailored to a specific build phase by adding `-base`, `-build`, or `-deploy` after the flag name, with the default being `-deploy`.
|
109
109
|
|
110
|
-
|
110
|
+
Additionally, if the instructions start with a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) instead the file being treated as a Dockerfile fragment, the file is treated as a script and a `RUN` statement is added to your Dockerfile instead.
|
111
111
|
|
112
112
|
---
|
113
113
|
|
@@ -65,6 +65,7 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
65
65
|
"libmagickwand-dev" => "imagemagick-libs",
|
66
66
|
"libsqlite3-0" => "sqlite-dev",
|
67
67
|
"libtiff-dev" => "tiff-dev",
|
68
|
+
"libjemalloc2" => "jemalloc",
|
68
69
|
"libvips" => "vips-dev",
|
69
70
|
"node-gyp" => "gyp",
|
70
71
|
"pkg-config" => "pkgconfig",
|
@@ -424,6 +425,10 @@ private
|
|
424
425
|
@using_bun = File.exist?("bun.config.js") || File.exist?("bun.lockb")
|
425
426
|
end
|
426
427
|
|
428
|
+
def references_ruby_version_file?
|
429
|
+
@references_ruby_version_file ||= IO.read("Gemfile").include?(".ruby-version")
|
430
|
+
end
|
431
|
+
|
427
432
|
def using_redis?
|
428
433
|
# Note: If you have redis installed on your computer, 'rails new` will
|
429
434
|
# automatically add redis to your Gemfile, so having it in your Gemfile is
|
@@ -455,6 +460,10 @@ private
|
|
455
460
|
@gemfile.include?("sidekiq")
|
456
461
|
end
|
457
462
|
|
463
|
+
def using_solidq?
|
464
|
+
@gemfile.include?("solid_queue")
|
465
|
+
end
|
466
|
+
|
458
467
|
def parallel?
|
459
468
|
(using_node? || using_bun?) && options.parallel
|
460
469
|
end
|
@@ -598,6 +607,7 @@ private
|
|
598
607
|
packages = %w(build-essential)
|
599
608
|
packages += @@packages["build"] if @@packages["build"]
|
600
609
|
packages += %w(nodejs npm) if (node_version == "lts") && (not using_execjs?)
|
610
|
+
packages << "libyaml-dev" if options.fullstaq?
|
601
611
|
|
602
612
|
# add databases: sqlite3, postgres, mysql
|
603
613
|
packages << "pkg-config" if options.sqlite3? || @sqlite3
|
@@ -1125,7 +1135,7 @@ private
|
|
1125
1135
|
|
1126
1136
|
def fly_processes
|
1127
1137
|
return unless File.exist? "fly.toml"
|
1128
|
-
return unless using_sidekiq?
|
1138
|
+
return unless using_sidekiq? || using_solidq?
|
1129
1139
|
|
1130
1140
|
if procfile.size > 1
|
1131
1141
|
list = { "app" => "foreman start --procfile=Procfile.prod" }
|
@@ -1133,7 +1143,11 @@ private
|
|
1133
1143
|
list = { "app" => procfile.values.first }
|
1134
1144
|
end
|
1135
1145
|
|
1136
|
-
|
1146
|
+
if using_sidekiq?
|
1147
|
+
list["sidekiq"] = "bundle exec sidekiq"
|
1148
|
+
elsif using_solidq?
|
1149
|
+
list["solidq"] = "bundle exec rake solid_queue:start"
|
1150
|
+
end
|
1137
1151
|
|
1138
1152
|
list
|
1139
1153
|
end
|
@@ -8,7 +8,7 @@ ARG RUBY_VERSION=<%= RUBY_VERSION %>
|
|
8
8
|
|
9
9
|
<% end -%>
|
10
10
|
<% if options.fullstaq -%>
|
11
|
-
FROM <%= platform %>quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-<%= options.jemalloc ? 'jemalloc-' : '' %><%= variant %><% unless options.precompile == "defer" %> as base<% end %>
|
11
|
+
FROM <%= platform %>quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-<%= options.jemalloc ? 'jemalloc-' : 'malloctrim-' %><%= variant %><% unless options.precompile == "defer" %> as base<% end %>
|
12
12
|
<% else -%>
|
13
13
|
FROM <%= platform %><%= options.registry %>ruby:$RUBY_VERSION-<%= variant %><% unless options.precompile == "defer" %> as base<% end %>
|
14
14
|
<% end -%>
|
@@ -86,7 +86,7 @@ ENV <%= build_env.join(" \\\n ") %>
|
|
86
86
|
|
87
87
|
<% end -%>
|
88
88
|
# Install application gems
|
89
|
-
COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock
|
89
|
+
COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock <% if references_ruby_version_file? %>.ruby-version <% end %>./
|
90
90
|
<% if options.alpine? and deploy_packages.include? 'sqlite-libs' -%>
|
91
91
|
# Workaround sqlite/alpine issue: https://github.com/sparklemotion/sqlite3-ruby/issues/434
|
92
92
|
RUN bundle config force_ruby_platform true && \
|
@@ -207,7 +207,7 @@ RUN gem install foreman
|
|
207
207
|
<% end -%>
|
208
208
|
<% unless options.precompile == "defer" -%>
|
209
209
|
# Copy built artifacts: gems, application
|
210
|
-
COPY --from=build
|
210
|
+
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
|
211
211
|
COPY --from=build /rails /rails
|
212
212
|
<% if using_passenger? -%>
|
213
213
|
|
@@ -22,8 +22,10 @@ ARG YARN_VERSION=<%= yarn_version %>
|
|
22
22
|
<% end -%>
|
23
23
|
<% if node_version && node_version != 'lts' -%>
|
24
24
|
<% if options.alpine? -%>
|
25
|
+
ENV PATH=/usr/local/node/bin:$PATH
|
25
26
|
RUN curl -sL https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.gz | tar xz -C /tmp/ && \
|
26
|
-
|
27
|
+
mkdir /usr/local/node && \
|
28
|
+
cp -rp /tmp/node-v${NODE_VERSION}-linux-x64-musl/* /usr/local/node/ && \
|
27
29
|
<% else -%>
|
28
30
|
ENV PATH=/usr/local/node/bin:$PATH
|
29
31
|
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
|
@@ -90,11 +90,15 @@ services:
|
|
90
90
|
redis-db:
|
91
91
|
image: redis
|
92
92
|
<% end -%>
|
93
|
-
<% if using_sidekiq? and deploy_database != 'sqlite3' -%>
|
93
|
+
<% if (using_sidekiq? or using_solidq?) and deploy_database != 'sqlite3' -%>
|
94
94
|
|
95
|
-
sidekiq:
|
95
|
+
<%= using_sidekiq? ? "sidekiq" : "solidq" %>:
|
96
96
|
build: .
|
97
|
+
<% if using_sidekiq? -%>
|
97
98
|
command: bundle exec sidekiq
|
99
|
+
<% else -%>
|
100
|
+
command: bundle exec rake solid_queue:start
|
101
|
+
<% end -%>
|
98
102
|
environment:
|
99
103
|
- RAILS_MASTER_KEY=$RAILS_MASTER_KEY
|
100
104
|
- REDIS_URL=redis://redis-db:6379
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.4.
|
77
|
+
rubygems_version: 3.4.8
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Dockerfile generator for Rails
|