From d019727c0ce454059513b51890b52aed76952226 Mon Sep 17 00:00:00 2001 From: JensForstmann Date: Sun, 6 Oct 2024 20:40:04 +0200 Subject: [PATCH] Use node+tini instead of npm in Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f9ce317..01c709f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,9 @@ COPY frontend/vite.config.mts . RUN npm run build FROM node:20 +ENV TINI_VERSION=v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini +RUN chmod +x /tini COPY --from=backend_build_image /app/backend/package.json /app/backend/swagger.json /app/backend/ COPY --from=backend_build_image /app/backend/dist /app/backend/dist COPY --from=backend_build_image /app/backend/node_modules /app/backend/node_modules @@ -34,4 +37,4 @@ EXPOSE 8080 ARG COMMIT_SHA ENV COMMIT_SHA=${COMMIT_SHA} WORKDIR /app/backend -CMD ["npm", "start"] +CMD ["/tini", "node", "./dist/backend/src/index.js"]