Merge remote-tracking branch 'ervu-frontend/release/ervu/1.9.11' into release/1.9.11

This commit is contained in:
Халтобин Евгений 2025-04-09 10:45:53 +03:00
commit 32b31709cf
6 changed files with 36 additions and 256 deletions

View file

@ -1,57 +0,0 @@
ARG BUILDER_IMAGE=registry.gosuslugi.local/ervu-uat/micord-deps:1.9.11
ARG RUNTIME_IMAGE=registry.gosuslugi.local/os/altlinux@sha256:fd478a99adab9e195d652f78d0c90638de83f6f605fd7254f6241e594054f0f2
FROM $BUILDER_IMAGE AS builder
ARG MVN_FLAGS="-T4C -Pprod -DexecuteNpmInstall=false --batch-mode --no-transfer-progress"
RUN apt-get update \
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
&& apt-get clean
ENV JAVA_HOME=/usr/lib/jvm/java
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/uat/settings.xml /root/.m2/settings.xml
RUN mvn clean ${MVN_FLAGS} \
&& mvn package ${MVN_FLAGS}
FROM $RUNTIME_IMAGE
COPY --from=builder /usr/lib/locale/ru_RU /usr/lib/locale/ru_RU
COPY --from=builder /usr/lib/locale/ru_RU.utf8 /usr/lib/locale/ru_RU.utf8
COPY --from=builder /usr/share/locale/ru_RU /usr/share/locale/ru_RU
COPY config/entrypoint.sh /entrypoint.sh
RUN apt-get update \
&& apt-get -y install fonts-ttf-ms java-17-openjdk-headless tomcat tomcat-webapps tomcat-admin-webapps \
&& apt-get clean \
&& rm -f /var/cache/apt/*.bin \
&& rm -f /var/lib/apt/lists/update* \
&& chmod +x /entrypoint.sh
ENV JAVA_HOME=/usr/lib/jvm/java
ENV LANG=ru_RU.UTF-8
ENV LANGUAGE=ru_RU.UTF-8
ENV LC_ALL=ru_RU.UTF-8
COPY config/tomcat /
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
&& chown -R tomcat:tomcat /var/lib/tomcat/webapps
COPY --from=builder /app/backend/target/account-applications.war /var/lib/tomcat/webapps/account-applications.war
USER tomcat
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -1,63 +0,0 @@
ARG BUILDER_IMAGE=registry-dev.pgs.rtlabs.ru/ervu/micord-deps:0.0.1-shaeb3853d5
ARG RUNTIME_IMAGE=registry-dev.pgs.rtlabs.ru/basealt/altsp:c10f1
FROM $BUILDER_IMAGE AS builder
ARG MVN_FLAGS="-T4C -Pprod -DexecuteNpmInstall=false --batch-mode --no-transfer-progress"
RUN rm -f /etc/apt/sources.list.d/* \
&& echo "rpm http://nexus-dev.pgs.rtlabs.ru repository/alt-c10f1-classic/x86_64 classic" > /etc/apt/sources.list \
&& echo "rpm http://nexus-dev.pgs.rtlabs.ru repository/alt-c10f1-classic/noarch classic" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
&& apt-get clean
ENV JAVA_HOME=/usr/lib/jvm/java
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
RUN mvn clean ${MVN_FLAGS} \
&& mvn package ${MVN_FLAGS}
FROM $RUNTIME_IMAGE
COPY --from=builder /usr/lib/locale/ru_RU /usr/lib/locale/ru_RU
COPY --from=builder /usr/lib/locale/ru_RU.utf8 /usr/lib/locale/ru_RU.utf8
COPY --from=builder /usr/share/locale/ru_RU /usr/share/locale/ru_RU
COPY config/entrypoint.sh /entrypoint.sh
RUN rm -f /etc/apt/sources.list.d/* \
&& echo "rpm http://nexus-dev.pgs.rtlabs.ru repository/alt-c10f1-classic/x86_64 classic" > /etc/apt/sources.list \
&& echo "rpm http://nexus-dev.pgs.rtlabs.ru repository/alt-c10f1-classic/noarch classic" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install fonts-ttf-ms java-17-openjdk-headless tomcat tomcat-webapps \
&& apt-get clean \
&& rm -f /var/cache/apt/*.bin \
&& rm -f /var/lib/apt/lists/update* \
&& chmod +x /entrypoint.sh
ENV JAVA_HOME=/usr/lib/jvm/java
ENV LANG=ru_RU.UTF-8
ENV LANGUAGE=ru_RU.UTF-8
ENV LC_ALL=ru_RU.UTF-8
COPY config/tomcat /
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
&& chown -R tomcat:tomcat /var/lib/tomcat/webapps
COPY --from=builder /app/backend/target/account-applications.war /var/lib/tomcat/webapps/account-applications.war
USER tomcat
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -1,74 +0,0 @@
name: ervu-account-applications-backend
replicaCount: 1
resources:
requests:
memory: '256Mi'
cpu: '50m'
limits:
memory: '2Gi'
cpu: '1'
env:
- name: ERVU_URL
value: 'https://{{ $.Values.ingress_base_host }}'
- name: ERVU_PWD_SIGN_SECRET_KEY
value: 'DtCAQdeKnrAMLfdJkFVdfQnyT/Z5OINK4jqX0LbavfM='
ports:
- name: http
containerPort: 8080
services:
- name: '{{ $.Values.name }}'
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 8080
postgres:
database: 'ervu_account_applications'
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /account-applications/version
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 5
ingress:
- name: '{{ $.Values.name }}'
annotations:
nginx.ingress.kubernetes.io/affinity: 'cookie'
nginx.ingress.kubernetes.io/session-cookie-name: 'stickysession'
nginx.ingress.kubernetes.io/session-cookie-max-age: '7200'
nginx.ingress.kubernetes.io/proxy-body-size: "75m"
nginx.ingress.kubernetes.io/rewrite-target: /account-applications/$2
labels:
app/name: ervu-account-applications
rules:
- host: '{{ $.Values.ingress_base_host }}'
http:
paths:
- path: /mfe/account-applications/account-applications(/|$)(.*)
pathType: Prefix
backend:
service:
name: '{{ $.Values.name }}'
port:
name: http

View file

@ -33,7 +33,7 @@ http {
server {
listen 80 default;
access_log /var/log/nginx/access.log nginx_main;
access_log /var/log/nginx/access.log nginx_main;
error_log /var/log/nginx/error.log error;
charset utf-8;
@ -55,8 +55,8 @@ http {
gzip_min_length 256;
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
@ -75,41 +75,41 @@ http {
text/xml;
location / {
root /frontend;
index index.html;
try_files $uri @index;
root /frontend;
index index.html;
try_files $uri @index;
#Application config
location = /src/resources/app-config.json {
add_header Cache-Control "no-cache";
expires 0;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
expires 1M;
access_log off;
# max-age must be in seconds
add_header Cache-Control "max-age=2629746, public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "max-age=31556952, public";
}
#Application config
location = /src/resources/app-config.json {
add_header Cache-Control "no-cache";
expires 0;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
expires 1M;
access_log off;
# max-age must be in seconds
add_header Cache-Control "max-age=2629746, public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "max-age=31556952, public";
}
}
location @index {
root /frontend;
add_header Cache-Control "no-cache";
expires 0;
try_files /index.html =404;
}
location @index {
root /frontend;
add_header Cache-Control "no-cache";
expires 0;
try_files /index.html =404;
}
location = /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
location = /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
}
}

View file

@ -1,13 +0,0 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>central-mirror</id>
<name>rtlabs-public</name>
<url>https://nexus-dev.pgs.rtlabs.ru/repository/maven-public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>

View file

@ -1,13 +0,0 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>central-mirror</id>
<name>rtlabs-public</name>
<url>http://nexus.gosuslugi.local/content/repositories/central</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>