DEVOPS-2210 Update CI
This commit is contained in:
parent
d91778cca7
commit
bc2e925752
11 changed files with 271 additions and 133 deletions
45
Dockerfile
Normal file
45
Dockerfile
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
ARG BUILDER_IMAGE=nexus.ervu.rt-sk.ru/ervu-base/node:20.9-alpine-git
|
||||
ARG RUNTIME_IMAGE=nexus.ervu.rt-sk.ru/ervu-base/ervu/jdk:17.0.13-alpine-3.21
|
||||
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG MVN_FLAGS="-T4C -Pprod --batch-mode --no-transfer-progress"
|
||||
|
||||
RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/main" >> /etc/apk/repositories \
|
||||
&& echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/community" >> /etc/apk/repositories \
|
||||
&& apk --update --no-cache add maven openjdk17-jdk
|
||||
|
||||
ENV LANG=ru_RU.UTF-8
|
||||
ENV LANGUAGE=ru_RU.UTF-8
|
||||
ENV LC_ALL=ru_RU.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /root/.m2 \
|
||||
# && cp config/settings.xml /root/.m2/settings.xml \
|
||||
&& mvn clean ${MVN_FLAGS} \
|
||||
&& mvn package ${MVN_FLAGS}
|
||||
|
||||
RUN cd config-data-executor \
|
||||
&& mvn clean package ${MVN_FLAGS}
|
||||
|
||||
|
||||
FROM $RUNTIME_IMAGE
|
||||
|
||||
RUN rm -f /etc/apk/repositories \
|
||||
&& echo "https://dl-cdn.alpinelinux.org/alpine/v3.21/main" >> /etc/apk/repositories \
|
||||
&& apk --update --no-cache add nginx
|
||||
|
||||
ENV BACKEND_URL=http://localhost:8080
|
||||
ENV CONFIG_DATA_EXECUTOR_URL=http://localhost:8080/api
|
||||
|
||||
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/backend/target/*.jar /home/app/backend.jar
|
||||
COPY --from=builder /app/config-data-executor/target/*.jar /home/app/cde.jar
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/home/app/backend.jar"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue