@@ -30,11 +30,14 @@ COPY packages/wdio-testplanit-reporter/package.json ./packages/wdio-testplanit-r
3030# frozen install reads these, so they must be present before it runs.
3131COPY patches ./patches/
3232
33- # Install only the testplanit project 's dependencies (it has no workspace deps ).
33+ # Install testplanit's dependencies (includes the @testplanit/api workspace pkg ).
3434RUN pnpm install --frozen-lockfile --filter testplanit --ignore-scripts
3535
36- # App source.
36+ # App source, plus the @testplanit/api workspace package it imports. Its built
37+ # dist is committed (and un-ignored in .dockerignore); without it the workspace
38+ # symlink resolves to an empty dir and `next build` cannot resolve @testplanit/api.
3739COPY testplanit/ ./testplanit/
40+ COPY packages/api ./packages/api/
3841
3942WORKDIR /app/testplanit
4043# Version info: use the pre-generated file if present, else derive it.
@@ -79,6 +82,9 @@ RUN pnpm install --frozen-lockfile --filter testplanit --ignore-scripts
7982# Produce a self-contained production node_modules for testplanit (no symlinks
8083# pointing outside the deploy dir), suitable for copying into the final images.
8184COPY testplanit/ ./testplanit/
85+ # @testplanit/api workspace dependency, so `pnpm deploy` bundles it into the
86+ # self-contained production node_modules.
87+ COPY packages/api ./packages/api/
8288RUN pnpm --filter=testplanit deploy --prod --legacy --ignore-scripts /app/deploy
8389# Rebuild native modules in the deployed tree.
8490RUN cd /app/deploy && npm rebuild bcrypt sharp 2>/dev/null || true
0 commit comments