From a466c4bab02f837e7234d0367fd79e9ef925d25b Mon Sep 17 00:00:00 2001 From: Matej Jellus Date: Tue, 27 Aug 2024 09:22:23 +0200 Subject: [PATCH] Upgrade node to version 22 --- .github/workflows/main.yml | 14 +++++++------- Dockerfile | 8 ++++++-- docker-compose.yml | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee91ef1..cc65e59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,10 +16,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' - name: Install dependencies run: yarn install @@ -41,10 +41,10 @@ jobs: MYSQL_ROOT_PASSWORD: p4ssw0rd options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' - name: Install dependencies run: yarn install @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-latest needs: test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Set variables diff --git a/Dockerfile b/Dockerfile index 72cecf2..48fe0cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,15 @@ -FROM node:20-alpine AS build +FROM node:22-alpine AS build WORKDIR /home/node COPY . . RUN yarn install --frozen-lockfile && yarn build -FROM node:20-alpine +FROM node:22-alpine + +ENV NODE_ENV production + +RUN apk update && apk upgrade --no-cache RUN addgroup --gid 3000 --system juffgroup \ && adduser --uid 2000 --system --ingroup juffgroup juffuser diff --git a/docker-compose.yml b/docker-compose.yml index 870d9c5..62914ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: - 'mysql_data:/mysql/data' application: - image: node:20-alpine + image: node:22-alpine working_dir: /home/node command: sh -c "yarn install --frozen-lockfile && yarn start" depends_on: