Skip to content

Commit bf2e529

Browse files
committed
build(docker): use pnpm-workspace.yaml instead of .npmrc
1 parent c2a38b9 commit bf2e529

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
FROM node:22-alpine AS builder
22

3-
ARG BUILD_HASH
4-
ENV BUILD_HASH=${BUILD_HASH}
5-
63
WORKDIR /app
74

85
RUN npm install -g pnpm@latest-10
96

10-
COPY package.json pnpm-lock.yaml .npmrc ./
11-
7+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
128
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm fetch --prod
139

1410
COPY . .
11+
RUN pnpm install --frozen-lockfile --prod --offline
1512

16-
RUN pnpm install --frozen-lockfile --ignore-scripts --prod --offline
17-
13+
ARG BUILD_HASH
14+
ENV BUILD_HASH=${BUILD_HASH}
1815
RUN pnpm run build
1916

2017
# --------------------------------------------

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"pnpm": "10"
99
},
1010
"scripts": {
11-
"prepare": "nitropack prepare && husky",
11+
"prepare": "nitropack prepare && [ -z \"$CI\" ] && husky || echo 'Skipping husky in CI'",
1212
"dev": "nitropack dev",
1313
"build": "nitropack build",
1414
"preview": "node .output/server/index.mjs",

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefullyHoist: true
2+
strictPeerDependencies: false

0 commit comments

Comments
 (0)