fix: since node_modules is not copied, use only one copy in Dockerfile

This commit is contained in:
Nemo D'ACREMONT 2024-10-26 09:33:07 +02:00
parent fb7dc5f6f7
commit 96abcb9db0
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276

View File

@ -4,15 +4,14 @@ FROM node:22-alpine
# Workdir definition
WORKDIR /usr/src/back
COPY package.json ./
RUN npm install
RUN npm install -g pm2
# Copy sources
COPY . .
COPY .env.production .env
# install deps, and pm2 to run the app
RUN npm install
RUN npm install -g pm2
# Compilation des fichiers TypeScript
RUN npm run build