Docker config

This commit is contained in:
mukesh13
2025-06-16 18:18:18 +05:30
parent da3df17022
commit 4be1a13441
4 changed files with 2987 additions and 2036 deletions

View File

@ -4,18 +4,24 @@ FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package.json and pnpm-lock.yaml (if it exists)
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy only dependency files first
COPY package.json pnpm-lock.yaml* ./
# Install pnpm
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install
# Install dependencies with pnpm
RUN pnpm install --frozen-lockfile
# Copy the rest of the application code
COPY . .
# Create a cache directory for Next.js
RUN mkdir -p /app/.next/cache
# Disable telemetry
ENV NEXT_TELEMETRY_DISABLED=1
# Build the Next.js application
RUN pnpm build