Skip to content

Commit

Permalink
Use node+tini instead of npm in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
JensForstmann committed Oct 6, 2024
1 parent dba9e77 commit d019727
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]

0 comments on commit d019727

Please sign in to comment.