File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM node:20.14.0
2-
3- WORKDIR /app
1+ FROM node:20.19.0 AS base
2+ WORKDIR /app
43
5- COPY package*.json ./
4+ FROM base AS deps
5+ COPY package.json yarn.lock ./
6+ RUN yarn install --frozen-lockfile
67
7- RUN yarn install
8-
9- COPY . .
10-
11- RUN yarn run build:staging
12-
13- EXPOSE 3005
14-
15- CMD ["yarn" , "run" , "start:staging" ]
8+ FROM base AS builder
9+ COPY --from=deps /app/node_modules ./node_modules
10+ COPY . .
11+ RUN yarn run build
1612
13+ FROM base AS runner
14+ ENV NODE_ENV=production
15+ WORKDIR /app
16+ COPY --from=builder /app/package.json ./package.json
17+ COPY --from=builder /app/next.config.js ./next.config.js
18+ COPY --from=builder /app/public ./public
19+ COPY --from=builder /app/.next ./.next
20+ COPY --from=builder /app/node_modules ./node_modules
21+ EXPOSE 3005
22+ CMD ["yarn" , "run" , "start:staging" ]
Original file line number Diff line number Diff line change 1+ services :
2+ web :
3+ build : .
4+ ports :
5+ - " 3005:3005"
You can’t perform that action at this time.
0 commit comments