33 lines
810 B
Docker
33 lines
810 B
Docker
|
# Git clone stage
|
||
|
FROM farhan23432/ris_git:2.30.1 AS code
|
||
|
ARG BUILD_ID
|
||
|
RUN echo $BUILD_ID
|
||
|
LABEL stage=builder
|
||
|
LABEL build_id=$BUILD_ID
|
||
|
RUN mkdir /repo
|
||
|
WORKDIR /repo
|
||
|
ARG PAT_TOKEN
|
||
|
ENV PAT_TOKEN=$PAT_TOKEN
|
||
|
|
||
|
RUN git clone http://$GITEA_USER:$GITEA_PASS@git.io8.dev/risadmin_prod/prod124njac.git
|
||
|
|
||
|
# Node.js stage
|
||
|
FROM node:14
|
||
|
LABEL stage=builder
|
||
|
LABEL build_id=$BUILD_ID
|
||
|
WORKDIR /usr/src/app
|
||
|
|
||
|
# Copy package.json and package-lock.json to the working directory
|
||
|
COPY --from=code /repo/prod124njac/prod124njac-back-b/authsec_node/Backend/package*.json ./
|
||
|
|
||
|
# Install app dependencies
|
||
|
RUN npm install
|
||
|
|
||
|
# Copy the entire contents of the Backend directory
|
||
|
COPY --from=code /repo/prod124njac/prod124njac-back-b/authsec_node/Backend .
|
||
|
|
||
|
# Expose port 9292
|
||
|
EXPOSE 9292
|
||
|
|
||
|
# Command to run the application
|
||
|
CMD [ "npm", "start" ]
|