Skip to content

Commit

Permalink
make es work in all environments
Browse files Browse the repository at this point in the history
  • Loading branch information
croyfish committed Nov 25, 2024
1 parent 71050ad commit 8ba833b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/elastic_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(_index = nil)

arguments = {
host: es_host(@es_config),
port: 443,
port: @es_config['port'],
transport_options: {
request: { open_timeout: @es_config['connect_timeout'] },
headers: { content_type: 'application/json' }
Expand Down
6 changes: 5 additions & 1 deletion config/elastic_search.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
development:
teachersets:
host: 'http://elasticsearch:9200'
host: 'http://elasticsearch'
port: 9200
connect_timeout: 3
index: 'teacherset'
type: '_doc'
Expand All @@ -10,6 +11,7 @@ development:
qa:
teachersets:
host: "AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAKswgagGCSqGSIb3DQEHBqCBmjCBlwIBADCBkQYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAxmV/rQcH0PEpTP/e0CARCAZM7Y5WpMxizb+hPnVNlHDp2MNM12elMYOcy3n7I0ix+DxfB6EfVDQoSMDSPWSf/uVlaBq/yMdEzYS3ZGN/Zzd1SrmU7N9S5aUEretGu+9/5sPu2eXl/N+mBzYxMqt00oznAf0mk="
port: 443
connect_timeout: 3
index: 'teacherset'
type: '_doc'
Expand All @@ -19,6 +21,7 @@ qa:
production:
teachersets:
host: "AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAALMwgbAGCSqGSIb3DQEHBqCBojCBnwIBADCBmQYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAz+uWwzu8aSQMbcufgCARCAbDerYV+KnsRNGPUtkRFBfynrgCR1i1h+Bx0XFJXvGMlfoqpuQh8PAWUNXjzpmoZhL2TQ9Eht+RIBIW7WlFG8jo1c0rdY4cfsA/wLdUE+VVIzb4WzX0rqS+lRjhMtyNuVJS/2YNWVmtYZAk4LJw=="
port: 443
connect_timeout: 3
index: 'teacherset'
type: '_doc'
Expand All @@ -28,6 +31,7 @@ production:
test:
teachersets:
host: 'http://elasticsearch:9200'
port: 9200
connect_timeout: 3
index: 'teacherset'
type: '_doc'
Expand Down

0 comments on commit 8ba833b

Please sign in to comment.