2025-12-03 12:13:32 +07:00
|
|
|
FROM node:22.20.0 AS dependencies
|
|
|
|
|
WORKDIR /no-copy-frontend
|
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
|
|
FROM node:22.20.0 AS builder
|
|
|
|
|
WORKDIR /no-copy-frontend
|
2025-12-04 13:32:23 +07:00
|
|
|
|
2026-02-11 19:28:16 +07:00
|
|
|
ARG BUILD_TIME_FRONT
|
|
|
|
|
ENV NEXT_PUBLIC_BUILD_TIME_FRONT=$BUILD_TIME_FRONT
|
|
|
|
|
|
2025-12-03 12:13:32 +07:00
|
|
|
COPY . .
|
|
|
|
|
COPY --from=dependencies /no-copy-frontend/node_modules ./node_modules
|
2026-02-04 17:26:33 +07:00
|
|
|
RUN rm -rf .next && npm run build --force
|
2025-12-03 12:13:32 +07:00
|
|
|
|
|
|
|
|
FROM node:22.20.0 AS runner
|
|
|
|
|
WORKDIR /no-copy-frontend
|
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /no-copy-frontend/public ./public
|
|
|
|
|
COPY --from=builder /no-copy-frontend/package.json ./package.json
|
|
|
|
|
COPY --from=builder /no-copy-frontend/.next ./.next
|
|
|
|
|
COPY --from=builder /no-copy-frontend/node_modules ./node_modules
|
|
|
|
|
|
|
|
|
|
EXPOSE 2999
|
|
|
|
|
CMD ["npm", "start"]
|