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.json pnpm-lock.yaml ./
# Install dependencies with pnpm cache mount for faster builds
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile
# Install dependencies with pnpm
RUN pnpm install --frozen-lockfile
# Copy source code after dependencies are installed (for better caching)
COPY . .
@@ -33,8 +32,7 @@ ENV API_HOSTNAME=internal-api.inboxi.ng
# Build the Next.js application with increased memory for Turbopack
# Next.js 16 uses Turbopack by default which may need more memory
RUN --mount=type=cache,id=nextjs,target=/app/.next/cache \
echo "Building with GIT_COMMIT_SHA=$(cat /app/git_commit_sha)" && \
RUN 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
# ---- Production Stage ----