From 79e6673262909a23ca4bb80a97aa181503f9612e Mon Sep 17 00:00:00 2001 From: coffeeorgreentea <90069434+coffeeorgreentea@users.noreply.github.com> Date: Sat, 27 Jul 2024 04:45:04 -0400 Subject: [PATCH] chore: Update Dockerfile.portal to install git, python, and build dependencies --- scripts/Dockerfile.portal | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/Dockerfile.portal b/scripts/Dockerfile.portal index 2c8adf010..37abe1f35 100644 --- a/scripts/Dockerfile.portal +++ b/scripts/Dockerfile.portal @@ -1,14 +1,20 @@ -FROM node:18-alpine +FROM node:20-alpine -# Install git -RUN apk add --no-cache git +# Install git, python, and build dependencies +RUN apk add --no-cache git python3 make g++ py3-pip + +# Set Python path +ENV PYTHON=/usr/bin/python3 +# Install git ARG GITHUB_TOKEN ARG BRANCH=development - ARG RAILWAY_GIT_COMMIT_SHA + # Configure git to use the token RUN git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" + +# Clone the repository RUN git clone --branch ${BRANCH} --depth 1 https://www.github.com/oneirocom/magick.git /app WORKDIR /app @@ -16,9 +22,12 @@ WORKDIR /app # Clone the submodule RUN git submodule update --init --recursive portal/cloud +# Install dependencies RUN npm install --foreground-scripts +# Build the project RUN npx nx build portal --skip-nx-cache -ENTRYPOINT [ "npx"] -CMD [ "nx", "run", "portal:serve:production"] +# Set the entrypoint and command +ENTRYPOINT [ "npx" ] +CMD [ "nx", "run", "portal:serve:production" ] \ No newline at end of file