- update dockerfile

This commit is contained in:
oonyeje 2023-12-01 10:23:17 -05:00
parent 0e0e10bfe5
commit bb0b75126a

View File

@ -6,20 +6,22 @@ WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./
COPY . . COPY . .
RUN npm install yarn
RUN yarn install RUN yarn install
# RUN yarn build RUN yarn build
FROM base as runtime # FROM base as runtime
# ENV NODE_ENV=production # ENV NODE_ENV=production
WORKDIR /home/node/app # WORKDIR /home/node/app
COPY package*.json ./ # COPY package*.json ./
RUN npm install yarn # RUN npm install yarn
RUN yarn install --production # RUN yarn build
COPY --from=builder /home/node/app/dist ./dist # RUN yarn install --production
COPY --from=builder /home/node/app/build ./build # COPY --from=runtime /home/node/app/dist ./dist
# COPY --from=runtime /home/node/app/build ./build
EXPOSE 3000 EXPOSE 3000