2024-06-29 13:55:59 +00:00
|
|
|
FROM node:20.10.0 as dependencies
|
2024-06-27 13:05:35 +00:00
|
|
|
WORKDIR /app
|
2024-06-29 13:55:59 +00:00
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
2024-06-27 13:05:35 +00:00
|
|
|
|
2024-06-29 13:55:59 +00:00
|
|
|
FROM node:20.10.0 as builder
|
2024-06-27 13:05:35 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
COPY --from=dependencies /app/node_modules ./node_modules
|
2024-06-29 13:55:59 +00:00
|
|
|
RUN yarn build
|
2024-06-27 13:05:35 +00:00
|
|
|
|
2024-06-29 13:55:59 +00:00
|
|
|
FROM node:20.10.0 as runner
|
2024-01-11 01:08:37 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
2024-06-27 13:05:35 +00:00
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
COPY --from=builder /app/public ./public
|
|
|
|
COPY --from=builder /app/package.json ./package.json
|
|
|
|
COPY --from=builder /app/.next ./.next
|
|
|
|
COPY --from=dependencies /app/node_modules ./node_modules
|
|
|
|
|
|
|
|
EXPOSE 4200
|
2024-06-29 13:55:59 +00:00
|
|
|
CMD ["yarn", "start"]
|