chore: optimize nextjs build memory and rename middleware
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 2m5s
Build & Deploy / 🏗️ Build (push) Successful in 4m3s
Build & Deploy / 🚀 Deploy (push) Successful in 20s
Build & Deploy / ⚡ Performance & Accessibility (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled

This commit is contained in:
2026-02-26 02:47:49 +01:00
parent f8b7d4f59d
commit 7cad437eb4
3 changed files with 5 additions and 2 deletions

View File

@@ -41,8 +41,8 @@ CMD ["pnpm", "dev:local"]
# Build application
# Stage 3: Builder (Production)
FROM base AS builder
# Limit memory to 2GB to prevent ResourceExhausted on 4GB runner
ENV NODE_OPTIONS="--max-old-space-size=2048"
# Limit memory to 1GB to prevent ResourceExhausted in combination with worker limits
ENV NODE_OPTIONS="--max-old-space-size=1024"
RUN pnpm build
# Stage 3: Runner

View File

@@ -13,6 +13,9 @@ const nextConfig = {
},
experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'],
cpus: 1,
workerThreads: false,
memoryBasedWorkersCount: true,
},
reactStrictMode: false,
productionBrowserSourceMaps: false,