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