فهرست منبع

Use health endpoint

bt90 3 سال پیش
والد
کامیت
dab18e5b40
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Dockerfile

+ 1 - 1
Dockerfile

@@ -3,7 +3,7 @@ MAINTAINER Philipp C. Heckel <philipp.heckel@gmail.com>
 
 COPY ntfy /usr/bin
 
-HEALTHCHECK --interval=60s --timeout=10s CMD wget --no-verbose --tries=1 --spider http://localhost/config.js || exit 1
+HEALTHCHECK --interval=60s --timeout=10s CMD wget -q --tries=1 http://localhost/v1/health -O - | grep -Eo '"healthy"\s*:\s*true' || exit 1
 
 EXPOSE 80/tcp
 ENTRYPOINT ["ntfy"]