Skip to content

Commit

Permalink
feat: upgrade node18 (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
CristhianF7 authored Aug 15, 2023
1 parent 6659487 commit 4fb4fa7
Show file tree
Hide file tree
Showing 4 changed files with 15,025 additions and 20,566 deletions.
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
FROM node:16-alpine AS deps
FROM node:18-alpine AS base

FROM base AS deps
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache python3 make g++
WORKDIR /app

COPY package.json yarn.lock server.js next.config.js ./
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
if [ -f yarn.lock ]; then yarn --production --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi


# Rebuild the source code only when needed
FROM node:16-alpine AS builder
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
Expand All @@ -20,7 +26,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build

# Production image, copy all the files and run next
FROM node:16-alpine AS runner
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"typescript": "^4.8.4"
},
"engines": {
"node": ">=16"
"node": ">=18"
},
"resolutions": {
"styled-components": "^5"
Expand Down
Loading

0 comments on commit 4fb4fa7

Please sign in to comment.