Skip to content

Commit e5d86f3

Browse files
author
BrandonLeiva
committed
fix: version actions/checkout
1 parent 1dbca9f commit e5d86f3

2 files changed

Lines changed: 37 additions & 11 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 }}

Dockerfile

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
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
54
WORKDIR /app
6-
5+
6+
RUN npm install -g pnpm
7+
78
COPY package.json pnpm-lock.yaml ./
89
RUN 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
1018
COPY . .
19+
1120
RUN 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+
1338
EXPOSE 3000
14-
CMD ["node", ".next/standalone/server.js"]
39+
40+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)