File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,17 @@ ARG PNPM_VERSION
66RUN apt-get update && apt-get install -y postgresql
77RUN npm install -g pnpm@${PNPM_VERSION}
88WORKDIR /boxel
9+
10+ # Cache-friendly dependency fetch: this layer only re-runs when the lockfile
11+ # (or patches it references) changes, not on every source edit. `pnpm fetch`
12+ # populates the global pnpm store in $HOME from the lockfile alone, so the
13+ # subsequent `pnpm install --offline` doesn't need the registry.
14+ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
15+ COPY patches/ ./patches
16+ RUN CI=1 pnpm fetch
17+
918COPY . .
10- RUN pnpm install --frozen-lockfile
19+ RUN CI=1 pnpm install -r --offline
1120
1221WORKDIR /boxel/packages/postgres
1322
Original file line number Diff line number Diff line change @@ -9,14 +9,15 @@ WORKDIR /realm-server
99RUN apt-get update && apt-get install -y ca-certificates curl unzip jq
1010RUN npm install -g pnpm@11.0.9
1111
12- COPY pnpm-lock.yaml ./
13-
12+ # Cache-friendly dependency fetch: this layer only re-runs when the lockfile
13+ # (or patches it references) changes, not on every source edit. `pnpm fetch`
14+ # populates the global pnpm store in $HOME from the lockfile alone, so the
15+ # subsequent `pnpm install --offline` doesn't need the registry.
16+ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
1417COPY patches/ ./patches
15- COPY vendor/ ./vendor
16-
17- ADD . ./
18-
1918RUN CI=1 pnpm fetch
19+
20+ COPY . ./
2021RUN CI=1 pnpm install -r --offline
2122
2223EXPOSE 4222
Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ ENV PUPPETEER_CHROME_ARGS="--disable-dev-shm-usage"
6060
6161RUN mkdir -p /home/pptruser/Downloads "${PUPPETEER_CACHE_DIR}"
6262
63- COPY pnpm-lock.yaml ./
64-
63+ # Cache-friendly dependency fetch: this layer only re-runs when the lockfile
64+ # (or patches it references) changes, not on every source edit. `pnpm fetch`
65+ # populates the global pnpm store in $HOME from the lockfile alone, so the
66+ # subsequent `pnpm install --offline` doesn't need the registry.
67+ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
6568COPY patches/ ./patches
66- COPY vendor/ ./vendor
67-
68- ADD . ./
69-
7069RUN CI=1 pnpm fetch
70+
71+ COPY . ./
7172RUN CI=1 pnpm install -r --offline
7273RUN chown -R pptruser:pptruser /home/pptruser /realm-server
7374
Original file line number Diff line number Diff line change @@ -9,14 +9,15 @@ WORKDIR /realm-server
99RUN apt-get update && apt-get install -y ca-certificates curl unzip postgresql jq rsync git
1010RUN npm install -g pnpm@11.0.9
1111
12- COPY pnpm-lock.yaml ./
13-
12+ # Cache-friendly dependency fetch: this layer only re-runs when the lockfile
13+ # (or patches it references) changes, not on every source edit. `pnpm fetch`
14+ # populates the global pnpm store in $HOME from the lockfile alone, so the
15+ # subsequent `pnpm install --offline` doesn't need the registry.
16+ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
1417COPY patches/ ./patches
15- COPY vendor/ ./vendor
16-
17- ADD . ./
18-
1918RUN CI=1 pnpm fetch
19+
20+ COPY . ./
2021RUN CI=1 pnpm install -r --offline
2122
2223EXPOSE 3000
Original file line number Diff line number Diff line change @@ -9,14 +9,15 @@ WORKDIR /realm-server
99RUN apt-get update && apt-get install -y ca-certificates curl unzip postgresql jq
1010RUN npm install -g pnpm@11.0.9
1111
12- COPY pnpm-lock.yaml ./
13-
12+ # Cache-friendly dependency fetch: this layer only re-runs when the lockfile
13+ # (or patches it references) changes, not on every source edit. `pnpm fetch`
14+ # populates the global pnpm store in $HOME from the lockfile alone, so the
15+ # subsequent `pnpm install --offline` doesn't need the registry.
16+ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
1417COPY patches/ ./patches
15- COPY vendor/ ./vendor
16-
17- ADD . ./
18-
1918RUN CI=1 pnpm fetch
19+
20+ COPY . ./
2021RUN CI=1 pnpm install -r --offline
2122
2223EXPOSE 3000
You can’t perform that action at this time.
0 commit comments