diff --git a/Dockerfile b/Dockerfile index befeaae7..139dea1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,11 @@ RUN apt-get update \ # Clean up the apt cache && rm -rf /var/lib/apt/lists/* +# Work around an issue with a deprecated hash function in Rails Webpacker 5 +ENV NODE_OPTIONS=--openssl-legacy-provider + # Specify a major version of Node.js to download and install -ENV NODEJS_MAJOR_VERSION=16 +ENV NODEJS_MAJOR_VERSION=20 # Download and extract Node.js from archive supplied by nodejs.org RUN curl -L https://nodejs.org/dist/latest-v$NODEJS_MAJOR_VERSION\.x/SHASUMS256.txt -O \ diff --git a/app.json b/app.json index 9b85f921..16fb40fe 100644 --- a/app.json +++ b/app.json @@ -26,6 +26,10 @@ "LANG": { "required": true }, + "NODE_OPTIONS": { + "required": true, + "value": "--openssl-legacy-provider" + }, "RACK_ENV": { "required": true }, diff --git a/package.json b/package.json index aa562d49..21b0484e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ }, "engines": { "yarn": "1.x", - "node": "16.x" + "node": "20" } }