Skip to content

Commit 3782278

Browse files
committed
fix: update Dockerfile and README for pnpm migration
Dockerfile still used npm ci/npm run build which fails since package-lock.json no longer exists. Updated to use pnpm with corepack. Also updated README commands from npm to pnpm.
1 parent 71c85ee commit 3782278

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
1-
FROM node:24-slim as builder
1+
FROM node:24-slim AS builder
2+
3+
RUN corepack enable && corepack prepare pnpm@10.23.0 --activate
24

35
WORKDIR /app
46

5-
COPY package*.json ./
7+
COPY package.json pnpm-lock.yaml ./
68

7-
RUN npm ci
9+
RUN pnpm install --frozen-lockfile
810

911
COPY . .
1012

11-
RUN npm run build
13+
RUN pnpm run build
1214

1315
FROM node:24-slim AS final
1416

17+
RUN corepack enable && corepack prepare pnpm@10.23.0 --activate
18+
1519
WORKDIR /app
1620

1721
COPY --from=builder ./app/dist ./dist
1822

19-
COPY package*.json ./
23+
COPY package.json pnpm-lock.yaml ./
2024

21-
RUN npm ci --omit=dev
25+
RUN pnpm install --frozen-lockfile --prod
2226

2327
EXPOSE 7777
2428

2529
ENTRYPOINT ["node", "dist/main.js"]
2630

27-
CMD [ "serve", "--address", "[::]:7777", "--log-format", "json", "--log-level", "info" ]
31+
CMD [ "serve", "--address", "[::]:7777", "--log-format", "json", "--log-level", "info" ]

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,42 @@ Node.js 20 or higher. Install Node.js from [here](https://nodejs.org/en/download
1111
### Install dependencies
1212

1313
```bash
14-
npm ci
14+
pnpm install
1515
```
1616

1717
### Build
1818

1919
```bash
20-
npm run build
20+
pnpm build
2121
```
2222

2323
### Test
2424

2525
```bash
26-
npm test
26+
pnpm test
2727
```
2828

2929
### Start a local memory based plugin server
3030

3131
```bash
32-
npm run dev -- serve
32+
pnpm dev -- serve
3333
```
3434

3535
### Package as a Docker image
3636

3737
```bash
38-
npm run dev -- package -m test "v1.0.0" . --dist-dir dist-dir
38+
pnpm dev -- package -m test "v1.0.0" . --dist-dir dist-dir
3939
```
4040

4141
### Formatting and Linting
4242

4343
```bash
4444
# This is just to check if the code is formatted
45-
npm run format:check
45+
pnpm format:check
4646

4747
# Automatically format code
48-
npm run format
48+
pnpm format
4949

5050
# Lint
51-
npm run lint
51+
pnpm lint
5252
```

0 commit comments

Comments
 (0)