From 2fa46e97eded3b87478032fc1808ece15e9ea1a8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 00:03:17 +0000 Subject: [PATCH] Set STACK_SKIP_TEMPLATE_GENERATION as Docker ENV The preinstall hook tries to run generate-sdks.ts which doesn't exist in the turbo-pruned output. Setting as ENV ensures it persists across all RUN steps, not just the install command. Also adds cache mount to backend Dockerfile install step for consistency with server and local-emulator Dockerfiles. Co-Authored-By: Konstantin Wohlwend --- docker/backend/Dockerfile | 5 ++++- docker/local-emulator/Dockerfile | 5 ++++- docker/server/Dockerfile | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3bd2bf44a..850658277 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -38,6 +38,9 @@ RUN turbo prune --scope=@hexclave/backend --docker # Build stage FROM base AS builder +# Skip generate-sdks.ts in preinstall hook (file not available in pruned output) +ENV STACK_SKIP_TEMPLATE_GENERATION=true + COPY --from=pruner /app/out/json/ . COPY --from=pruner /app/out/pnpm-lock.yaml . COPY .gitignore . @@ -45,7 +48,7 @@ COPY pnpm-workspace.yaml . COPY turbo.json . COPY configs ./configs COPY --from=pruner /app/scripts/postinstall-patch-next-async-debug-info.mjs ./scripts/ -RUN STACK_SKIP_TEMPLATE_GENERATION=true pnpm install --frozen-lockfile +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile COPY --from=pruner /app/out/full/ . diff --git a/docker/local-emulator/Dockerfile b/docker/local-emulator/Dockerfile index ef64164ef..b8d4c882c 100644 --- a/docker/local-emulator/Dockerfile +++ b/docker/local-emulator/Dockerfile @@ -35,6 +35,9 @@ RUN turbo prune --scope=@hexclave/backend --scope=@hexclave/dashboard --docker FROM node-base AS builder +# Skip generate-sdks.ts in preinstall hook (file not available in pruned output) +ENV STACK_SKIP_TEMPLATE_GENERATION=true + # copy over package.json files and install dependencies COPY --from=pruner /app/out/json/ . COPY --from=pruner /app/out/pnpm-lock.yaml . @@ -43,7 +46,7 @@ COPY pnpm-workspace.yaml . COPY turbo.json . COPY configs ./configs COPY --from=pruner /app/scripts/postinstall-patch-next-async-debug-info.mjs ./scripts/ -RUN --mount=type=cache,id=pnpm,target=/pnpm/store STACK_SKIP_TEMPLATE_GENERATION=true pnpm install --frozen-lockfile +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile # copy over the rest of the code for the build COPY --from=pruner /app/out/full/ . diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 828ebd523..b16b91271 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -33,6 +33,9 @@ RUN turbo prune --scope=@hexclave/backend --scope=@hexclave/dashboard --docker # Build stage FROM base AS builder +# Skip generate-sdks.ts in preinstall hook (file not available in pruned output) +ENV STACK_SKIP_TEMPLATE_GENERATION=true + # copy over package.json files and install dependencies COPY --from=pruner /app/out/json/ . COPY --from=pruner /app/out/pnpm-lock.yaml . @@ -41,7 +44,7 @@ COPY pnpm-workspace.yaml . COPY turbo.json . COPY configs ./configs COPY --from=pruner /app/scripts/postinstall-patch-next-async-debug-info.mjs ./scripts/ -RUN --mount=type=cache,id=pnpm,target=/pnpm/store STACK_SKIP_TEMPLATE_GENERATION=true pnpm install --frozen-lockfile +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile # copy over the rest of the code for the build COPY --from=pruner /app/out/full/ .