mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[docker] Utilize focus-production script
This commit is contained in:
parent
9e53d46b71
commit
698584f7aa
@ -4,7 +4,7 @@ FROM alpine:3.18 as build
|
|||||||
WORKDIR /iceshrimp
|
WORKDIR /iceshrimp
|
||||||
|
|
||||||
# Install compilation dependencies
|
# Install compilation dependencies
|
||||||
RUN apk add --no-cache --no-progress git alpine-sdk vips-dev python3 nodejs-current npm vips moreutils jq
|
RUN apk add --no-cache --no-progress git alpine-sdk vips-dev python3 nodejs-current npm vips
|
||||||
|
|
||||||
# Copy only the dependency-related files first, to cache efficiently
|
# Copy only the dependency-related files first, to cache efficiently
|
||||||
COPY package.json yarn.lock .pnp.cjs .pnp.loader.mjs ./
|
COPY package.json yarn.lock .pnp.cjs .pnp.loader.mjs ./
|
||||||
@ -33,8 +33,7 @@ RUN env NODE_ENV=production yarn build
|
|||||||
RUN --mount=type=cache,target=/iceshrimp/.yarncache_focused cp -Tr .yarncache_focused .yarn
|
RUN --mount=type=cache,target=/iceshrimp/.yarncache_focused cp -Tr .yarncache_focused .yarn
|
||||||
|
|
||||||
# Remove dev deps
|
# Remove dev deps
|
||||||
RUN find packages package.json -name package.json | xargs -i sh -c "jq 'del(.devDependencies)' {} | sponge {}"
|
RUN yarn focus-production
|
||||||
RUN yarn
|
|
||||||
|
|
||||||
# Save focused yarn cache
|
# Save focused yarn cache
|
||||||
RUN --mount=type=cache,target=/iceshrimp/.yarncache_focused rm -rf .yarncache/* && cp -Tr .yarn .yarncache_focused
|
RUN --mount=type=cache,target=/iceshrimp/.yarncache_focused rm -rf .yarncache/* && cp -Tr .yarn .yarncache_focused
|
||||||
|
Loading…
Reference in New Issue
Block a user