From f5dbc4685626324552f2e43b38af9d0fdcee8e3a Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Fri, 25 Oct 2024 02:37:28 +0300 Subject: [PATCH] build: add healthcheck for docker --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2f0c414..2740821 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ LABEL company="Winsomnia" LABEL maintainer.name="Wesser" maintainer.email="support@winsomnia.net" WORKDIR /app +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ + CMD curl --fail http://localhost:8080/health || exit 1 + FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY . .