Skip to content

Commit

Permalink
Get ES user and pass from env
Browse files Browse the repository at this point in the history
  • Loading branch information
sthapa committed Aug 20, 2024
1 parent 7dede65 commit 44b3c10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion froide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,13 @@ def STATICFILES_DIRS(self):

ELASTICSEARCH_INDEX_PREFIX = "froide"
ELASTICSEARCH_HOST = values.Value("localhost", environ=True, environ_name="ELASTICSEARCH_HOST")
ELASTICSEARCH_USER = values.Value("elastic", environ=True, environ_name="ELASTICSEARCH_USER")
ELASTICSEARCH_PASSWORD = values.Value("****", environ=True, environ_name="ELASTICSEARCH_PASSWORD")
ELASTICSEARCH_DSL = {
"default": {"hosts": "http://%s:9200" % ELASTICSEARCH_HOST},
"default": {
"hosts": "http://%s:9200" % ELASTICSEARCH_HOST,
'http_auth': (ELASTICSEARCH_USER, ELASTICSEARCH_PASSWORD)
},
}
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = (
"django_elasticsearch_dsl.signals.RealTimeSignalProcessor"
Expand Down

0 comments on commit 44b3c10

Please sign in to comment.