fix(super-sync-server): Correct Dockerfile for npm workspace hoisted deps

This commit fixes an issue where the super-sync-server Docker image failed to start due to missing node_modules. When using npm workspaces, many dependencies are hoisted to the root node_modules directory. The previous Dockerfile only copied the workspace-specific node_modules, omitting these hoisted dependencies.

The fix changes the COPY command in the production stage of the Dockerfile to copy the root /app/node_modules, ensuring all necessary dependencies, including 'fastify', are present in the final image.
This commit is contained in:
Johannes Millan 2025-12-11 14:58:25 +01:00
parent 7b4df257cf
commit 6cd93e57b3

View file

@ -51,7 +51,7 @@ RUN addgroup -g 1001 -S nodejs && \
# Copy built artifacts from builder
COPY --from=builder /app/packages/super-sync-server/dist ./dist
COPY --from=builder /app/packages/super-sync-server/node_modules ./node_modules
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/super-sync-server/package.json ./
COPY --from=builder /app/packages/super-sync-server/prisma ./prisma