chore: migrate to pnpm for package management and update CI configuration
- 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.
This commit is contained in:
+21
-5
@@ -1,14 +1,30 @@
|
||||
FROM docker-mirror.ravanertebat.ir/hub/node:22.14 AS base
|
||||
|
||||
|
||||
FROM docker-mirror.ravanertebat.ir/hub/node:22.14
|
||||
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
|
||||
|
||||
COPY ./artifacts/node/ ./
|
||||
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user