Update Dockerfile

This commit is contained in:
g
2026-01-11 07:58:06 +00:00
parent acc8c2aa09
commit 862f4ac874

View File

@@ -15,9 +15,8 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy package files for dependency installation # Copy package files for dependency installation
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./
# Install dependencies with pnpm cache mount for faster builds # Install dependencies with pnpm
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \ RUN pnpm install --frozen-lockfile
pnpm install --frozen-lockfile
# Copy source code after dependencies are installed (for better caching) # Copy source code after dependencies are installed (for better caching)
COPY . . COPY . .
@@ -33,8 +32,7 @@ ENV API_HOSTNAME=internal-api.inboxi.ng
# Build the Next.js application with increased memory for Turbopack # Build the Next.js application with increased memory for Turbopack
# Next.js 16 uses Turbopack by default which may need more memory # Next.js 16 uses Turbopack by default which may need more memory
RUN --mount=type=cache,id=nextjs,target=/app/.next/cache \ RUN echo "Building with GIT_COMMIT_SHA=$(cat /app/git_commit_sha)" && \
echo "Building with GIT_COMMIT_SHA=$(cat /app/git_commit_sha)" && \
NODE_OPTIONS='--max_old_space_size=4096' NEXT_TELEMETRY_DISABLED=1 pnpm run build NODE_OPTIONS='--max_old_space_size=4096' NEXT_TELEMETRY_DISABLED=1 pnpm run build
# ---- Production Stage ---- # ---- Production Stage ----