Skip to content

Commit

Permalink
chore: Update Dockerfile.portal to install git, python, and build dep…
Browse files Browse the repository at this point in the history
…endencies
  • Loading branch information
coffeeorgreentea committed Jul 27, 2024
1 parent a27ed7a commit 79e6673
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions scripts/Dockerfile.portal
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
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

# 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" ]

0 comments on commit 79e6673

Please sign in to comment.