Add healthchecks for single node deployment

This commit is contained in:
Victor Carlos Erenu
2026-03-16 21:51:00 +07:00
parent c64411b4f5
commit 1f6977a06b
+6 -8
View File
@@ -55,7 +55,7 @@ services:
environment: environment:
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g - OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
- bootstrap.memory_lock=true - bootstrap.memory_lock=true
- network.host=wazuh.indexer - network.host=0.0.0.0
- node.name=wazuh.indexer - node.name=wazuh.indexer
- cluster.initial_cluster_manager_nodes=wazuh.indexer - cluster.initial_cluster_manager_nodes=wazuh.indexer
- node.max_local_storage_nodes=1 - node.max_local_storage_nodes=1
@@ -69,13 +69,11 @@ services:
soft: 65536 soft: 65536
hard: 65536 hard: 65536
healthcheck: healthcheck:
test: test: [ "CMD-SHELL", "curl -s -k -u $$INDEXER_USERNAME:$$INDEXER_PASSWORD https://localhost:9200/_cluster/health" ]
- "CMD-SHELL" interval: 10s
- "curl -k -s -u $${INDEXER_USERNAME}:$${INDEXER_PASSWORD} https://localhost:9200/_cluster/health | grep -vq '\"status\":\"red\"'" timeout: 5s
interval: 30s retries: 10
timeout: 10s start_period: 30s
retries: 5
start_period: 60s
volumes: volumes:
- wazuh-indexer-data:/var/lib/wazuh-indexer - wazuh-indexer-data:/var/lib/wazuh-indexer
- ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem - ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem