]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - Dockerfile
Add healthcheck to Dockerfile
[github/bastienwirtz/homer.git] / Dockerfile
index 03751124aebfe2a0df8a084c1ea6681c4bbb9b33..d7179fc59e3a9b5864b0577f1fff57be6e6dc139 100644 (file)
@@ -23,7 +23,10 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
 
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
-COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
+COPY entrypoint.sh /entrypoint.sh
+
+HEALTHCHECK --interval=5s --timeout=5s --retries=3 \
+    CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
 
 EXPOSE ${PORT}
 VOLUME /www/assets