Sha256: fd3530d3af0837f44ea29ca94f108b86c471d8ddf17bb836f04047ffad027ceb

Contents?: true

Size: 564 Bytes

Versions: 18

Compression:

Stored size: 564 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

18 entries across 18 versions & 1 rubygems

Version Path
govuk_app_config-2.2.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.1.2 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.1.1 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.1.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.0.3 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.0.2 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.0.1 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-2.0.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.20.2 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.20.1 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.20.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.19.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.18.1 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.17.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.16.3 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.16.1 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.16.0 lib/govuk_app_config/govuk_unicorn.rb
govuk_app_config-1.15.1 lib/govuk_app_config/govuk_unicorn.rb