From c50dc618bf0c6887e94aa75c4b2f8cf90c2abb8c Mon Sep 17 00:00:00 2001 From: Stefan Hardegger Date: Sun, 21 Sep 2025 15:47:14 +0200 Subject: [PATCH] build adjustment --- frontend/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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