Skip to content

Commit

Permalink
chore: temporary install manually older version of Node because of ff…
Browse files Browse the repository at this point in the history
…i-napi issues
  • Loading branch information
evereq committed Mar 28, 2024
1 parent 8b9028a commit 4005f03
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
36 changes: 34 additions & 2 deletions .deploy/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,25 @@ ENV NODE_ENV=development
ENV PYTHON /usr/bin/python

RUN apk --update add bash && npm i -g npm \
&& apk add --no-cache --virtual build-dependencies curl jq python3 python3-dev py3-configobj py3-pip py3-setuptools build-base \
&& 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

# Output Python3 version
RUN python3 --version

Expand Down Expand Up @@ -175,9 +191,25 @@ ARG NODE_ENV
ENV PYTHON /usr/bin/python

RUN apk --update add bash && npm i -g npm \
&& apk add --no-cache --virtual build-dependencies curl jq python3 python3-dev py3-configobj py3-pip py3-setuptools build-base \
&& 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

# Output Python3 version
RUN python3 --version

Expand Down
18 changes: 17 additions & 1 deletion .deploy/webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,25 @@ LABEL org.opencontainers.image.source https://github.com/ever-co/ever-gauzy
ENV CI=true

RUN apk --update add bash && \
apk add --no-cache --virtual build-dependencies curl jq python3 python3-dev py3-configobj py3-pip py3-setuptools dos2unix gcc g++ git make vips-dev && \
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

COPY wait .deploy/webapp/entrypoint.compose.sh .deploy/webapp/entrypoint.prod.sh /

RUN chmod +x /wait /entrypoint.compose.sh /entrypoint.prod.sh && dos2unix /entrypoint.compose.sh && dos2unix /entrypoint.prod.sh
Expand Down

0 comments on commit 4005f03

Please sign in to comment.