File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ RUN cd /usr/share && \
1313
1414EXPOSE 9200 9300
1515
16+ HEALTHCHECK --timeout=5s CMD wget -q -O - http://$HOSTNAME:9200/_cat/health
17+
1618ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
1719 DEFAULT_ES_USER=elasticsearch \
1820 ES_JAVA_OPTS="-Xms1g -Xmx1g"
Original file line number Diff line number Diff line change @@ -72,6 +72,22 @@ tdvfilj370yn es_master replicated 1/1 es
7272
7373As you can see, there is also a Kibana instance included and available at port 5601.
7474
75+ # Health Checks
76+
77+ This container declares a [ HEALTHCHECK] ( https://docs.docker.com/engine/reference/builder/#/healthcheck ) that queries the ` _cat/health `
78+ endpoint for a quick, one-line gauge of health every 30 seconds.
79+
80+ The current health of the container is shown in the ` STATUS ` column of ` docker ps ` , such as
81+
82+ Up 14 minutes (healthy)
83+
84+ You can also check the history of health checks from ` inspect ` , such as:
85+
86+ ```
87+ > docker inspect -f "{{json .State.Health}}" es
88+ {"Status":"healthy","FailingStreak":0,"Log":[...
89+ ```
90+
7591# Configuration Summary
7692
7793## Ports
You can’t perform that action at this time.
0 commit comments