lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.1 vs lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.2

- old
+ new

@@ -63,10 +63,11 @@ "libjemalloc" => "jemalloc-dev", "libjpeg-dev" => "jpeg-dev", "libmagickwand-dev" => "imagemagick-libs", "libsqlite3-0" => "sqlite-dev", "libtiff-dev" => "tiff-dev", + "libjemalloc2" => "jemalloc", "libvips" => "vips-dev", "node-gyp" => "gyp", "pkg-config" => "pkgconfig", "python" => "python3", "python-is-python3" => "python3" @@ -422,10 +423,14 @@ def using_bun? return @using_bun if @using_bun != nil @using_bun = File.exist?("bun.config.js") || File.exist?("bun.lockb") end + def references_ruby_version_file? + @references_ruby_version_file ||= IO.read("Gemfile").include?(".ruby-version") + end + def using_redis? # Note: If you have redis installed on your computer, 'rails new` will # automatically add redis to your Gemfile, so having it in your Gemfile is # not a reliable indicator of whether or not your application actually uses # redis. @@ -453,10 +458,14 @@ def using_sidekiq? @gemfile.include?("sidekiq") end + def using_solidq? + @gemfile.include?("solid_queue") + end + def parallel? (using_node? || using_bun?) && options.parallel end def has_mysql_gem? @@ -596,10 +605,11 @@ def build_packages # start with the essentials packages = %w(build-essential) packages += @@packages["build"] if @@packages["build"] packages += %w(nodejs npm) if (node_version == "lts") && (not using_execjs?) + packages << "libyaml-dev" if options.fullstaq? # add databases: sqlite3, postgres, mysql packages << "pkg-config" if options.sqlite3? || @sqlite3 packages << "libpq-dev" if options.postgresql? || @postgresql packages << "freetds-dev" if options.sqlserver? || @sqlserver @@ -1123,18 +1133,22 @@ end end def fly_processes return unless File.exist? "fly.toml" - return unless using_sidekiq? + return unless using_sidekiq? || using_solidq? if procfile.size > 1 list = { "app" => "foreman start --procfile=Procfile.prod" } else list = { "app" => procfile.values.first } end - list["sidekiq"] = "bundle exec sidekiq" + if using_sidekiq? + list["sidekiq"] = "bundle exec sidekiq" + elsif using_solidq? + list["solidq"] = "bundle exec rake solid_queue:start" + end list end def more_docker_ignores