From c939ed6461ac8f54074809cb182414c3fb12e11c Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Thu, 29 Feb 2024 14:50:34 +0100 Subject: [PATCH] fix: create image using production files --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e128781..f3b4ca9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,13 @@ FROM oven/bun:latest EXPOSE 8080 +ENV NODE_ENV=production + COPY package.json ./ COPY bun.lockb ./ COPY src ./src -RUN bun install +RUN bun install --production CMD bun start HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD wget localhost:8080 -q -O - > /dev/null 2>&1