dockerfile-rails 1.6.8 → 1.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +3 -3
- data/lib/generators/templates/Dockerfile.erb +2 -8
- data/lib/generators/templates/docker-compose.yml.erb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8273f4e7e16fa5763ebfee285648dfede6ec020e51d51e3e9b8caf5b70333aba
|
4
|
+
data.tar.gz: 16824fb5f76c53dcf5fb0ebca40335591def91034e9cdfea59d12f0b44fb1fed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682c85b4a0a4d5e7157e39bb300b17ec4eff7be7beb98a6431b74d36d7e4f0dfa3d9b3bb81bfe5d31852423fc750595366ca503b9a44ac05a83acb5187afe1c1
|
7
|
+
data.tar.gz: c015796534771823bf606a22165d76899dd21745ac580d6bcc0b8aa780ef0ddf1427818536120616bf91eb3ea686838cf5f42b718b5d36804db6f59b3abc2a58
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ different contents. If both are specified, `--force` takes precedence.
|
|
34
34
|
|
35
35
|
### Runtime Optimizations:
|
36
36
|
|
37
|
-
* `--alpine` - use [alpine](https://www.alpinelinux.org/) as base image
|
37
|
+
* `--alpine` - use [alpine](https://www.alpinelinux.org/) as base image (requires [Alpine <= 3.18 OR Rails >= 8.0](https://github.com/sparklemotion/sqlite3-ruby/issues/434))
|
38
38
|
* `--fullstaq` - use [fullstaq](https://fullstaqruby.org/) [images](https://github.com/evilmartians/fullstaq-ruby-docker) on [quay.io](https://quay.io/repository/evl.ms/fullstaq-ruby?tab=tags&tag=latest)
|
39
39
|
* `--jemalloc` - use [jemalloc](https://jemalloc.net/) memory allocator
|
40
40
|
* `--swap=n` - allocate swap space. See [falloc options](https://man7.org/linux/man-pages/man1/fallocate.1.html#OPTIONS) for suffixes
|
data/Rakefile
CHANGED
@@ -30,7 +30,7 @@ namespace :test do
|
|
30
30
|
sh "bundle config set --local local.dockerfile-rails #{__dir__}"
|
31
31
|
sh "bundle add dockerfile-rails --group development " +
|
32
32
|
"--git https://github.com/rubys/dockerfile-rails.git"
|
33
|
-
sh "bin/rails generate dockerfile"
|
33
|
+
sh "bin/rails generate dockerfile --force"
|
34
34
|
cp "#{__dir__}/test/docker-entrypoint", "bin"
|
35
35
|
IO.write "config/routes.rb",
|
36
36
|
'Rails.application.routes.draw {get "/up", to: proc {[200, {}, ["ok"]]}}'
|
@@ -45,13 +45,13 @@ namespace :test do
|
|
45
45
|
task :alpine do
|
46
46
|
rm_rf "test/tmp/system_test"
|
47
47
|
Dir.chdir "test/tmp" do
|
48
|
-
sh "rails new system_test --javascript esbuild"
|
48
|
+
sh "rails new system_test --javascript esbuild --main"
|
49
49
|
Dir.chdir "system_test"
|
50
50
|
sh "bundle config disable_local_branch_check true"
|
51
51
|
sh "bundle config set --local local.dockerfile-rails #{__dir__}"
|
52
52
|
sh "bundle add dockerfile-rails --group development " +
|
53
53
|
"--git https://github.com/rubys/dockerfile-rails.git"
|
54
|
-
sh "bin/rails generate dockerfile --alpine"
|
54
|
+
sh "bin/rails generate dockerfile --alpine --force"
|
55
55
|
cp "#{__dir__}/test/docker-entrypoint", "bin"
|
56
56
|
IO.write "config/routes.rb",
|
57
57
|
'Rails.application.routes.draw {get "/up", to: proc {[200, {}, ["ok"]]}}'
|
@@ -87,16 +87,10 @@ ENV <%= build_env.join(" \\\n ") %>
|
|
87
87
|
<% end -%>
|
88
88
|
# Install application gems
|
89
89
|
COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock <% if references_ruby_version_file? %>.ruby-version <% end %>./
|
90
|
-
<% if options.alpine? and deploy_packages.include? 'sqlite-libs' -%>
|
91
|
-
# Workaround sqlite/alpine issue: https://github.com/sparklemotion/sqlite3-ruby/issues/434
|
92
|
-
RUN bundle config force_ruby_platform true && \
|
93
|
-
bundle config set frozen false && \
|
94
|
-
bundle lock --add-platform ruby
|
95
|
-
<% end -%>
|
96
90
|
<% if options.cache? -%>
|
97
91
|
RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \
|
98
92
|
<% if private_gemserver_env_variable_name -%>
|
99
|
-
--mount=type=secret,id=gemserver_credentials,
|
93
|
+
--mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_credentials \
|
100
94
|
<%= private_gemserver_env_variable_name %>="$(cat /kaniko/gemserver_credentials)" && \
|
101
95
|
export <%= private_gemserver_env_variable_name %> && \
|
102
96
|
<% end -%>
|
@@ -113,7 +107,7 @@ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \
|
|
113
107
|
|
114
108
|
<% else -%>
|
115
109
|
<% if private_gemserver_env_variable_name -%>
|
116
|
-
RUN --mount=type=secret,id=gemserver_credentials,
|
110
|
+
RUN --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_credentials \
|
117
111
|
<%= private_gemserver_env_variable_name %>="$(cat /kaniko/gemserver_credentials)" && \
|
118
112
|
export <%= private_gemserver_env_variable_name %> && \
|
119
113
|
bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
|
@@ -98,6 +98,10 @@ services:
|
|
98
98
|
command: bundle exec sidekiq
|
99
99
|
<% else -%>
|
100
100
|
command: bundle exec rake solid_queue:start
|
101
|
+
<% end -%>
|
102
|
+
<% if private_gemserver_env_variable_name -%>
|
103
|
+
secrets:
|
104
|
+
- gemserver_credentials
|
101
105
|
<% end -%>
|
102
106
|
environment:
|
103
107
|
- RAILS_MASTER_KEY=$RAILS_MASTER_KEY
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|