Compare commits

...

3 Commits

Author SHA1 Message Date
Matt Jankowski
b2ccb09228
Merge 0b71d2aef9 into 74fc4dbacf 2025-07-15 17:05:57 +00:00
diondiondion
74fc4dbacf
refactor: Only remove pointer-events when necessary (#35390)
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Run Chromatic (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Crowdin / Upload translations / upload-translations (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Historical data migration test / test (16-alpine) (push) Has been cancelled
Historical data migration test / test (17-alpine) (push) Has been cancelled
2025-07-15 15:57:31 +00:00
Matt Jankowski
0b71d2aef9 Move ES/chewy env var config to search area 2025-07-03 18:26:43 -04:00
5 changed files with 18 additions and 20 deletions

View File

@ -2848,7 +2848,6 @@ a.account__display-name {
&__pane { &__pane {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
pointer-events: none;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
min-width: 285px; min-width: 285px;
@ -2860,7 +2859,6 @@ a.account__display-name {
&__inner { &__inner {
position: fixed; position: fixed;
width: 285px; width: 285px;
pointer-events: auto;
height: 100%; height: 100%;
} }
} }

View File

@ -108,6 +108,7 @@ module Mastodon
config.x.email = config_for(:email) config.x.email = config_for(:email)
config.x.mastodon = config_for(:mastodon) config.x.mastodon = config_for(:mastodon)
config.x.omniauth = config_for(:omniauth) config.x.omniauth = config_for(:omniauth)
config.x.search = config_for(:search)
config.x.translation = config_for(:translation) config.x.translation = config_for(:translation)
config.x.vapid = config_for(:vapid) config.x.vapid = config_for(:vapid)

View File

@ -1,26 +1,16 @@
# frozen_string_literal: true # frozen_string_literal: true
enabled = ENV['ES_ENABLED'] == 'true'
host = ENV.fetch('ES_HOST') { 'localhost' }
port = ENV.fetch('ES_PORT') { 9200 }
user = ENV.fetch('ES_USER', nil).presence
password = ENV.fetch('ES_PASS', nil).presence
prefix = ENV.fetch('ES_PREFIX', nil)
ca_file = ENV.fetch('ES_CA_FILE', nil).presence
transport_options = { ssl: { ca_file: ca_file } } if ca_file.present?
Chewy.settings = { Chewy.settings = {
host: "#{host}:#{port}", host: "#{Rails.configuration.x.search.host}:#{Rails.configuration.x.search.port}",
prefix: prefix, prefix: Rails.configuration.x.search.prefix,
enabled: enabled, enabled: Rails.configuration.x.search.enabled,
journal: false, journal: false,
user: user, user: Rails.configuration.x.search.user,
password: password, password: Rails.configuration.x.search.password,
index: { index: {
number_of_replicas: ['single_node_cluster', nil].include?(ENV['ES_PRESET'].presence) ? 0 : 1, number_of_replicas: ['single_node_cluster', nil].include?(Rails.configuration.x.search.preset) ? 0 : 1,
}, },
transport_options: transport_options, transport_options: { ssl: { ca_file: Rails.configuration.x.search.ca_file }.compact.presence }.compact.presence,
} }
# We use our own async strategy even outside the request-response # We use our own async strategy even outside the request-response

9
config/search.yml Normal file
View File

@ -0,0 +1,9 @@
shared:
ca_file: <%= ENV.fetch('ES_CA_FILE', nil).presence %>
enabled: <%= ENV.fetch('ES_ENABLED', nil) == 'true' %>
host: <%= ENV.fetch('ES_HOST') { 'localhost' } %>
password: <%= ENV.fetch('ES_PASS', nil).presence %>
port: <%= ENV.fetch('ES_PORT') { 9200 } %>
prefix: <%= ENV.fetch('ES_PREFIX', nil) %>
preset: <%= ENV.fetch('ES_PRESET', nil).presence %>
user: <%= ENV.fetch('ES_USER', nil).presence %>

View File

@ -3,7 +3,7 @@
module Chewy module Chewy
module IndexExtensions module IndexExtensions
def index_preset(base_options = {}) def index_preset(base_options = {})
case ENV['ES_PRESET'].presence case Rails.configuration.x.search.preset
when 'single_node_cluster', nil when 'single_node_cluster', nil
base_options.merge(number_of_replicas: 0) base_options.merge(number_of_replicas: 0)
when 'small_cluster' when 'small_cluster'