lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.0 vs lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.1
- old
+ new
@@ -413,11 +413,12 @@
@gemfile.include?("litestack")
end
def using_node?
return @using_node if @using_node != nil
- @using_node = File.exist? "package.json"
+ return if using_bun?
+ @using_node = File.exist?("package.json")
end
def using_bun?
return @using_bun if @using_bun != nil
@using_bun = File.exist?("bun.config.js") || File.exist?("bun.lockb")
@@ -453,11 +454,11 @@
def using_sidekiq?
@gemfile.include?("sidekiq")
end
def parallel?
- using_node? && options.parallel
+ (using_node? || using_bun?) && options.parallel
end
def has_mysql_gem?
@gemfile.include? "mysql2" or using_trilogy?
end
@@ -620,11 +621,10 @@
if using_node?
packages += %w(node-gyp pkg-config)
unless using_execjs? || using_puppeteer?
packages << "curl"
- packages << "unzip" if using_bun?
end
# module build process depends on Python, and debian changed
# how python is installed with the bullseye release. Below
# is based on debian release included with the Ruby images on
@@ -643,9 +643,13 @@
if bullseye
packages << "python-is-python3"
else
packages << "python"
end
+ end
+
+ if using_bun?
+ packages += %w(curl unzip)
end
if options.alpine?
alpinize(packages)
else