A platform for community discussion. Free, open, simple.
DEV: Add performance warning message when running `rails s` (#12912)
David Taylor0188d53f3a57
diff --git a/bin/rails b/bin/railsindex cdc2c4c16b3..f95c5282d16 100755--- a/bin/rails+++ b/bin/rails@@ -9,6 +9,18 @@ if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")endENV["RAILS_LOGS_STDOUT"] ||= "1"++ STDERR.puts <<~MESSAGE+ --------+ WARNING: Discourse uses `bin/unicorn` to start the web server.+ For backwards compatibility, `rails s` will do this automatically.+ For improved performance you should run `bin/unicorn` directly.++ Running:+ UNICORN_PORT=#{ENV["UNICORN_PORT"]} RAILS_LOGS_STDOUT=#{ENV["RAILS_LOGS_STDOUT"]} bin/unicorn+ --------+ MESSAGE+exec File.expand_path("unicorn", __dir__)end