Merge pull request #19764 from overleaf/jpa-server-pro-cache

[server-pro] faster local build

GitOrigin-RevId: d71abde37253e4c0398afa6935290af79a1204be
This commit is contained in:
Jakob Ackermann
2024-08-06 11:08:18 +02:00
committed by Copybot
parent 7aaa78e635
commit 399e834e36
6 changed files with 29 additions and 20 deletions

View File

@@ -19,13 +19,14 @@ ADD services/ /overleaf/services/
# -----------------------
ADD patches/ /overleaf/patches
# Install npm dependencies
# Install npm dependencies and build webpack assets
# ------------------------
RUN node genScript install | bash
# Compile
# --------------------
RUN node genScript compile | bash
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
--mount=type=cache,target=/overleaf/services/web/node_modules/.cache,id=server-ce-webpack-cache \
--mount=type=tmpfs,target=/tmp true \
&& node genScript install | bash \
&& node genScript compile | bash
# Copy runit service startup scripts to its location
# --------------------------------------------------