Improve build performance

This commit is contained in:
Max Isom 2020-11-18 15:14:16 -05:00
parent 9c61f0c151
commit 03da595cd8
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880

View file

@ -7,9 +7,13 @@ WORKDIR /usr/app
COPY package* ./
# Install prod dependencies
RUN npm i --only=prod
# Dependencies
FROM base AS dependencies
# Install dev dependencies
RUN npm install
# Build app
@ -24,8 +28,6 @@ FROM base AS prod
COPY --from=builder /usr/app/dist dist
RUN npm i --only=prod
ENV DATA_DIR /data
CMD ["npm", "run", "start"]