File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ EXPOSE 8080
4545RUN apk --no-cache add tini
4646ENTRYPOINT ["/sbin/tini" , "-g" , "--" ]
4747CMD ["docker-flow-proxy" , "server" ]
48- HEALTHCHECK --interval=5s --start-period=3s --timeout=5s CMD check.sh
48+ HEALTHCHECK --interval=5s --start-period=3s --timeout=10s CMD check.sh
4949
5050COPY scripts/check.sh /usr/local/bin/check.sh
5151RUN chmod +x /usr/local/bin/check.sh
Original file line number Diff line number Diff line change 1- if [[ " $HEALTHCHECK " = " true" ]] ; then
1+ if [[ " $HEALTHCHECK " == " true" ]]; then
22
33 wget -qO- " http://localhost:8080/v1/docker-flow-proxy/ping"
44
5- if [[ $? -ne 0 ]] ; then
5+ if [[ $? -ne 0 ]]; then
66 echo " ERROR: Failed to ping docker-flow-proxy"
77 exit 1
88 fi
99
1010 pgrep -x " haproxy"
1111
12- if [[ $? -ne 0 ]] ; then
12+ if [[ $? -ne 0 ]]; then
1313 echo " ERROR: haproxy process is not running"
1414 exit 1
1515 fi
1616
17+ if [[ " $LISTENER_ADDRESS " != " " ]]; then
18+ wget -qO- " http://${LISTENER_ADDRESS} :8080/v1/docker-flow-swarm-listener/ping"
19+
20+ if [[ $? -ne 0 ]]; then
21+ echo " ERROR: Unable to ping ${LISTENER_ADDRESS} "
22+ exit 1
23+ fi
24+
25+ wget -qO- " http://localhost:8080/v1/docker-flow-proxy/reload"
26+
27+ if [[ $? -ne 0 ]]; then
28+ echo " ERROR: Unable to reload docker flow proxy"
29+ exit 1
30+ fi
31+ fi
32+
1733fi
1834
1935exit 0
You can’t perform that action at this time.
0 commit comments