fix: webpack build, low memory limits, and sitemap try/catch for Docker deploy

- Switch both storefronts from Turbopack to Webpack (next build --webpack)
- Limit build workers to 1 CPU (experimental.cpus: 1)
- Reduce NODE_OPTIONS max-old-space-size from 2048 to 1024 MB
- Wrap sitemap.ts API calls in try/catch to prevent build crash when backend is unavailable during Docker build
- During build, sitemap returns static paths only; at runtime it fetches full dynamic data
This commit is contained in:
Nermin Karic
2026-11-23 01:59:50 +01:00
parent f97a309c21
commit 899ed44562
8 changed files with 104 additions and 76 deletions

View File

@@ -9,7 +9,7 @@
],
"scripts": {
"dev": "next dev -p 8002",
"build": "next build",
"build": "next build --webpack",
"start": "next start -p 8002",
"lint": "eslint .",
"analyze": "ANALYZE=true next build"