84d34866be
- Replaced npm with pnpm in the CI configuration and Dockerfile for improved dependency management. - Updated package.json to specify pnpm as the package manager. - Modified installation instructions in README.md to reflect the use of pnpm. - Enhanced the build process in the Dockerfile to utilize pnpm for installing dependencies and building the application.
31 lines
639 B
Docker
31 lines
639 B
Docker
FROM docker-mirror.ravanertebat.ir/hub/node:22.14 AS base
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="${PNPM_HOME}:${PATH}"
|
|
|
|
WORKDIR /app
|
|
RUN corepack enable
|
|
|
|
FROM base AS deps
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
FROM base AS builder
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN pnpm run build
|
|
|
|
FROM docker-mirror.ravanertebat.ir/hub/node:22.14 AS runner
|
|
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV HOSTNAME="0.0.0.0"
|
|
|
|
COPY --from=builder /app/.next/standalone ./
|
|
COPY --from=builder /app/.next/static ./.next/static
|
|
COPY --from=builder /app/public ./public
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "server.js"]
|