-
Notifications
You must be signed in to change notification settings - Fork 158
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
d875d92
commit 772ba7f
Showing
1 changed file
with
2 additions
and
32 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,39 +1,9 @@ | ||
ARG BASE_DISTRO="node:alpine" | ||
|
||
FROM --platform=${BUILDPLATFORM} ${BASE_DISTRO} as builder | ||
|
||
WORKDIR /RTL | ||
|
||
COPY package.json /RTL/package.json | ||
COPY package-lock.json /RTL/package-lock.json | ||
|
||
RUN npm install --legacy-peer-deps | ||
|
||
COPY . . | ||
|
||
# Build the Angular application | ||
RUN npm run buildfrontend | ||
|
||
# Build the Backend from typescript server | ||
RUN npm run buildbackend | ||
|
||
# Remove non production necessary modules | ||
RUN npm prune --omit=dev --legacy-peer-deps | ||
|
||
FROM --platform=$BUILDPLATFORM ${BASE_DISTRO} as runner | ||
FROM --platform=$BUILDPLATFORM ${BASE_DISTRO} | ||
|
||
RUN apk add --no-cache tini | ||
|
||
WORKDIR /RTL | ||
|
||
COPY --from=builder /RTL/rtl.js ./rtl.js | ||
COPY --from=builder /RTL/package.json ./package.json | ||
COPY --from=builder /RTL/frontend ./frontend | ||
COPY --from=builder /RTL/backend ./backend | ||
COPY --from=builder /RTL/node_modules/ ./node_modules | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["/sbin/tini", "-g", "--"] | ||
|
||
CMD ["node", "rtl"] | ||
CMD ["sh"] |