Skip to content

Commit

Permalink
use NVM to install deprecated node in development
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Sep 25, 2024
1 parent b3155b9 commit 03f09b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
file: "./compose.yml"
service: app
command: "./ci.sh"
command: "bash --login -c -e \"/app/ci.sh\""
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
FROM ruby:3.1.6
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client software-properties-common

RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
SHELL ["/bin/bash", "--login", "-i", "-c"]

RUN add-apt-repository "deb https://deb.nodesource.com/node_14.x $(lsb_release -sc) main"

RUN apt-get update -qq && apt-get install -y nodejs npm

RUN npm install -g yarn
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

RUN mkdir /app

COPY .nvmrc /app/.nvmrc

WORKDIR /app

SHELL ["/bin/bash", "--login", "-c"]

RUN nvm install

SHELL ["/bin/bash", "--login", "-c"]

RUN npm install -g yarn

COPY .ruby-version /app/.ruby-version
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"webpack-dev-server": "^3.11.2"
},
"engines": {
"node": "18.19.0"
"node": "14.21.3"
}
}

0 comments on commit 03f09b1

Please sign in to comment.