opefully build fix
This commit is contained in:
@@ -19,12 +19,16 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Set Node.js memory limit for build
|
||||
ENV NODE_OPTIONS="--max-old-space-size=1024"
|
||||
# Set Node.js memory limit for build and debug options
|
||||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV DEBUG=*
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
# List files to ensure everything is copied correctly
|
||||
RUN ls -la
|
||||
|
||||
# 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)
|
||||
|
||||
# Production stage
|
||||
FROM node:18-alpine AS runner
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user