2023-07-24 06:06:24 -07:00
|
|
|
FROM node:20-alpine as dev
|
2022-06-14 20:06:42 +10:00
|
|
|
|
|
|
|
ENV NODE_ENV=development
|
|
|
|
|
|
|
|
WORKDIR /usr/app
|
|
|
|
|
|
|
|
COPY yarn.lock .
|
|
|
|
COPY package.json .
|
2022-07-26 18:09:26 +10:00
|
|
|
RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/*
|
2022-08-02 15:46:14 +10:00
|
|
|
RUN yarn install
|
2022-06-29 20:02:30 +10:00
|
|
|
COPY . ./
|
2019-07-18 16:22:56 +03:00
|
|
|
|
2022-06-14 20:06:42 +10:00
|
|
|
RUN yarn build
|
|
|
|
|
2023-07-24 06:06:24 -07:00
|
|
|
FROM node:20-alpine as prod
|
2022-06-14 20:06:42 +10:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2022-07-26 18:09:26 +10:00
|
|
|
RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/*
|
2022-06-29 20:02:30 +10:00
|
|
|
|
2022-07-28 17:29:03 +10:00
|
|
|
COPY --from=dev /usr/app/ /app
|
2022-06-14 20:06:42 +10:00
|
|
|
COPY --from=dev /usr/app/package.json /app/
|
|
|
|
COPY --from=dev /usr/app/yarn.lock /app/
|
|
|
|
|
2022-08-02 14:42:51 +10:00
|
|
|
RUN yarn install && yarn cache clean -f
|
2022-06-14 20:06:42 +10:00
|
|
|
|
2022-07-04 21:56:05 +10:00
|
|
|
ENTRYPOINT ["yarn"]
|