adjustment
This commit is contained in:
@@ -19,10 +19,9 @@ WORKDIR /app
|
|||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Set Node.js memory limit for build and debug options
|
# Set Node.js memory limit for build
|
||||||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV DEBUG=*
|
|
||||||
|
|
||||||
# List files to ensure everything is copied correctly
|
# List files to ensure everything is copied correctly
|
||||||
RUN ls -la
|
RUN ls -la
|
||||||
@@ -30,6 +29,11 @@ RUN ls -la
|
|||||||
# Build the application with better error handling
|
# Build the application with better error handling
|
||||||
RUN set -e && npm run build 2>&1 | tee build.log || (echo "Build failed! Last 50 lines of output:" && tail -50 build.log && exit 1)
|
RUN set -e && npm run build 2>&1 | tee build.log || (echo "Build failed! Last 50 lines of output:" && tail -50 build.log && exit 1)
|
||||||
|
|
||||||
|
# Verify the build output exists
|
||||||
|
RUN ls -la .next/ || (echo ".next directory not found!" && exit 1)
|
||||||
|
RUN ls -la .next/standalone/ || (echo ".next/standalone directory not found!" && exit 1)
|
||||||
|
RUN ls -la .next/static/ || (echo ".next/static directory not found!" && exit 1)
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:18-alpine AS runner
|
FROM node:18-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Reference in New Issue
Block a user