From a70a896a13b2a70e32012eafa70fdfa958242e91 Mon Sep 17 00:00:00 2001 From: Younes Date: Mon, 4 Nov 2024 19:32:59 +0100 Subject: [PATCH] chore: add health check --- Dockerfile | 6 +++++- apps/frontend/src/state/hooks.ts | 0 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 apps/frontend/src/state/hooks.ts diff --git a/Dockerfile b/Dockerfile index 89b70665..b39fb872 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,12 @@ RUN \ ############################################# FROM base AS runner WORKDIR /app -RUN apk add --no-cache ffmpeg +RUN apk add --no-cache ffmpeg curl COPY --from=builder /app . +# Add healthcheck +HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \ + CMD curl -f http://localhost:3000/ || exit 1 + CMD ["sh", "-c", "yarn prisma migrate:deploy & yarn frontend start"] diff --git a/apps/frontend/src/state/hooks.ts b/apps/frontend/src/state/hooks.ts deleted file mode 100644 index e69de29b..00000000