fix: since node_modules is not copied, use only one copy in Dockerfile
This commit is contained in:
parent
fb7dc5f6f7
commit
96abcb9db0
@ -4,15 +4,14 @@ FROM node:22-alpine
|
|||||||
# Workdir definition
|
# Workdir definition
|
||||||
WORKDIR /usr/src/back
|
WORKDIR /usr/src/back
|
||||||
|
|
||||||
COPY package.json ./
|
|
||||||
|
|
||||||
RUN npm install
|
|
||||||
RUN npm install -g pm2
|
|
||||||
|
|
||||||
# Copy sources
|
# Copy sources
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY .env.production .env
|
COPY .env.production .env
|
||||||
|
|
||||||
|
# install deps, and pm2 to run the app
|
||||||
|
RUN npm install
|
||||||
|
RUN npm install -g pm2
|
||||||
|
|
||||||
# Compilation des fichiers TypeScript
|
# Compilation des fichiers TypeScript
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user