Release / release (push) Failing after 10s
The runtime stage copied the whole production node_modules (495 MB, with shadcn's CLI tree, the SWC compiler and sharp) and all of .next (163 MB, 119 MB of it Turbopack's build cache). The image is now 427 MB instead of 1.04 GB: - Next.js standalone output (NEXT_OUTPUT=standalone, set by the Dockerfile; a local `next build`/`next start` is unchanged): server.js with only the traced node_modules (39 MB). images.unoptimized (nothing uses next/image) keeps sharp and libvips out of the server's trace; /_next/image answers 404. - build:worker bundles drizzle-orm, zod and ulid into dist/*.mjs and keeps only @libsql/client and libsql external; the standalone node_modules has both. - npm's cache and .next/cache are BuildKit cache mounts: reused by the next build on the same machine (Next build 30 s -> 12 s after a code change), never in a layer. - Release archives (BetterBench, both L80 tarballs) are fetched in their own stage; only the L80 binary is copied, BetterBench is installed from a bind mount. - shadcn and tw-animate-css (CSS imports, build time only) move to devDependencies; package-lock.json regenerated with npm 11 (the image's npm). Verified by building the image and running web, worker and sandbox from it: pages and /api/live answer, the worker migrates, takes the lease and finds hf, BetterBench and L80, all three healthchecks pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EooZ9biu7kFNB4eDJrwQc5
59 lines
2.1 KiB
JSON
59 lines
2.1 KiB
JSON
{
|
|
"name": "kaname",
|
|
"version": "0.16.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "concurrently -k -n web,worker -c blue,magenta \"npm:dev:web\" \"npm:dev:worker\"",
|
|
"dev:web": "next dev",
|
|
"dev:worker": "dotenv -e .env -- tsx watch src/worker/index.ts",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"worker": "tsx src/worker/index.ts",
|
|
"lint": "eslint",
|
|
"typecheck": "next typegen && tsc --noEmit",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "dotenv -e .env -- tsx src/lib/db/migrate-cli.ts",
|
|
"test": "tsx --conditions=react-server --test \"src/**/*.test.ts\"",
|
|
"build:worker": "esbuild src/worker/index.ts --bundle --platform=node --target=node24 --format=esm --external:@libsql/client --external:libsql --outfile=dist/worker.mjs && esbuild src/lib/db/migrate-cli.ts --bundle --platform=node --target=node24 --format=esm --external:@libsql/client --external:libsql --outfile=dist/migrate.mjs && esbuild src/sandbox/index.ts --bundle --platform=node --target=node24 --format=esm --external:@libsql/client --external:libsql --outfile=dist/sandbox.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.8.0",
|
|
"@libsql/client": "^0.18.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"cn": "^0.4.0",
|
|
"drizzle-orm": "^0.45.3",
|
|
"lucide-react": "^1.52.0",
|
|
"next": "16.3.8",
|
|
"next-auth": "^5.0.0-beta.32",
|
|
"next-themes": "^0.4.6",
|
|
"react": "19.2.8",
|
|
"react-dom": "19.2.8",
|
|
"react-markdown": "^10.1.0",
|
|
"rehype-raw": "^7.0.0",
|
|
"rehype-sanitize": "^6.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"server-only": "^0.0.1",
|
|
"sonner": "^2.0.8",
|
|
"ulid": "^3.0.2",
|
|
"zod": "^4.6.5"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@tailwindcss/typography": "^0.5.20",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"concurrently": "^10.0.5",
|
|
"dotenv-cli": "^11.0.0",
|
|
"drizzle-kit": "^0.31.11",
|
|
"esbuild": "^0.25.12",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.3.8",
|
|
"shadcn": "^4.21.1",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.23.15",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "^5"
|
|
}
|
|
}
|