Sha256: f5011143954ef9ddf654c41e92cdf9bb2ca18e30f4f829b7c32b615fe2c86e0d

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

module GovukUnicorn
  def self.configure(config)
    config.worker_processes Integer(ENV.fetch("UNICORN_WORKER_PROCESSES", 2))

    config.timeout = Integer(ENV.fetch("UNICORN_TIMEOUT", 60))

    if ENV["GOVUK_APP_LOGROOT"]
      config.stdout_path "#{ENV['GOVUK_APP_LOGROOT']}/app.out.log"
      config.stderr_path "#{ENV['GOVUK_APP_LOGROOT']}/app.err.log"
    end

    config.before_exec do |server|
      next unless ENV["GOVUK_APP_ROOT"]
      ENV["BUNDLE_GEMFILE"] = "#{ENV['GOVUK_APP_ROOT']}/Gemfile"
    end

    config.check_client_connection true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
govuk_app_config-1.15.0 lib/govuk_app_config/govuk_unicorn.rb