attempting to make docker package smaller, and take less memory

This commit is contained in:
Amruth Pillai
2022-03-03 20:05:22 +01:00
parent 5fc7a32c67
commit ed6578b052
6 changed files with 190 additions and 235 deletions

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/playwright:focal AS build
FROM node AS build
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
@ -18,9 +18,16 @@ RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
WORKDIR /app
COPY --from=build /app/package.json .
COPY --from=build /app/pnpm-lock.yaml .
COPY --from=build /app/dist ./dist
RUN pnpm install --frozen-lockfile --prod
# Expose App
EXPOSE 3000
# Export Server
EXPOSE 3100
CMD [ "pnpm", "start" ]