dockerfile-rails 1.6.12 → 1.6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/dockerfile_generator.rb +15 -2
- data/lib/generators/templates/Dockerfile.erb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2531120f4d41adf0dd6616bd2402b96236bbe88d29bb4ce68540807fe90ee9d7
|
4
|
+
data.tar.gz: 6ce1bd73ea9ff3d999c11e8c0e22f00b4ed3324f5cca1b811b147a101ca9988a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300bf0e817f27b0f4972333d87bbe1b322c866e8e3eeaf5eb4bd689f69a584b992ecdf9c5d93299130cef292bf3666a637f353658a744593ef7e32b3f381f7fd
|
7
|
+
data.tar.gz: c71043dc03cea93277164bc4ad4aa4e37712b76df6c40f65883bead0a8503f125f3a5f904c594ce8b6d26873a86fbee6b11deb2f0f58bc6daa2a1d9c106f514b
|
@@ -372,7 +372,8 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
372
372
|
remove_file "config/dockerfile.yml"
|
373
373
|
end
|
374
374
|
|
375
|
-
# check Dockerfile for common errors: missing packages, mismatched Ruby version
|
375
|
+
# check Dockerfile for common errors: missing packages, mismatched Ruby version;
|
376
|
+
# also add DATABASE_URL to fly.toml if needed
|
376
377
|
if options.skip? && File.exist?("Dockerfile")
|
377
378
|
message = nil
|
378
379
|
shell = Thor::Base.shell.new
|
@@ -393,6 +394,14 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
393
394
|
STDERR.puts "\n" + shell.set_color(message, Thor::Shell::Color::RED, Thor::Shell::Color::BOLD)
|
394
395
|
end
|
395
396
|
|
397
|
+
if (options.sqlite3? || @sqlite3) && !dockerfile.include?("DATABASE_URL") && File.exist?("fly.toml")
|
398
|
+
toml = IO.read("fly.toml")
|
399
|
+
if !toml.include?("[[env]]")
|
400
|
+
toml += "\n[[env]]\n DATABASE_URL = \"sqlite3:///data/production.sqlite3\"\n"
|
401
|
+
File.write "fly.toml", toml
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
396
405
|
exit 42 if message
|
397
406
|
end
|
398
407
|
end
|
@@ -1169,7 +1178,7 @@ private
|
|
1169
1178
|
nginx: '/usr/sbin/nginx -g "daemon off;"',
|
1170
1179
|
rails: "./bin/rails server -p 3001"
|
1171
1180
|
}
|
1172
|
-
elsif
|
1181
|
+
elsif using_thruster?
|
1173
1182
|
{
|
1174
1183
|
rails: "bundle exec thrust ./bin/rails server"
|
1175
1184
|
}
|
@@ -1180,6 +1189,10 @@ private
|
|
1180
1189
|
end
|
1181
1190
|
end
|
1182
1191
|
|
1192
|
+
def using_thruster?
|
1193
|
+
options.thruster? || @gemfile.include?("thruster")
|
1194
|
+
end
|
1195
|
+
|
1183
1196
|
def fly_processes
|
1184
1197
|
return unless File.exist? "fly.toml"
|
1185
1198
|
return unless using_sidekiq? || using_solidq?
|
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.14
|
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-05-
|
11
|
+
date: 2024-05-27 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.5.
|
77
|
+
rubygems_version: 3.5.10
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Dockerfile generator for Rails
|