mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
Make docker builds even faster
This commit is contained in:
parent
3d43fd1cfe
commit
8ac6647291
1 changed files with 6 additions and 0 deletions
|
@ -63,9 +63,15 @@ RUN --mount=type=cache,target=/root/.cargo --mount=type=cache,target=/tmp/sccach
|
||||||
COPY . ./
|
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"
|
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
|
# Trim down the dependencies to only those for production
|
||||||
RUN yarn workspaces focus --all --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
|
## Runtime container
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
WORKDIR /iceshrimp
|
WORKDIR /iceshrimp
|
||||||
|
|
Loading…
Reference in a new issue