lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.22 vs lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.23
- old
+ new
@@ -334,10 +334,14 @@
if fix_database_config
template "database.yml.erb", "config/database.yml",
force: File.exist?("fly.toml")
end
+ if using_solidq? && deploy_database == "sqlite3" && File.exist?("config/puma.rb")
+ append_to_file "config/puma.rb", "\n# Run the Solid Queue's supervisor\nplugin :solid_queue\n"
+ end
+
if using_litefs?
template "litefs.yml.erb", "config/litefs.yml"
fly_attach_consul
end
@@ -1246,11 +1250,15 @@
end
if using_sidekiq?
list["sidekiq"] = "bundle exec sidekiq"
elsif using_solidq?
- list["solidq"] = "bundle exec rake solid_queue:start"
+ if deploy_database == "sqlite3"
+ return if list.size <= 1
+ else
+ list["solidq"] = "bundle exec rake solid_queue:start"
+ end
end
list
end
@@ -1275,10 +1283,10 @@
def compose_web_volumes
volumes = %w[ log storage ]
if deploy_database == "sqlite3"
- database = YAML.load_file("config/database.yml", aliases: true).dig("production", "database")
+ database = YAML.load_file("config/database.yml", aliases: true).dig("production", "database") rescue nil
if database && database =~ /^\w/
volumes << File.dirname(database)
end
end