Change: #532 ElasticSearch設定の外出し (#650)

* Change: #532 ElasticSearch設定の外出し

* バージョンチェック

* 起動時にエラー
This commit is contained in:
KMY(雪あすか) 2024-03-12 12:11:13 +09:00 committed by GitHub
parent 8e7c66522e
commit a8fbcb3fb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 508 additions and 269 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
require_relative '../../app/lib/chewy_config'
enabled = ENV['ES_ENABLED'] == 'true'
host = ENV.fetch('ES_HOST') { 'localhost' }
port = ENV.fetch('ES_PORT') { 9200 }
@ -37,3 +39,6 @@ Chewy.use_after_commit_callbacks = false
# Mastodon is run with hidden services enabled, because
# Elasticsearch is *not* supposed to be accessed through a proxy
Faraday.ignore_env_proxy = true
# Check Elasticsearch config file version
ChewyConfig.instance.accounts if enabled