File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,17 +25,17 @@ jobs:
2525
2626 steps :
2727 - name : Checkout código
28- uses : actions/checkout@v4
28+ uses : actions/checkout@v4.2.2
2929
3030 - name : Login a GHCR
31- uses : docker/login-action@v3
31+ uses : docker/login-action@v3.4.0
3232 with :
3333 registry : ${{ env.IMAGE_REGISTRY_URL }}
3434 username : ${{ env.IMAGE_REGISTRY_USER }}
3535 password : ${{ env.IMAGE_REGISTRY_PASSWORD }}
3636
3737 - name : Build & Push imagen
38- uses : docker/build-push-action@v5
38+ uses : docker/build-push-action@v6
3939 with :
4040 context : .
4141 file : ${{ env.DOCKERFILE }}
Original file line number Diff line number Diff line change 1- FROM node:20-alpine
2-
3- RUN npm install -g pnpm
4-
1+ FROM node:24-alpine3.22 AS deps
2+
3+ RUN apk add --no-cache libc6-compat
54WORKDIR /app
6-
5+
6+ RUN npm install -g pnpm
7+
78COPY package.json pnpm-lock.yaml ./
89RUN pnpm install --frozen-lockfile
9-
10+
11+
12+ FROM node:24-alpine3.22 AS builder
13+ WORKDIR /app
14+
15+ RUN npm install -g pnpm
16+
17+ COPY --from=deps /app/node_modules ./node_modules
1018COPY . .
19+
1120RUN pnpm build
12-
21+ RUN cp -r .next/static .next/standalone/.next/static
22+
23+
24+ FROM node:24-alpine3.22 AS runner
25+ WORKDIR /app
26+
27+ ENV NODE_ENV=production
28+ ENV PORT=3000
29+
30+ RUN addgroup --system --gid 1001 nodejs
31+ RUN adduser --system --uid 1001 nextjs
32+
33+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
34+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
35+
36+ USER nextjs
37+
1338EXPOSE 3000
14- CMD ["node" , ".next/standalone/server.js" ]
39+
40+ CMD ["node" , "server.js" ]
You can’t perform that action at this time.
0 commit comments