fix(docker): use pnpm deploy for embedder runtime image

The previous Dockerfile copied apps/embedder/node_modules straight from
the deps stage, but with pnpm's default isolated layout that directory
is a farm of relative symlinks pointing into the root .pnpm store. With
the root node_modules absent in the runtime image, every dependency
resolution failed (fastify, @xenova/transformers, ...).

pnpm deploy --prod writes a portable directory with flat node_modules
that resolves cleanly from a fresh WORKDIR. The `files` field on the
embedder package opts dist/ into the deployed output (the workspace
.gitignore would otherwise exclude it).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-15 09:09:40 -07:00
co-authored by Claude Opus 4.7
parent 9a8b504f51
commit a6f944b44d
2 changed files with 12 additions and 11 deletions
+1
View File
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"type": "module",
"files": ["dist", "package.json"],
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc --noEmit",