Barazo AppView backend barazo.forum

fix(docker): use pnpm deploy for lexicons, direct copy for plugin-signatures (#154)

plugin-signatures is not a pnpm workspace member (nested under
barazo-plugins/) so pnpm deploy --filter fails for it. Since it only
has peerDependencies (already in the API's node_modules), a direct
copy of the built source is sufficient.

authored by

Guido X Jansen and committed by
GitHub
8b669b43 2630501a

+6 -7
+6 -7
Dockerfile
··· 53 53 RUN pnpm --filter barazo-api deploy /app/deploy --prod 54 54 55 55 # pnpm deploy creates symlinks for workspace packages that point back to 56 - # /workspace/, which won't exist in the runner stage. Deploy each workspace 57 - # package separately (resolves their dependencies), then merge into the 58 - # API's node_modules. 59 - RUN pnpm --filter @singi-labs/lexicons deploy /tmp/lexicons-deploy --prod \ 60 - && pnpm --filter @barazo/plugin-signatures deploy /tmp/sigs-deploy --prod 56 + # /workspace/, which won't exist in the runner stage. Fix each: 57 + # - lexicons: use pnpm deploy to get package + resolved dependencies 58 + # - plugin-signatures: only has peerDeps (satisfied by API), copy source directly 59 + RUN pnpm --filter @singi-labs/lexicons deploy /tmp/lexicons-deploy --prod 61 60 62 61 RUN rm -rf /app/deploy/node_modules/@singi-labs/lexicons \ 63 - && rm -rf /app/deploy/node_modules/@barazo/plugin-signatures \ 64 62 && cp -r /tmp/lexicons-deploy /app/deploy/node_modules/@singi-labs/lexicons \ 65 - && cp -r /tmp/sigs-deploy /app/deploy/node_modules/@barazo/plugin-signatures 63 + && rm -rf /app/deploy/node_modules/@barazo/plugin-signatures \ 64 + && cp -r /workspace/barazo-plugins/packages/plugin-signatures /app/deploy/node_modules/@barazo/plugin-signatures 66 65 67 66 # --------------------------------------------------------------------------- 68 67 # Stage 3: Production runner