Add conditional pnpm lockfile handling in web Dockerfile
Add fallback to install without frozen lockfile when pnpm-lock.yaml is missing, allowing builds to proceed in development environments while maintaining strict dependency locking in production when lockfile exists.
This commit is contained in:
@@ -11,7 +11,12 @@ COPY packages/shared/package.json /app/packages/shared/
|
|||||||
COPY packages/ui/package.json /app/packages/ui/
|
COPY packages/ui/package.json /app/packages/ui/
|
||||||
COPY packages/plugin-sdk/package.json /app/packages/plugin-sdk/
|
COPY packages/plugin-sdk/package.json /app/packages/plugin-sdk/
|
||||||
|
|
||||||
RUN npm install -g pnpm && pnpm install --frozen-lockfile
|
RUN npm install -g pnpm \
|
||||||
|
&& if [ -f pnpm-lock.yaml ]; then \
|
||||||
|
pnpm install --frozen-lockfile; \
|
||||||
|
else \
|
||||||
|
pnpm install --no-frozen-lockfile; \
|
||||||
|
fi
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
COPY --from=deps /app/node_modules /app/node_modules
|
COPY --from=deps /app/node_modules /app/node_modules
|
||||||
|
|||||||
Reference in New Issue
Block a user