-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8d8252
commit 7ffbb82
Showing
1 changed file
with
18 additions
and
7 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,15 +1,26 @@ | ||
FROM node:18 as base | ||
FROM --platform=$BUILDPLATFORM node:18 as build | ||
|
||
ARG BUILDPLATFORM=linux/arm64 | ||
|
||
WORKDIR /app | ||
|
||
RUN git clone [email protected]:deriv-com/p2p.git && \ | ||
cd p2p && \ | ||
npm install && \ | ||
npm install -g serve && \ | ||
npm run build | ||
ENV HUSKY=0 | ||
|
||
RUN git clone https://github.com/deriv-com/p2p.git . | ||
|
||
RUN npm install | ||
|
||
ENV NODE_ENV=production | ||
RUN npm run build | ||
|
||
FROM --platform=$BUILDPLATFORM node:lts-alpine3.20 | ||
|
||
RUN npm install -g serve | ||
|
||
COPY --from=build /app/dist /dist | ||
|
||
EXPOSE 4000 | ||
|
||
ENTRYPOINT ["serve"] | ||
|
||
CMD ["-s", "p2p/dist", "-l", "4000"] | ||
CMD ["-s", "dist", "-l", "4000"] |