diff --git a/Dockerfile b/Dockerfile index 9d2f5524..a495233b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/next.config.mjs b/next.config.mjs index 2b30c137..f9938ab1 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -13,6 +13,9 @@ const nextConfig = { }, experimental: { optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'], + cpus: 1, + workerThreads: false, + memoryBasedWorkersCount: true, }, reactStrictMode: false, productionBrowserSourceMaps: false, diff --git a/middleware.ts b/proxy.ts similarity index 100% rename from middleware.ts rename to proxy.ts