Files
History-client/Dockerfile
AzenKain 780bb9609a
All checks were successful
Build and Release / release (push) Successful in 39s
init
2026-04-20 09:40:59 +07:00

38 lines
663 B
Docker

FROM node:24-alpine AS base
# Stage 1: Dependencies Installation
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
# Stage 2: Application Build
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
COPY .env .env
RUN npm run build
# Stage 3: Production Runner
FROM node:24-alpine AS runner
WORKDIR /app
# copy env runtime
COPY --from=builder /app/.env .env
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
USER node
EXPOSE 3000
CMD ["node", "server.js"]