1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/config/initializers/elasticsearch.rb

18 lines
478 B
Ruby

# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
conf = Rails.application.settings :elasticsearch
Elasticsearch::Model.client = Elasticsearch::Client.new(
scheme: conf[:ssl] ? :https : :http,
host: String(conf[:host]),
port: Integer(conf[:port]),
user: String(conf[:user]),
password: String(conf[:password]),
transport_options: {
request: { timeout: 5 },
ssl: { ca_file: conf.dig(:ssl_params, :ca_file) },
},
)