Skip to content

Commit

Permalink
Merge pull request #301 from openimis/hotfix-opensearch
Browse files Browse the repository at this point in the history
hotfix: added missing opensearch dsl config
  • Loading branch information
delcroip authored Oct 28, 2024
2 parents d996a42 + 56cb3d8 commit fe78be7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openIMIS/openIMIS/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def SITE_URL():
"developer_tools",
"drf_spectacular", # Swagger UI for FHIR API
"axes",
"django_opensearch_dsl",
]
INSTALLED_APPS += OPENIMIS_APPS
INSTALLED_APPS += ["apscheduler_runner", "signal_binding"] # Signal binding should be last installed module
Expand Down Expand Up @@ -631,6 +632,17 @@ def SITE_URL():
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

OPENSEARCH_DSL = {
'default': {
'hosts': os.environ.get("OPENSEARCH_HOST", '0.0.0.0:9200'),
'http_auth': (
f"{os.environ.get('OPENSEARCH_ADMIN')}",
f"{os.environ.get('OPENSEARCH_PASSWORD')}"
),
'timeout': 120,
}
}

PASSWORD_MIN_LENGTH = int(os.getenv('PASSWORD_MIN_LENGTH', 8))
PASSWORD_UPPERCASE = int(os.getenv('PASSWORD_UPPERCASE', 1))
PASSWORD_LOWERCASE = int(os.getenv('PASSWORD_LOWERCASE', 1))
Expand Down

0 comments on commit fe78be7

Please sign in to comment.