mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Add pnpm store cache mount to turbo build steps in Dockerfiles
The preinstall hook uses pnpx only-allow which needs the pnpm store. The store is only available during RUN commands with the cache mount. Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
This commit is contained in:
parent
4c4774a661
commit
f2575ee330
@ -55,7 +55,7 @@ COPY docs ./docs
|
||||
ENV NEXT_CONFIG_OUTPUT=standalone
|
||||
|
||||
# Build backend only
|
||||
RUN pnpm turbo run docker-build --filter=@hexclave/backend...
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend...
|
||||
|
||||
|
||||
# Final image
|
||||
|
||||
@ -56,7 +56,7 @@ ENV NEXT_CONFIG_OUTPUT=standalone
|
||||
ENV NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY=pk_test_mock_publishable_key_for_local_emulator
|
||||
|
||||
# Build the backend NextJS app
|
||||
RUN pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard...
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard...
|
||||
|
||||
# Build the self-host seed script.
|
||||
# tsdown -> rolldown is multi-threaded Rust; under qemu-user (cross-arch
|
||||
|
||||
@ -53,10 +53,10 @@ COPY docs ./docs
|
||||
ENV NEXT_CONFIG_OUTPUT=standalone
|
||||
|
||||
# Build the backend NextJS app
|
||||
RUN pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard...
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard...
|
||||
|
||||
# Build the self-host seed script
|
||||
RUN cd apps/backend && pnpm build-self-host-migration-script
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd apps/backend && pnpm build-self-host-migration-script
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user