This commit is contained in:
Халтобин Евгений 2024-09-26 21:04:50 +03:00
parent 9e4cf5450b
commit 6601a1c5b0
16 changed files with 192 additions and 118 deletions

1
config/.gitignore vendored
View file

@ -1,2 +1,3 @@
/*.ear
/*.jar
/*.war

71
config/config.yaml Normal file
View file

@ -0,0 +1,71 @@
name: ervu-dashboard-backend
replicaCount: 1
resources:
requests:
memory: '256Mi'
cpu: '50m'
limits:
memory: '2Gi'
cpu: '1'
ports:
- name: http
containerPort: 8080
services:
- name: '{{ $.Values.name }}'
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 8080
postgres:
database: 'ervu-dashboard'
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /ul/version
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 5
ingress:
- name: '{{ $.Values.name }}'
annotations:
ingress.kubernetes.io/add-base-url: 'true'
labels:
app/name: ervu-lkrp-ul
rules:
- host: 'dashboard-ervu-dev.pgs.rtlabs.ru'
http:
paths:
- path: /ul
pathType: Prefix
backend:
service:
name: '{{ $.Values.name }}'
port:
name: http
- path: /manager
pathType: Prefix
backend:
service:
name: '{{ $.Values.name }}'
port:
name: http

6
config/entrypoint.sh Normal file
View file

@ -0,0 +1,6 @@
#! /bin/bash
. /etc/tomcat/tomcat.conf
. /etc/sysconfig/tomcat
/usr/libexec/tomcat/server start

View file

@ -1 +0,0 @@
registry=https://nexus-dev.pgs.rtlabs.ru/content/groups/group-npm/

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>mirror-micord</id>
<mirrorOf>micord</mirrorOf>
<name>mirror-micord</name>
<url>https://nexus-dev.pgs.rtlabs.ru/repository/maven-micord</url>
</mirror>
<mirror>
<id>mirror-micord-public</id>
<mirrorOf>micord-public</mirrorOf>
<name>mirror-micord-public</name>
<url>https://nexus-dev.pgs.rtlabs.ru/repository/maven-public</url>
</mirror>
</mirrors>
</settings>

View file

@ -1,7 +0,0 @@
TZ=Europe/Moscow
# App datasource
DB_APP_USERNAME=ervu-dashboard
DB_APP_PASSWORD=ervu-dashboard
DB_APP_HOST=db
DB_APP_PORT=5432
DB_APP_NAME=ervu-dashboard

View file

@ -0,0 +1,8 @@
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS \
-Ddb.host=${PG_HOST:-db} \
-Ddb.port=${PG_PORT:-5432} \
-Ddb.name=${PG_DATABASE:-app} \
-Ddb.username=${PG_USER:-app_user} \
-Ddb.password=${PG_PASSWORD:-apppassword} \
"
export JDK_JAVA_OPTIONS

View file

@ -29,8 +29,8 @@
<Manager pathname="" />
-->
<Resource name="java:/webbpm/AppDS" auth="Container"
<Resource name="webbpm/AppDS" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://${db.app.host}:${db.app.port}/${db.app.name}"
username="${db.app.username}" password="${db.app.password}" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
url="jdbc:postgresql://${db.host}:${db.port}/${db.name}"
username="${db.username}" password="${db.password}" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
</Context>

View file

@ -0,0 +1,52 @@
# System-wide configuration file for tomcat services
# This will be loaded by systemd as an environment file,
# so please keep the syntax. For shell expansion support
# place your custom files as /etc/tomcat/conf.d/*.conf
#
# There are 2 "classes" of startup behavior in this package.
# The old one, the default service named tomcat.service.
# The new named instances are called tomcat@instance.service.
#
# Use this file to change default values for all services.
# Change the service specific ones to affect only one service.
# For tomcat.service it's /etc/sysconfig/tomcat, for
# tomcat@instance it's /etc/sysconfig/tomcat@instance.
# This variable is used to figure out if config is loaded or not.
TOMCAT_CFG_LOADED="1"
# In new-style instances, if CATALINA_BASE isn't specified, it will
# be constructed by joining TOMCATS_BASE and NAME.
TOMCATS_BASE="/var/lib/tomcats/"
# Where your java installation lives
JAVA_HOME="/usr/lib/jvm/jre"
# Where your tomcat installation lives
CATALINA_HOME="/usr/share/tomcat"
# System-wide tmp
CATALINA_TMPDIR="/var/cache/tomcat/temp"
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
# Use JAVA_OPTS to set java.library.path for libtcnative.so
#JAVA_OPTS="-Djava.library.path=/usr/lib"
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
#JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
# You can change your tomcat locale here
#LANG="en_US"
# Run tomcat under the Java Security Manager
SECURITY_MANAGER="false"
# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set
# TimeoutStopSec in tomcat.service.
# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)

View file

@ -1,4 +1,5 @@
# WebBPM properties
#
authentication.method=form
@ -6,6 +7,8 @@ bpmn.enable=false
fias.enable=false
gar.enable=false
mail.jndi.resource.name=
reset_password.mail.template.path=mail/reset_password.html
security.password.regex=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]+$

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
export JAVA_OPTS="$JAVA_OPTS \
-Ddb.app.host=${DB_APP_HOST:-db} \
-Ddb.app.port=${DB_APP_PORT:-5432} \
-Ddb.app.name=${DB_APP_NAME:-app} \
-Ddb.app.username=${DB_APP_USERNAME:-app_user} \
-Ddb.app.password=${DB_APP_PASSWORD:-apppassword} \
"