2024-04-26 21:08:24 +00:00
|
|
|
FROM node:18-alpine AS builder
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
COPY . /app
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
RUN cd /app && yarn install && yarn build
|
2024-04-13 21:34:10 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
FROM node:18-alpine
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
RUN mkdir /app
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
COPY --from=builder /app/build /app/build
|
|
|
|
COPY --from=builder /app/package.json /app/yarn.lock /app/
|
2024-04-13 21:34:10 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
RUN cd /app && \
|
|
|
|
yarn install --production &&\
|
|
|
|
yarn cache clean
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
WORKDIR /app
|
2024-04-26 15:30:48 +00:00
|
|
|
|
2024-04-26 21:08:24 +00:00
|
|
|
CMD ["node", "build/index.js"]
|