From 7678700dbb4bf9646c9310c2c1754d2efab2c128 Mon Sep 17 00:00:00 2001 From: Pepe44DEV Date: Sun, 6 Sep 2026 23:08:43 +0000 Subject: [PATCH] fix(docker): keep dist inside apps/ so pnpm node_modules symlinks (relative to package dir) stay valid in runner --- infrastructure/docker/Dockerfile.api | 8 ++++---- infrastructure/docker/Dockerfile.worker | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/infrastructure/docker/Dockerfile.api b/infrastructure/docker/Dockerfile.api index 4136818..54d21c9 100644 --- a/infrastructure/docker/Dockerfile.api +++ b/infrastructure/docker/Dockerfile.api @@ -20,9 +20,9 @@ FROM node:20-alpine AS runner WORKDIR /app RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 fleetforge COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/apps/api/node_modules ./node_modules -COPY --from=builder /app/apps/api/dist ./dist -COPY --from=builder /app/apps/api/package.json ./ +COPY --from=builder /app/apps/api/node_modules ./apps/api/node_modules +COPY --from=builder /app/apps/api/dist ./apps/api/dist +COPY --from=builder /app/apps/api/package.json ./apps/api/ USER fleetforge EXPOSE 3000 -CMD ["node", "dist/index.js"] +CMD ["node", "apps/api/dist/index.js"] diff --git a/infrastructure/docker/Dockerfile.worker b/infrastructure/docker/Dockerfile.worker index 9db0a4b..b66efac 100644 --- a/infrastructure/docker/Dockerfile.worker +++ b/infrastructure/docker/Dockerfile.worker @@ -20,8 +20,8 @@ FROM node:20-alpine AS runner WORKDIR /app RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 fleetforge COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/apps/worker/node_modules ./node_modules -COPY --from=builder /app/apps/worker/dist ./dist -COPY --from=builder /app/apps/worker/package.json ./ +COPY --from=builder /app/apps/worker/node_modules ./apps/worker/node_modules +COPY --from=builder /app/apps/worker/dist ./apps/worker/dist +COPY --from=builder /app/apps/worker/package.json ./apps/worker/ USER fleetforge -CMD ["node", "dist/index.js"] +CMD ["node", "apps/worker/dist/index.js"]