diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 9b3d4cf..07beb07 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -26,12 +26,15 @@ ENV NEXT_TELEMETRY_DISABLED=1 # 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) +# Force clean build - remove any cached build artifacts +RUN rm -rf .next || true + +# Build the application with verbose logging +RUN npm run build # 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/standalone/ || (echo ".next/standalone directory not found!" && cat build.log && exit 1) RUN ls -la .next/static/ || (echo ".next/static directory not found!" && exit 1) # Production stage