mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-30 15:58:05 +09:00
Make docker builds even faster
This commit is contained in:
parent
3d43fd1cfe
commit
8ac6647291
@ -63,9 +63,15 @@ RUN --mount=type=cache,target=/root/.cargo --mount=type=cache,target=/tmp/sccach
|
||||
COPY . ./
|
||||
RUN env NODE_ENV=production sh -c "yarn workspace iceshrimp-js run build && yarn workspaces foreach --exclude native-utils --include sw --include client --include backend --include megalodon run build && yarn gulp"
|
||||
|
||||
# Prepare yarn cache (production)
|
||||
RUN --mount=type=cache,target=/iceshrimp/.yarncache_prod cp -Tr .yarncache_prod .yarn
|
||||
|
||||
# Trim down the dependencies to only those for production
|
||||
RUN yarn workspaces focus --all --production
|
||||
|
||||
# Save yarn cache (production)
|
||||
RUN --mount=type=cache,target=/iceshrimp/.yarncache_prod rm -rf .yarncache_prod/* && cp -Tr .yarn .yarncache_prod
|
||||
|
||||
## Runtime container
|
||||
FROM alpine:3.18
|
||||
WORKDIR /iceshrimp
|
||||
|
Loading…
Reference in New Issue
Block a user