File tree Expand file tree Collapse file tree 5 files changed +1166
-4763
lines changed Expand file tree Collapse file tree 5 files changed +1166
-4763
lines changed Original file line number Diff line number Diff line change 1
- FROM node:20-alpine as build
1
+ FROM node:20-alpine as base
2
+ ENV PNPM_HOME="/pnpm"
3
+ ENV PATH="$PNPM_HOME:$PATH"
4
+ RUN corepack enable
2
5
WORKDIR /app
3
- COPY package.json yarn.lock ./
4
6
5
- RUN yarn
7
+ FROM base AS prod-deps
8
+ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
9
+ --mount=type=bind,source=package.json,target=package.json \
10
+ --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
11
+ pnpm install --prod --frozen-lockfile
6
12
7
- # Bundle app source
8
- COPY . .
9
-
10
- RUN yarn build
13
+ FROM base AS build
14
+ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
15
+ --mount=type=bind,source=package.json,target=package.json \
16
+ --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
17
+ pnpm install --frozen-lockfile
18
+ COPY . /app
19
+ RUN pnpm run build
11
20
12
21
FROM node:20-alpine
13
22
@@ -17,7 +26,7 @@ WORKDIR /app
17
26
18
27
RUN apk add git python3 make g++
19
28
20
- COPY --chown=node:node -- from=build /app/node_modules node_modules
29
+ COPY --from=prod-deps /app/node_modules node_modules
21
30
COPY --chown=node:node --from=build /app/dist dist
22
31
COPY --chown=node:node --from=build /app/package.json ./
23
32
Original file line number Diff line number Diff line change 10
10
"test" : " jest" ,
11
11
"start" : " node dist/index.js"
12
12
},
13
+ "packageManager" :
" [email protected] " ,
13
14
"dependencies" : {
14
- "aws-sdk" : " ^2.814 .0" ,
15
- "express" : " ^4.17.1 " ,
16
- "hash-sum" : " ^1 .0.2 " ,
15
+ "aws-sdk" : " ^2.1506 .0" ,
16
+ "express" : " ^4.18.2 " ,
17
+ "hash-sum" : " ^2 .0.0 " ,
17
18
"p-queue" : " ^7.4.1" ,
18
- "recursive-readdir" : " ^2.2.2 " ,
19
- "rimraf" : " ^2.6.3 " ,
19
+ "recursive-readdir" : " ^2.2.3 " ,
20
+ "rimraf" : " ^5.0.5 " ,
20
21
"url" : " ^0.11.0" ,
21
22
"zlib" : " ^1.0.5"
22
23
},
23
24
"devDependencies" : {
24
- "@types/express" : " ^4.16.1" ,
25
- "@types/hash-sum" : " ^1.0.0" ,
26
- "@types/jest" : " ^24.0.6" ,
27
- "@types/node" : " ^13.11.1" ,
28
- "@types/node-fetch" : " ^2.1.4" ,
29
- "@types/recursive-readdir" : " ^2.2.0" ,
30
- "@types/rimraf" : " ^2.0.2" ,
31
- "jest" : " ^24.1.0" ,
32
- "lambda-git" : " 0.1.1" ,
33
- "node-fetch" : " ^2.3.0" ,
34
- "ts-jest" : " ^24.0.0" ,
25
+ "@types/express" : " ^4.17.21" ,
26
+ "@types/hash-sum" : " ^1.0.2" ,
27
+ "@types/node" : " ^20.10.0" ,
28
+ "@types/recursive-readdir" : " ^2.2.4" ,
35
29
"tsc-watch" : " ^6.0.4" ,
36
30
"typescript" : " ^5.2.2"
37
31
}
You can’t perform that action at this time.
0 commit comments