From bff5fcd4977a0d713d236c3ccf20d94dffdd2be3 Mon Sep 17 00:00:00 2001 From: Pavel Zilke Date: Tue, 24 Dec 2024 14:12:45 +0300 Subject: [PATCH] DEVOPS-1893 tomcat configs --- config/tomcat/etc/tomcat/conf.d/db.conf | 8 ++++ config/tomcat/etc/tomcat/context.xml | 36 +++++++++++++++ config/tomcat/etc/tomcat/tomcat.conf | 52 ++++++++++++++++++++++ config/tomcat/etc/tomcat/webbpm.properties | 18 ++++++++ 4 files changed, 114 insertions(+) create mode 100644 config/tomcat/etc/tomcat/conf.d/db.conf create mode 100644 config/tomcat/etc/tomcat/context.xml create mode 100644 config/tomcat/etc/tomcat/tomcat.conf create mode 100644 config/tomcat/etc/tomcat/webbpm.properties diff --git a/config/tomcat/etc/tomcat/conf.d/db.conf b/config/tomcat/etc/tomcat/conf.d/db.conf new file mode 100644 index 00000000..6ce4e96c --- /dev/null +++ b/config/tomcat/etc/tomcat/conf.d/db.conf @@ -0,0 +1,8 @@ +JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS \ + -Ddb.host=${DB_APP_HOST:-db} \ + -Ddb.port=${DB_APP_PORT:-5432} \ + -Ddb.name=${DB_APP_NAME:-app} \ + -Ddb.username=${DB_APP_USERNAME:-app_user} \ + -Ddb.password=${DB_APP_PASSWORD:-apppassword} \ +" +export JDK_JAVA_OPTIONS \ No newline at end of file diff --git a/config/tomcat/etc/tomcat/context.xml b/config/tomcat/etc/tomcat/context.xml new file mode 100644 index 00000000..e6c6fc8a --- /dev/null +++ b/config/tomcat/etc/tomcat/context.xml @@ -0,0 +1,36 @@ + + + + + + + + WEB-INF/web.xml + WEB-INF/tomcat-web.xml + ${catalina.base}/conf/web.xml + + + + + + diff --git a/config/tomcat/etc/tomcat/tomcat.conf b/config/tomcat/etc/tomcat/tomcat.conf new file mode 100644 index 00000000..c4090b26 --- /dev/null +++ b/config/tomcat/etc/tomcat/tomcat.conf @@ -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) diff --git a/config/tomcat/etc/tomcat/webbpm.properties b/config/tomcat/etc/tomcat/webbpm.properties new file mode 100644 index 00000000..dbd3ab73 --- /dev/null +++ b/config/tomcat/etc/tomcat/webbpm.properties @@ -0,0 +1,18 @@ +# WebBPM properties +# + +authentication.method=form + +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]+$ + +webbpm.mode=production +webbpm.jbpm.hibernate_statistics.enabled=false +webbpm.cache.hazelcast.hosts=127.0.0.1 +webbpm.cache.hazelcast.outbound_port_definitions=5801-5820