Skip to content

Commit

Permalink
health check workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
yevhen-cap committed Aug 21, 2024
1 parent c2896fc commit 8c980ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ RESOURCE_AUTHORIZATIONS_ENABLED=false
# ZEEBE_AUTHENTICATION_MODE=identity
#
MULTI_TENANCY_ENABLED=false

OPENSEARCH_INITIAL_ADMIN_PASSWORD=OpenSearch_Admin1234!
15 changes: 8 additions & 7 deletions docker-compose.opensearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ services:
opensearch:
image: opensearchproject/opensearch:${OPENSEARCH_VERSION}
container_name: opensearch
# depends_on:
# - opensearch-init
depends_on:
- opensearch-init
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch
Expand All @@ -347,7 +347,7 @@ services:
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- path.repo=/usr/local/os-snapshots
- "OPENSEARCH_JAVA_OPTS=-Xms1G -Xmx1G" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=OpenSearch_Admin1234!
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
Expand All @@ -360,10 +360,11 @@ services:
- "9601:9600"
restart: always
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cat/health | grep -q green" ]
interval: 30s
timeout: 240s
retries: 3
# test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s | grep -q green" ]
test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow | grep -q -E 'yellow|green'" ]
interval: 60s
timeout: 30s
retries: 5
volumes:
# - opensearch-data:/usr/share/opensearch/data
- ./os-snapshots:/usr/local/os-snapshots
Expand Down

0 comments on commit 8c980ff

Please sign in to comment.