forked from wazuh/wazuh-docker
Add healthchecks to docker deployments
This commit is contained in:
@@ -5,6 +5,14 @@ services:
|
||||
hostname: wazuh.manager
|
||||
container_name: single-node-wazuh.manager
|
||||
restart: always
|
||||
depends_on:
|
||||
wazuh.indexer:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "curl -s -k -I -u $$API_USERNAME:$$API_PASSWORD https://localhost:55000/security/user/authenticate > /dev/null || exit 1" ]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
@@ -60,6 +68,14 @@ services:
|
||||
nofile:
|
||||
soft: 65536
|
||||
hard: 65536
|
||||
healthcheck:
|
||||
test:
|
||||
- "CMD-SHELL"
|
||||
- "curl -k -s -u $${INDEXER_USERNAME}:$${INDEXER_PASSWORD} https://localhost:9200/_cluster/health | grep -vq '\"status\":\"red\"'"
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
volumes:
|
||||
- wazuh-indexer-data:/var/lib/wazuh-indexer
|
||||
- ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem
|
||||
@@ -73,6 +89,12 @@ services:
|
||||
hostname: wazuh.dashboard
|
||||
container_name: single-node-wazuh.dashboard
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-k", "-s", "-o", "/dev/null", "https://localhost:5601/login" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
ports:
|
||||
- 443:5601
|
||||
environment:
|
||||
@@ -96,10 +118,10 @@ services:
|
||||
- wazuh-dashboard-config:/usr/share/wazuh-dashboard/config
|
||||
- wazuh-dashboard-custom:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom
|
||||
depends_on:
|
||||
- wazuh.indexer
|
||||
links:
|
||||
- wazuh.indexer:wazuh.indexer
|
||||
- wazuh.manager:wazuh.manager
|
||||
wazuh.indexer:
|
||||
condition: service_healthy
|
||||
wazuh.manager:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
wazuh_api_configuration:
|
||||
|
||||
Reference in New Issue
Block a user