2014-02-07 03:15:00 +08:00
|
|
|
#!/usr/bin/env ruby
|
2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
2018-08-07 15:13:20 +08:00
|
|
|
|
2022-05-05 09:50:02 +08:00
|
|
|
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server") && Process.respond_to?(:fork)
|
2018-08-15 08:25:00 +08:00
|
|
|
ENV["UNICORN_PORT"] ||= "3000"
|
|
|
|
|
|
|
|
if ARGV[1] == "-p" && (port = ARGV[2].to_i) > 0
|
|
|
|
ENV["UNICORN_PORT"] = port.to_s
|
|
|
|
end
|
|
|
|
|
2018-08-14 06:49:57 +08:00
|
|
|
ENV["RAILS_LOGS_STDOUT"] ||= "1"
|
2021-04-30 18:50:06 +08:00
|
|
|
|
2018-08-07 15:13:20 +08:00
|
|
|
exec File.expand_path("unicorn", __dir__)
|
|
|
|
end
|
|
|
|
|
2017-08-31 12:06:56 +08:00
|
|
|
APP_PATH = File.expand_path('../config/application', __dir__)
|
2015-04-16 14:15:04 +08:00
|
|
|
require_relative '../config/boot'
|
|
|
|
require 'rails/commands'
|