From 0a9fabe24cfa0448f9208ef49522d66bca172fe4 Mon Sep 17 00:00:00 2001 From: firelemons Date: Tue, 19 Nov 2024 20:14:10 -0600 Subject: [PATCH 1/3] upgrade node version to match heroku --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e3d92f7a8e..f4c5a69414 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,6 @@ ] }, "engines": { - "node": "20.x" + "node": "22.x" } } From e115d361222f7db8fdf7a1c3c30756edd37e8bcb Mon Sep 17 00:00:00 2001 From: firelemons Date: Tue, 19 Nov 2024 20:35:21 -0600 Subject: [PATCH 2/3] update node tool versions missed earlier --- .nvmrc | 2 +- .tool-versions | 4 ++-- doc/LINUX_SETUP.md | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.nvmrc b/.nvmrc index 9de2256827..deed13c016 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/iron +lts/jod diff --git a/.tool-versions b/.tool-versions index 35ed4145ab..a8eca4ee53 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ ruby 3.2.4 -yarn 1.22.19 -nodejs 20.16.0 +yarn 1.22.22 +nodejs 22.11.0 diff --git a/doc/LINUX_SETUP.md b/doc/LINUX_SETUP.md index 8fb84a691f..3255077363 100644 --- a/doc/LINUX_SETUP.md +++ b/doc/LINUX_SETUP.md @@ -52,9 +52,9 @@ sudo -u postgres psql -c "CREATE USER $USER WITH CREATEDB" ``` # Install NVM and Node JS # you can use curl -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # or wget -wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # Restart your terminal @@ -72,6 +72,11 @@ npm i -g npm@latest npm i -g yarn ``` +``` +# add node and node tools to the path +nvm alias default lts/jod +``` + ``` # Install and configure rbenv sudo apt install rbenv From f2e6a669cdac896ce30de0b30404d7b26408f22d Mon Sep 17 00:00:00 2001 From: firelemons Date: Wed, 20 Nov 2024 11:28:08 -0600 Subject: [PATCH 3/3] separate node version from apline image version --- .devcontainer/devcontainer.json | 2 +- Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 97bea45fa0..0ad1fb77ff 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -25,7 +25,7 @@ "version": "latest" }, "ghcr.io/devcontainers/features/node:1": { - "version": "20.16.0" + "version": "22.11.0" } }, diff --git a/Dockerfile b/Dockerfile index 32c58e95c3..4800a801db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,17 @@ ARG RAILS_ROOT=/usr/src/app/ RUN apk update && apk upgrade && apk add --update --no-cache \ bash \ + curl \ imagemagick \ - nodejs \ postgresql-client \ tzdata \ - vim \ - yarn && rm -rf /var/cache/apk/* + vim && rm -rf /var/cache/apk/* +RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ nodejs=22.11.0-r0 npm WORKDIR $RAILS_ROOT COPY . . +RUN npm install --global yarn RUN yarn install RUN yarn build && yarn build:css