260323:1443 fix CI : Deploy : Turbopack Build Error #01
CI / CD Pipeline / build (push) Successful in 8m6s
CI / CD Pipeline / deploy (push) Failing after 3m42s

This commit is contained in:
admin
2026-03-23 14:43:57 +07:00
parent d20eb945fa
commit 8548de9a94
2 changed files with 10 additions and 14 deletions
+9 -8
View File
@@ -15,7 +15,7 @@
# =========================
# Stage 1: Install Dependencies
# =========================
FROM node:22-alpine AS deps
FROM node:22-slim AS deps
RUN corepack enable && corepack prepare pnpm@10.32.1 --activate
@@ -31,7 +31,7 @@ RUN pnpm install --frozen-lockfile --filter lcbp3-frontend...
# =========================
# Stage 2: Build Application
# =========================
FROM node:22-alpine AS build
FROM node:22-slim AS build
RUN corepack enable && corepack prepare pnpm@10.32.1 --activate
@@ -76,7 +76,7 @@ RUN pnpm --filter lcbp3-frontend deploy /deploy --prod --legacy
# =========================
# Stage 3: Production Runtime
# =========================
FROM node:22-alpine AS production
FROM node:22-slim AS production
WORKDIR /app
@@ -85,12 +85,13 @@ ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV PORT=3000
# Create non-root user
RUN addgroup -g 1001 -S nextjs && \
adduser -S nextjs -u 1001
# Create non-root user (Debian version)
RUN groupadd -g 1001 nextjs && \
useradd -u 1001 -g 1001 -m -s /bin/bash nextjs
# Install curl for healthcheck
RUN apk add --no-cache curl
# Install curl for healthcheck (Debian version)
RUN apt-get update && apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*
# Copy flat node_modules from pnpm deploy (no symlinks, Docker-safe)
COPY --from=build --chown=nextjs:nextjs /deploy/node_modules ./node_modules
+1 -6
View File
@@ -37,12 +37,7 @@ const nextConfig = {
},
*/
// 5. Turbopack config for Next.js 16
turbopack: {
// Empty config to silence Turbopack warnings
},
// 5.1. Webpack config (fallback for Turbopack)
// 5. Webpack config (fallback for Turbopack)
webpack: (config, { dev, isServer }) => {
if (!dev && !isServer) {
config.stats = {