-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Dockerfile.portal to install git, python, and build dep…
…endencies
- Loading branch information
1 parent
a27ed7a
commit 79e6673
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |