🩹 tdrive-node: Use npm ci instead of yarn and npm install

This commit is contained in:
Eric Doughty-Papassideris
2024-03-05 15:56:29 +01:00
committed by Anton Shepilov
parent 2cc332e3cb
commit 79f0050ac8
+3 -3
View File
@@ -24,14 +24,14 @@ FROM node-base as installed-libs
COPY backend/node/ . COPY backend/node/ .
#Install dev dependancies for build #Install dev dependancies for build
RUN export NODE_ENV=development RUN export NODE_ENV=development
RUN npm install RUN npm ci
#Build in production mode #Build in production mode
RUN export NODE_ENV=production RUN export NODE_ENV=production
RUN npm run build RUN npm run build
RUN rm -rf node_modules RUN rm -rf node_modules
#Install prod dependancies after build #Install prod dependancies after build
RUN npm install --legacy-peer-deps RUN npm ci --legacy-peer-deps
# Development Stage # Development Stage
FROM installed-libs as development FROM installed-libs as development
@@ -39,7 +39,7 @@ FROM installed-libs as development
ENV NODE_ENV=development ENV NODE_ENV=development
RUN npm install -g pino-pretty && \ RUN npm install -g pino-pretty && \
npm install -g tsc-watch && \ npm install -g tsc-watch && \
yarn install npm ci
CMD ["npm", "run", "dev:debug"] CMD ["npm", "run", "dev:debug"]
# Production Stage # Production Stage