Added container for RTL
This commit is contained in:
parent
a411d9de0e
commit
eb66313924
47
roles/apps/templates/rtl-cl/Containerfile
Normal file
47
roles/apps/templates/rtl-cl/Containerfile
Normal file
@ -0,0 +1,47 @@
|
||||
# Install Dependencies
|
||||
# ---------------
|
||||
FROM docker.io/almalinux/9-base as builder
|
||||
|
||||
RUN dnf update -y && dnf module -y enable nodejs:18 && dnf install -y nodejs
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY package.json /RTL/package.json
|
||||
COPY package-lock.json /RTL/package-lock.json
|
||||
|
||||
RUN npm install
|
||||
|
||||
# ---------------
|
||||
# Build App
|
||||
# ---------------
|
||||
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 --production
|
||||
|
||||
# ---------------
|
||||
# Release App
|
||||
# ---------------
|
||||
FROM docker.io/almalinux/9-init as runner
|
||||
|
||||
RUN dnf update -y && dnf module -y enable nodejs:18 && dnf install -y nodejs && dnf clean all && rm -fr /tmp/*
|
||||
|
||||
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/init", "-g", "--"]
|
||||
|
||||
CMD ["node", "rtl"]
|
||||
Loading…
x
Reference in New Issue
Block a user