diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b6a9ba21..00000000 --- a/Dockerfile +++ /dev/null @@ -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"] diff --git a/Dockerfile.pgs2 b/Dockerfile.pgs2 deleted file mode 100644 index 524beec0..00000000 --- a/Dockerfile.pgs2 +++ /dev/null @@ -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"] diff --git a/config/config.yaml b/config/config.yaml deleted file mode 100644 index 6a98c076..00000000 --- a/config/config.yaml +++ /dev/null @@ -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 diff --git a/config/nginx.conf b/config/nginx.conf index 5a8fa369..b55fbded 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -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; - - #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"; - } + 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"; + } } - 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"}'; + } } } diff --git a/config/settings.xml b/config/settings.xml deleted file mode 100644 index 6e183ec1..00000000 --- a/config/settings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - central-mirror - rtlabs-public - https://nexus-dev.pgs.rtlabs.ru/repository/maven-public - * - - - \ No newline at end of file diff --git a/config/uat/settings.xml b/config/uat/settings.xml deleted file mode 100644 index 415e466a..00000000 --- a/config/uat/settings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - central-mirror - rtlabs-public - http://nexus.gosuslugi.local/content/repositories/central - * - - - \ No newline at end of file