Skip to content

Commit c96ba1e

Browse files
committed
fix(website): point the pnpm cache mount at the current Railway service
1 parent 26f6c48 commit c96ba1e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ COPY . .
2222
ARG FONTAWESOME_PACKAGE_TOKEN=""
2323
ENV FONTAWESOME_PACKAGE_TOKEN=${FONTAWESOME_PACKAGE_TOKEN}
2424

25-
# Install dependencies (with pnpm store cache)
26-
RUN --mount=type=cache,id=s/3e31e381-166e-4a85-983a-a49830a88b96-/pnpm/store,target=/pnpm/store \
25+
# Install dependencies (with pnpm store cache).
26+
#
27+
# Railway scopes build caches per service and rejects any cache mount whose id
28+
# is not prefixed with that service's own key, so the uuid below is this
29+
# service's id and not a value that can be shared or invented. Recreating the
30+
# Railway service changes it, and the build then fails at parse time with
31+
# "missing the cacheKey prefix from its id". Read the current one from the
32+
# service's RAILWAY_SERVICE_ID variable and update this line to match. Other
33+
# builders ignore the id, so it is inert outside Railway.
34+
RUN --mount=type=cache,id=s/d133ea35-d9c8-4da7-a34c-b115adf85a9e-/pnpm/store,target=/pnpm/store \
2735
pnpm install --no-frozen-lockfile
2836

2937
# Build arguments for PUBLIC_* environment variables

0 commit comments

Comments
 (0)