Skip to content

Commit

Permalink
Bump node from 20 to 22
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Jan 16, 2025
1 parent 4831700 commit 0f546cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/development/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This section explains how to set up the project for development purposes.

Before starting the installation, ensure the following:

- **Node.js**: You need to have **Node.js** version **20** or higher installed.
- **Node.js**: You need to have **Node.js** version **22** or higher installed.
- **NVM (Node Version Manager)**: It's recommended to use `nvm` to manage your Node.js versions.

To ensure you're using the correct Node version, run:
Expand Down Expand Up @@ -62,6 +62,7 @@ This command will start the application in development mode, typically accessibl
To apply the custom settings and media files for your local development environment, follow these steps:

1. **Customization Settings**:

- Copy the `customization` folder from an existing Geotrek-rando repository.
- Paste it into the following directory in your project:
`Geotrek-rando-v3/frontend/customization`
Expand All @@ -72,4 +73,3 @@ To apply the custom settings and media files for your local development environm
`Geotrek-rando-v3/frontend/src/public/medias`

These folders contain custom configurations and media assets necessary for your local environment to match the production setup.

2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Install nodejs:
sudo apt update
sudo apt -y upgrade
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt -y install nodejs
```

Expand Down
2 changes: 1 addition & 1 deletion frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.17.0
v22.13.0
8 changes: 4 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Install dependencies only when needed
FROM node:20-alpine AS deps
FROM node:22-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat g++ gcc libgcc libstdc++ linux-headers make python3
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:20-alpine AS builder
FROM node:22-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build

FROM node:20-alpine AS builder_optim
FROM node:22-alpine AS builder_optim
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/yarn.lock ./yarn.lock
RUN yarn install --production --ignore-scripts --prefer-offline

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

ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Prerequisites

You need to have a node version installed >= 8.x or >= 10.x.
You need to have a node version installed >= 22.x.
If you have nvm installed, you can just type `nvm use` to use a working node version.

## Documentation
Expand Down

0 comments on commit 0f546cb

Please sign in to comment.