diff --git a/infrastructure/docker/Dockerfile.web b/infrastructure/docker/Dockerfile.web index eb02e0e19..bd625c868 100644 --- a/infrastructure/docker/Dockerfile.web +++ b/infrastructure/docker/Dockerfile.web @@ -41,8 +41,9 @@ RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm turbo build --filter="${TURBO_ exit 1) # Verify build output exists before proceeding -RUN if [ ! -d "/app/${APP_PATH}/dist" ]; then \ - echo "ERROR: Build output directory not found at /app/${APP_PATH}/dist"; \ +# Check for .next directory (Next.js) or dist directory (Vite/other) +RUN if [ ! -d "/app/${APP_PATH}/.next" ] && [ ! -d "/app/${APP_PATH}/dist" ]; then \ + echo "ERROR: Build output directory not found at /app/${APP_PATH}/.next or /app/${APP_PATH}/dist"; \ echo "Contents of /app/${APP_PATH}:"; \ ls -la /app/${APP_PATH}/ 2>/dev/null || echo "Directory does not exist"; \ exit 1; \