diff --git a/Dockerfile.worker b/Dockerfile.worker index c21a1c6..33d0d70 100644 --- a/Dockerfile.worker +++ b/Dockerfile.worker @@ -29,6 +29,11 @@ WORKDIR /app RUN chown -R worker:nodejs /app USER worker COPY --chown=worker:nodejs package.json pnpm-lock.yaml ./ +# HUSKY=0 skips the husky install during the `prepare` script — husky is a +# dev dependency so it's not present in --prod installs, and without this +# guard pnpm install fails with "sh: husky: not found" (husky 9+ honors +# the HUSKY=0 env var as the official CI/Docker skip mechanism). +ENV HUSKY=0 RUN pnpm install --frozen-lockfile --prod COPY --from=builder --chown=worker:nodejs /app/dist/worker.js ./worker.js # Healthcheck — pings Redis from inside the worker container. Without