File tree Expand file tree Collapse file tree 3 files changed +24
-17
lines changed Expand file tree Collapse file tree 3 files changed +24
-17
lines changed Original file line number Diff line number Diff line change 1+ assets /
2+ maps-examples /
13node_modules /
4+
5+ .dockerignore
6+ docker-compose.yml
7+ Dockerfile
8+ example.env
9+ Procfile
10+ README.md
Original file line number Diff line number Diff line change 1- FROM node:20-alpine as build
2-
3- WORKDIR /code
4- RUN apk add --no-cache git
1+ # Stage 1: Build
2+ FROM node:24-alpine AS build
3+ WORKDIR /usr/src/build
4+ COPY package.json package-lock.json ./
5+ RUN npm ci
56COPY . .
6- RUN npm ci && npm run build
7-
8- FROM node:20-alpine
9-
10- WORKDIR /app
11- RUN apk add --no-cache --virtual build-dependencies git
12- COPY package.json .
13- RUN npm install --only=production
14- RUN apk del build-dependencies
15- COPY --from=build /code/dist/ .
16-
17- CMD ["node" , "/app/index.js" ]
7+ RUN npm run build
8+
9+ # Stage 2: Production/Runtime
10+ FROM node:24-alpine AS production
11+ WORKDIR /usr/src/app
12+ COPY package.json package-lock.json ./
13+ RUN npm ci --omit=dev
14+ COPY --from=build /usr/src/build/dist ./dist
15+ CMD ["node" , "/usr/src/app/index.js" ]
Original file line number Diff line number Diff line change 3737 }
3838 },
3939 "engines" : {
40- "node" : " 20.x.x "
40+ "node" : " >=20 <=24 "
4141 },
4242 "optionalDependencies" : {
4343 "fsevents" : " *"
You can’t perform that action at this time.
0 commit comments