2025-07-03 03:40:52 +00:00
|
|
|
# Git clone
|
|
|
|
|
FROM alpine/git:v2.30.1 AS code
|
|
|
|
|
ARG BUILD_ID
|
|
|
|
|
ARG GITEA_USER
|
|
|
|
|
ARG GITEA_PASS
|
|
|
|
|
RUN echo $BUILD_ID
|
|
|
|
|
LABEL stage=builder
|
|
|
|
|
LABEL build_id=$BUILD_ID
|
|
|
|
|
RUN mkdir repo
|
|
|
|
|
WORKDIR /repo
|
|
|
|
|
RUN git clone http://$GITEA_USER:$GITEA_PASS@157.66.191.31:3000/risadmin_prod/test3jully.git
|
|
|
|
|
# angular build
|
|
|
|
|
FROM node:16.20.2-alpine3.18 as build
|
|
|
|
|
LABEL stage=app
|
|
|
|
|
LABEL build_id=$BUILD_ID
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
COPY --from=code /repo/test3jully/test3jully-front-f/authsec_angular/frontend/angular-clarity-master/package.json /repo/test3jully/test3jully-front-f/authsec_angular/frontend/angular-clarity-master/package-lock.json ./
|
|
|
|
|
RUN npm install
|
|
|
|
|
COPY --from=code /repo/test3jully/test3jully-front-f/authsec_angular/frontend/angular-clarity-master .
|
|
|
|
|
ENV NODE_OPTIONS="--max_old_space_size=4096"
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
# configuring nginx web-server
|
|
|
|
|
|
|
|
|
|
FROM nginx:1.17.1-alpine
|
|
|
|
|
#COPY --from=code /repo/cns-beta/springboot/angular-clarity-master/angular-clarity-master/default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
|
|
|
|
|
#RUN ls -a /usr/share/nginx/html/
|
|
|
|
|
EXPOSE 80
|
2025-07-15 08:58:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# AI Generated Changes:
|
|
|
|
|
FROM node:16-alpine AS build
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY test3jully-front-f/authsec_angular/frontend/angular-clarity-master/package*.json ./
|
|
|
|
|
RUN npm install
|
|
|
|
|
COPY test3jully-front-f/authsec_angular/frontend/angular-clarity-master/src ./src
|
|
|
|
|
COPY test3jully-front-f/authsec_angular/frontend/angular-clarity-master/angular.json .
|
|
|
|
|
COPY test3jully-front-f/authsec_angular/frontend/angular-clarity-master/tsconfig*.json ./
|
|
|
|
|
RUN npm run build
|
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
COPY --from=build /app/dist/ /usr/share/nginx/html
|
|
|
|
|
EXPOSE 4200
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
|
```
|