Move node env prod step to later step

main
trivernis 5 months ago
parent 78b2fb3b8f
commit 05a721f494
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -1,7 +1,5 @@
FROM docker.io/node:20.15.0-alpine AS builder FROM docker.io/node:20.15.0-alpine AS builder
ENV NODE_ENV production
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
@ -18,5 +16,6 @@ COPY package.json package-lock.json ./
RUN npm ci --omit dev RUN npm ci --omit dev
COPY --from=builder /app/build /app COPY --from=builder /app/build /app
EXPOSE 3000 EXPOSE 3000
ENV NODE_ENV production
CMD ["node", "."] CMD ["node", "."]

Loading…
Cancel
Save