From 40ac46990b2ed8b67186dc4ed6353d2a5f59b379 Mon Sep 17 00:00:00 2001 From: Ruslan Konviser Date: Thu, 28 Mar 2024 23:04:33 +0100 Subject: [PATCH] chore: use node 18.19.1 due to issues with ffi-napi --- .deploy/api/Dockerfile | 34 +++++----------------------------- .deploy/webapp/Dockerfile | 18 +++--------------- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/.deploy/api/Dockerfile b/.deploy/api/Dockerfile index 9b362eb15ae..d7d176e7f32 100644 --- a/.deploy/api/Dockerfile +++ b/.deploy/api/Dockerfile @@ -103,7 +103,7 @@ ARG OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ARG REDIS_ENABLED ARG REDIS_URL -FROM node:18-alpine3.19 AS dependencies +FROM node:18.19.1-alpine3.19 AS dependencies LABEL maintainer="ever@ever.co" LABEL org.opencontainers.image.source https://github.com/ever-co/ever-gauzy @@ -121,18 +121,6 @@ RUN apk --update add bash && npm i -g npm \ && apk add --no-cache --virtual build-dependencies curl tar xz jq python3 python3-dev py3-configobj py3-pip py3-setuptools build-base \ snappy libheif dos2unix gcc g++ snappy-dev git libgcc libstdc++ linux-headers autoconf automake make nasm vips-dev vips -# Define the Node.js version you want to install -ENV NODE_VERSION 18.19.1 - -# Download and install the specific Node.js version -RUN mkdir /opt/nodejs && \ - curl -fsSLO --compressed "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \ - tar -xJf "node-v${NODE_VERSION}-linux-x64.tar.xz" -C /opt/nodejs --strip-components=1 && \ - rm "node-v${NODE_VERSION}-linux-x64.tar.xz" - -# Update PATH to use the newly installed Node.js version -ENV PATH="/opt/nodejs/bin:${PATH}" - # Verify the Node.js version RUN node --version RUN npm --version @@ -180,7 +168,7 @@ COPY --chown=node:node decorate-angular-cli.js lerna.json package.json yarn.lock RUN yarn install --network-timeout 1000000 --frozen-lockfile # RUN apk del build-dependencies make gcc g++ python2 py2-setuptools vips-dev -FROM node:18-alpine3.19 AS prodDependencies +FROM node:18.19.1-alpine3.19 AS prodDependencies ENV CI=true @@ -194,18 +182,6 @@ RUN apk --update add bash && npm i -g npm \ && apk add --no-cache --virtual build-dependencies curl tar xz jq python3 python3-dev py3-configobj py3-pip py3-setuptools build-base \ snappy libheif dos2unix gcc g++ snappy-dev git libgcc libstdc++ linux-headers autoconf automake make nasm vips-dev vips -# Define the Node.js version you want to install -ENV NODE_VERSION 18.19.1 - -# Download and install the specific Node.js version -RUN mkdir /opt/nodejs && \ - curl -fsSLO --compressed "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \ - tar -xJf "node-v${NODE_VERSION}-linux-x64.tar.xz" -C /opt/nodejs --strip-components=1 && \ - rm "node-v${NODE_VERSION}-linux-x64.tar.xz" - -# Update PATH to use the newly installed Node.js version -ENV PATH="/opt/nodejs/bin:${PATH}" - # Verify the Node.js version RUN node --version RUN npm --version @@ -250,7 +226,7 @@ RUN yarn install --network-timeout 1000000 --frozen-lockfile --production RUN rm -r node_modules/@angular -FROM node:18-alpine3.19 AS development +FROM node:18.19.1-alpine3.19 AS development USER node:node @@ -260,7 +236,7 @@ COPY --chown=node:node --from=dependencies /wait /entrypoint.prod.sh /entrypoint COPY --chown=node:node --from=dependencies /srv/gauzy . COPY . . -FROM node:18-alpine3.19 AS build +FROM node:18.19.1-alpine3.19 AS build WORKDIR /srv/gauzy @@ -296,7 +272,7 @@ RUN if [ "$NODE_ENV" = "production" ]; then \ RUN yarn build:api:prod:docker -FROM node:18-alpine3.19 AS production +FROM node:18.19.1-alpine3.19 AS production WORKDIR /srv/gauzy diff --git a/.deploy/webapp/Dockerfile b/.deploy/webapp/Dockerfile index 1fa334335ab..43a1b33ee32 100644 --- a/.deploy/webapp/Dockerfile +++ b/.deploy/webapp/Dockerfile @@ -32,7 +32,7 @@ ARG GAUZY_GITHUB_APP_ID ARG JITSU_BROWSER_URL ARG JITSU_BROWSER_WRITE_KEY -FROM node:18-alpine3.19 AS dependencies +FROM node:18.19.1-alpine3.19 AS dependencies LABEL maintainer="ever@ever.co" LABEL org.opencontainers.image.source https://github.com/ever-co/ever-gauzy @@ -43,18 +43,6 @@ RUN apk --update add bash && \ apk add --no-cache --virtual build-dependencies curl tar xz jq python3 python3-dev py3-configobj py3-pip py3-setuptools dos2unix gcc g++ git make vips-dev && \ mkdir /srv/gauzy && chown -R node:node /srv/gauzy -# Define the Node.js version you want to install -ENV NODE_VERSION 18.19.1 - -# Download and install the specific Node.js version -RUN mkdir /opt/nodejs && \ - curl -fsSLO --compressed "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \ - tar -xJf "node-v${NODE_VERSION}-linux-x64.tar.xz" -C /opt/nodejs --strip-components=1 && \ - rm "node-v${NODE_VERSION}-linux-x64.tar.xz" - -# Update PATH to use the newly installed Node.js version -ENV PATH="/opt/nodejs/bin:${PATH}" - # Verify the Node.js version RUN node --version RUN npm --version @@ -95,7 +83,7 @@ COPY --chown=node:node decorate-angular-cli.js lerna.json package.json yarn.lock RUN yarn install --network-timeout 1000000 --frozen-lockfile && yarn cache clean # RUN apk del build-dependencies make gcc g++ python2 py2-setuptools vips-dev -FROM node:18-alpine3.19 AS development +FROM node:18.19.1-alpine3.19 AS development USER node:node @@ -105,7 +93,7 @@ COPY --chown=node:node --from=dependencies /wait /entrypoint.compose.sh /entrypo COPY --chown=node:node --from=dependencies /srv/gauzy . COPY . . -FROM node:18-alpine3.19 AS build +FROM node:18.19.1-alpine3.19 AS build WORKDIR /srv/gauzy