Skip to content

Commit

Permalink
Merge pull request #29 from humanmade/es-healthcheck
Browse files Browse the repository at this point in the history
Add healthcheck to Elasticsearch
  • Loading branch information
roborourke authored May 17, 2019
2 parents f4b02bf + fcc42d0 commit f7b01ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ x-php: &php
redis:
condition: service_started
elasticsearch:
condition: service_started
condition: service_healthy
xray:
condition: service_started
image: humanmade/altis-local-server-php
Expand Down Expand Up @@ -59,7 +59,8 @@ services:
MYSQL_PASSWORD: wordpress
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "wordpress", "-pwordpress" ]
timeout: 20s
timeout: 5s
interval: 5s
retries: 10
redis:
image: redis:3.2-alpine
Expand Down Expand Up @@ -113,6 +114,11 @@ services:
- "9200"
networks:
- proxy
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 5s
timeout: 5s
retries: 10
labels:
- "traefik.port=9200"
- "traefik.protocol=http"
Expand Down
1 change: 1 addition & 0 deletions docker/elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FROM blacktop/elasticsearch:6.3
RUN bin/elasticsearch-plugin install --batch --silent ingest-attachment
RUN apk add --no-cache curl

0 comments on commit f7b01ae

Please sign in to comment.