Commit 71b32562 authored by Bonita CI's avatar Bonita CI
Browse files

Merge branch 'master' into 'dev'

parents 506d3e1e 11ad5b8f
...@@ -18,3 +18,5 @@ target/ ...@@ -18,3 +18,5 @@ target/
# node and npm # node and npm
node node
node_modules/ node_modules/
/docker/files/BonitaCommunity-*.zip
/docker/bonita_*.tar.gz
FROM ubuntu:18.04
LABEL maintainer="Bonitasoft Runtime team <rd.engine@bonitasoft.com>"
# install packages
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
gnupg2 \
mysql-client-core-5.7 \
openjdk-11-jre-headless \
postgresql-client \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /opt/custom-init.d/
# create user to launch Bonita as non-root
RUN groupadd -r bonita -g 1000 \
&& useradd -u 1000 -r -g bonita -d /opt/bonita/ -s /sbin/nologin -c "Bonita User" bonita
# grab gosu
RUN (gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
|| gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4) \
&& curl -fsSL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture)" -o /usr/local/bin/gosu \
&& curl -fsSL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture).asc" -o /usr/local/bin/gosu.asc \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
# use --build-arg key=value in docker build command to override arguments
ARG BONITA_VERSION
ARG BONITA_SHA256
ARG BASE_URL
ARG BONITA_URL
ENV BONITA_VERSION ${BONITA_VERSION:-7.11.2}
ENV BONITA_SHA256 ${BONITA_SHA256:-36dca45fed326d700fddc52edc4efe2a14bc1111b2952fc0001047df9cf7a67a}
ENV ZIP_FILE BonitaCommunity-${BONITA_VERSION}.zip
ENV BASE_URL ${BASE_URL:-https://github.com/bonitasoft/bonita-platform-releases/releases/download}
ENV BONITA_URL ${BONITA_URL:-${BASE_URL}/${BONITA_VERSION}/BonitaCommunity-${BONITA_VERSION}.zip}
RUN echo "Downloading Bonita from url: ${BONITA_URL}"
RUN mkdir /opt/files
COPY files /opt/files
# add Bonita archive to the container:
RUN if [ -f "/opt/files/BonitaCommunity-${BONITA_VERSION}.zip" ]; then echo "File already present in /opt/files"; else curl -fsSL ${BONITA_URL} -o /opt/files/BonitaCommunity-${BONITA_VERSION}.zip; fi
# display downloaded checksum
RUN sha256sum /opt/files/${ZIP_FILE}
# check with expected checksum
RUN echo "$BONITA_SHA256" /opt/files/${ZIP_FILE} | sha256sum -c -
# create Volume to store Bonita files
VOLUME /opt/bonita
COPY templates /opt/templates
# expose Tomcat port
EXPOSE 8080
# command to run when the container starts
CMD ["/opt/files/startup.sh"]
#!/bin/bash
set -e
print_error() {
RED='\033[0;31m'
NC='\033[0m' # No Color
printf "${RED}ERROR - $1\n${NC}"
}
exit_with_usage() {
SCRIPT_NAME=$(basename "$0")
[ -n "$1" ] && print_error "$1" >&2
echo ""
echo "Usage: ./$SCRIPT_NAME [options] -- [--build-arg key=value]"
echo ""
echo "Options:"
echo " -a docker_build_args_file file to read docker build arguments from"
echo " -c use Docker cache while building image - by default build is performed with '--no-cache=true'"
echo ""
echo "Examples:"
echo " $> ./$SCRIPT_NAME --"
echo " $> ./$SCRIPT_NAME -a build_args -c -- --build-arg key1=value1 --build-arg key2=value2"
echo ""
exit 1
}
# parse command line arguments
no_cache="true"
while [ "$#" -gt 0 ]; do
# process next argument
case $1 in
-a)
shift
BUILD_ARGS_FILE=$1
if [ -z "$BUILD_ARGS_FILE" ]; then
exit_with_usage "Option -a requires an argument."
fi
if [ ! -f "$BUILD_ARGS_FILE" ]; then
exit_with_usage "Build args file not found: $BUILD_ARGS_FILE"
fi
;;
-c)
no_cache="false"
;;
--)
break
;;
*)
exit_with_usage "Unrecognized option: $1"
;;
esac
if [ "$#" -gt 0 ]; then
shift
fi
done
shift
BUILD_ARGS="--no-cache=${no_cache}"
# validate Dockerfile
if [ ! -f "Dockerfile" ]; then
exit_with_usage "File not found: Dockerfile"
fi
# append build args found in docker_build_args_file
if [ -n "$BUILD_ARGS_FILE" ] && [ ! -f "$BUILD_ARGS_FILE" ]; then
exit_with_usage "Build args file not found: $BUILD_ARGS_FILE"
fi
if [ -n "$BUILD_ARGS_FILE" ] && [ -f "$BUILD_ARGS_FILE" ]; then
BUILD_ARGS="$BUILD_ARGS $(echo $(cat $BUILD_ARGS_FILE | sed 's/^/--build-arg /g'))"
fi
# append build args found on command line
BUILD_ARGS="$BUILD_ARGS $*"
# Remove any pre-existing zip file:
rm -f ./files/BonitaCommunity-*.zip
cp ../tomcat/target/BonitaCommunity-*.zip files/
BONITA_VERSION=$(head -10 ../pom.xml | grep "<version>" | sed -e 's/.*<version>//g' -e 's/<\/version>.*//g')
if [[ "$BONITA_VERSION" == *"-SNAPSHOT"* ]]; then
echo "SNAPSHOT version detected: sending sha256 and BONITA_URL as extra parameters"
BONITA_SHA256=$(sha256sum ./files/BonitaCommunity-*.zip | cut -d' ' -f1)
BUILD_ARGS="${BUILD_ARGS} --build-arg BONITA_VERSION=${BONITA_VERSION}"
BUILD_ARGS="${BUILD_ARGS} --build-arg BONITA_SHA256=${BONITA_SHA256}"
fi
IMAGE_NAME=bonitasoft/bonita
IMAGE_NAME_AND_BONITA_VERSION=${IMAGE_NAME}:${BONITA_VERSION}
echo ". Building image <${IMAGE_NAME_AND_BONITA_VERSION}>"
build_cmd="docker build ${BUILD_ARGS} -t ${IMAGE_NAME_AND_BONITA_VERSION} ."
echo "Running command: '$build_cmd'"
eval "$build_cmd"
echo ". Done!"
This diff is collapsed.
#!/bin/bash
set -x
# Path to deploy the Tomcat Bundle
BONITA_PATH=${BONITA_PATH:-/opt/bonita}
# Templates directory
BONITA_TPL=${BONITA_TPL:-/opt/templates}
# Files directory
BONITA_FILES=${BONITA_FILES:-/opt/files}
# Flag to allow or not the SQL queries to automatically check and create the databases
ENSURE_DB_CHECK_AND_CREATION=${ENSURE_DB_CHECK_AND_CREATION:-true}
# Java OPTS
JAVA_OPTS=${JAVA_OPTS:--Xms1024m -Xmx1024m}
# Flag to enable or not dynamic authorization checking on Bonita REST API
REST_API_DYN_AUTH_CHECKS=${REST_API_DYN_AUTH_CHECKS:-true}
# Flag to enable or not Bonita HTTP API
HTTP_API=${HTTP_API:-false}
# retrieve the db parameters from the container linked
if [ -n "$POSTGRES_PORT_5432_TCP_PORT" ]
then
DB_VENDOR='postgres'
DB_HOST=$POSTGRES_PORT_5432_TCP_ADDR
DB_PORT=$POSTGRES_PORT_5432_TCP_PORT
elif [ -n "$MYSQL_PORT_3306_TCP_PORT" ]
then
DB_VENDOR='mysql'
DB_HOST=$MYSQL_PORT_3306_TCP_ADDR
DB_PORT=$MYSQL_PORT_3306_TCP_PORT
else
DB_VENDOR=${DB_VENDOR:-h2}
fi
case $DB_VENDOR in
"h2")
DB_HOST=${DB_HOST:-localhost}
DB_PORT=${DB_PORT:-9091}
;;
"postgres")
DB_PORT=${DB_PORT:-5432}
;;
"mysql")
DB_PORT=${DB_PORT:-3306}
;;
*)
;;
esac
# BIZ_DB_VENDOR is currently set to the same value than DB_VENDOR
BIZ_DB_VENDOR=$DB_VENDOR
# if not enforced, set the default values to configure the databases
DB_NAME=${DB_NAME:-bonitadb}
DB_USER=${DB_USER:-bonitauser}
DB_PASS=${DB_PASS:-bonitapass}
DB_DROP_EXISTING=${DB_DROP_EXISTING:-N}
BIZ_DB_NAME=${BIZ_DB_NAME:-businessdb}
BIZ_DB_USER=${BIZ_DB_USER:-businessuser}
BIZ_DB_PASS=${BIZ_DB_PASS:-businesspass}
BIZ_DB_DROP_EXISTING=${BIZ_DB_DROP_EXISTING:-N}
# if not enforced, set the default credentials
PLATFORM_LOGIN=${PLATFORM_LOGIN:-platformAdmin}
PLATFORM_PASSWORD=${PLATFORM_PASSWORD:-platform}
TENANT_LOGIN=${TENANT_LOGIN:-install}
TENANT_PASSWORD=${TENANT_PASSWORD:-install}
if [ ! -d ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION} ]
then
unzip -q ${BONITA_FILES}/BonitaCommunity-${BONITA_VERSION}.zip -d ${BONITA_PATH}
fi
if [ "${ENSURE_DB_CHECK_AND_CREATION}" = 'true' ]
then
# load SQL functions
. ${BONITA_FILES}/functions.sh
case "${DB_VENDOR}" in
mysql)
DB_ADMIN_USER=${DB_ADMIN_USER:-root}
if [ -z "$DB_ADMIN_PASS" ]
then
DB_ADMIN_PASS=$MYSQL_ENV_MYSQL_ROOT_PASSWORD
fi
;;
postgres)
DB_ADMIN_USER=${DB_ADMIN_USER:-postgres}
if [ -z "$DB_ADMIN_PASS" ]
then
DB_ADMIN_PASS=$POSTGRES_ENV_POSTGRES_PASSWORD
fi
;;
esac
if [ "${DB_VENDOR}" != 'h2' ]
then
# ensure to create bonita db and user
create_user_if_not_exists "$DB_VENDOR" "$DB_HOST" "$DB_PORT" "$DB_ADMIN_USER" "$DB_ADMIN_PASS" "$DB_USER" "$DB_PASS"
create_database_if_not_exists "$DB_VENDOR" "$DB_HOST" "$DB_PORT" "$DB_ADMIN_USER" "$DB_ADMIN_PASS" "$DB_NAME" "$DB_USER" "$DB_PASS" "$DB_DROP_EXISTING"
# ensure to create business db and user if needed
create_user_if_not_exists "$DB_VENDOR" "$DB_HOST" "$DB_PORT" "$DB_ADMIN_USER" "$DB_ADMIN_PASS" "$BIZ_DB_USER" "$BIZ_DB_PASS"
create_database_if_not_exists "$DB_VENDOR" "$DB_HOST" "$DB_PORT" "$DB_ADMIN_USER" "$DB_ADMIN_PASS" "$BIZ_DB_NAME" "$BIZ_DB_USER" "$BIZ_DB_PASS" "$BIZ_DB_DROP_EXISTING"
fi
fi
# apply conf
# copy templates
cp ${BONITA_TPL}/setenv.sh ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/tomcat-templates/setenv.sh
cp ${BONITA_TPL}/database.properties ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/database.properties
# if required, uncomment dynamic checks on REST API
if [ "$REST_API_DYN_AUTH_CHECKS" = 'true' ]
then
sed -i -e 's/^#GET|/GET|/' -e 's/^#POST|/POST|/' -e 's/^#PUT|/PUT|/' -e 's/^#DELETE|/DELETE|/' ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/platform_conf/initial/tenant_template_portal/dynamic-permissions-checks-custom.properties
fi
# if required, deactivate HTTP API by updating bonita.war with proper web.xml
if [ "$HTTP_API" = 'false' ]
then
cd ${BONITA_FILES}/
zip ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/server/webapps/bonita.war WEB-INF/web.xml
fi
# replace variables
find ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/platform_conf/initial -name "*.properties" | xargs -n10 sed -i \
-e 's/^#userName\s*=.*/'"userName=${TENANT_LOGIN}"'/' \
-e 's/^#userPassword\s*=.*/'"userPassword=${TENANT_PASSWORD}"'/' \
-e 's/^platform.tenant.default.username\s*=.*/'"platform.tenant.default.username=${TENANT_LOGIN}"'/' \
-e 's/^platform.tenant.default.password\s*=.*/'"platform.tenant.default.password=${TENANT_PASSWORD}"'/' \
-e 's/^#platformAdminUsername\s*=.*/'"platformAdminUsername=${PLATFORM_LOGIN}"'/' \
-e 's/^#platformAdminPassword\s*=.*/'"platformAdminPassword=${PLATFORM_PASSWORD}"'/'
sed -i -e 's/{{JAVA_OPTS}}/'"${JAVA_OPTS}"'/' ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/tomcat-templates/setenv.sh
if [ -n "$JDBC_DRIVER" ]
then
# if $JDBC_DRIVER is set and the driver is not present, copy the JDBC driver into the Bundle
file=$(basename $JDBC_DRIVER)
if [ ! -e ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/lib/$file ]
then
cp ${BONITA_FILES}/${JDBC_DRIVER} ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/lib/
fi
fi
sed -e 's/{{DB_VENDOR}}/'"${DB_VENDOR}"'/' \
-e 's/{{DB_USER}}/'"${DB_USER}"'/' \
-e 's/{{DB_PASS}}/'"${DB_PASS}"'/' \
-e 's/{{DB_NAME}}/'"${DB_NAME}"'/' \
-e 's/{{DB_HOST}}/'"${DB_HOST}"'/' \
-e 's/{{DB_PORT}}/'"${DB_PORT}"'/' \
-e 's/{{BIZ_DB_USER}}/'"${BIZ_DB_USER}"'/' \
-e 's/{{BIZ_DB_PASS}}/'"${BIZ_DB_PASS}"'/' \
-e 's/{{BIZ_DB_NAME}}/'"${BIZ_DB_NAME}"'/' \
-i ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/setup/database.properties
# apply logging configuration
cp ${BONITA_FILES}/logging.properties ${BONITA_PATH}/BonitaCommunity-${BONITA_VERSION}/server/conf/logging.properties
# use the setup tool to initialize and configure Bonita Tomcat bundle
cd /opt/bonita/BonitaCommunity-${BONITA_VERSION}
# platform setup tool logging configuration file
BONITA_SETUP_LOGGING_FILE=${BONITA_SETUP_LOGGING_FILE:-/opt/bonita/BonitaCommunity-${BONITA_VERSION}/setup/logback.xml}
echo y | ./setup/setup.sh init -Dlogging.config=${BONITA_SETUP_LOGGING_FILE}
./setup/setup.sh configure -Dlogging.config=${BONITA_SETUP_LOGGING_FILE}
# SQL functions
function create_user_if_not_exists {
if [ $# -ne 7 ]
then
echo 'Error'
echo 'Usage : create_user_if_not_exists $db_vendor $db_host $db_port $db_admin_user $db_admin_pass $db_user $db_pass'
exit 1
fi
db_vendor="$1"
db_host="$2"
db_port="$3"
db_admin_user="$4"
db_admin_pass="$5"
db_user="$6"
db_pass="$7"
case "${db_vendor}" in
mysql)
# check if the user exists
mysql -u $db_admin_user -p${db_admin_pass} -h $db_host --port $db_port -B -e "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '${db_user}')" | tail -n 1 | grep -q 1
# if the user is not present, create it
if [ $? -eq 1 ]
then
mysql -u $db_admin_user -p${db_admin_pass} -h $db_host --port $db_port -e "CREATE USER '${db_user}'@'%' IDENTIFIED BY '${db_pass}';"
fi
;;
postgres)
export PGPASSWORD=$db_admin_pass
# check if the user exists
psql -U $db_admin_user -h $db_host -p $db_port -d postgres -t -A -c "SELECT 1 FROM pg_roles WHERE rolname='${db_user}'" | grep -q 1
# if the user is not present, create it
if [ $? -eq 1 ]
then
psql -U $db_admin_user -h $db_host -p $db_port -d postgres -c "CREATE USER \"${db_user}\" WITH PASSWORD '${db_pass}'; GRANT \"${db_user}\" TO \"${db_admin_user}\";"
fi
;;
esac
}
function create_database_if_not_exists {
if [ $# -ne 9 ]
then
echo 'Error'
echo 'Usage : create_database_if_not_exists $db_vendor $db_host $db_port $db_admin_user $db_admin_pass $db_name $db_user $db_pass $db_drop_existing'
exit 1
fi
db_vendor="$1"
db_host="$2"
db_port="$3"
db_admin_user="$4"
db_admin_pass="$5"
db_name="$6"
db_user="$7"
db_pass="$8"
db_drop_existing="$9"
case "${db_vendor}" in
mysql)
# drop database if said so
if [ "$db_drop_existing" == "Y" ]
then
mysql -u $db_admin_user -p${db_admin_pass} -h $db_host --port $db_port -e "DROP DATABASE IF EXISTS \`${db_name}\`;"
fi
# if the db is not present, create it
mysql -u $db_admin_user -p${db_admin_pass} -h $db_host --port $db_port -e "CREATE DATABASE IF NOT EXISTS \`${db_name}\`;"
mysql -u $db_admin_user -p${db_admin_pass} -h $db_host --port $db_port -e "GRANT ALL PRIVILEGES ON \`${db_name}\`.* to '${db_user}'@'%';"
;;
postgres)
# drop database if said so
if [ "$db_drop_existing" == "Y" ]
then
psql -U $db_admin_user -h $db_host -p $db_port -d postgres -c "DROP DATABASE IF EXISTS \"${db_name}\";"
fi
# check if the db exists
psql -U $db_admin_user -h $db_host -p $db_port -d postgres -l | grep ${db_name}
# if the db is not present, create it
if [ $? -eq 1 ]
then
psql -U $db_admin_user -h $db_host -p $db_port -d postgres -c "CREATE DATABASE \"${db_name}\" OWNER \"${db_user}\";"
fi
;;
esac
}
handlers = java.util.logging.ConsoleHandler
.handlers = java.util.logging.ConsoleHandler
# The default logging level when not specifically defined
.level= INFO
# The minimum level to log
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = org.apache.juli.BonitaSimpleFormatter
# Allow logging to trace the actual logger producer class:
org.apache.juli.BonitaSimpleFormatter.format=%1$tF %1$tT.%1$tL %1$tz %4$s (%7$s) %3$s %5$s%6$s%n
# Use the following format to remove timestamp:
#java.util.logging.SimpleFormatter.format=%4$s: %3$s %5$s%6$s%n
# By default for development it's a good idea to set the default level for all Bonita component to INFO.
# In production WARNING is a good choice.
org.bonitasoft.level = WARNING
com.arjuna.level = INFO
org.jboss.narayana.tomcat.jta.level = FINE
# At platform initial setup, activate FINE messages on what is happening:
org.bonitasoft.platform.level = INFO
org.bonitasoft.engine.EngineInitializer.level = INFO
# If you want to have more log on connectors execution only, you can activate and modify the following lines
#org.bonitasoft.engine.core.connector.level = FINE
#org.bonitasoft.engine.connector.level = FINE
# If you want to have more log on expressions only, you can activate and modify the following lines
#org.bonitasoft.engine.expression.level = FINE
#org.bonitasoft.engine.data.instance.api.DataExpressionExecutorStrategy.level = FINE
# If you want to have more log on input/output of API calls, you can activate and modify the following line
#org.bonitasoft.engine.api.level = FINEST
# If you want to have more log on Asynchronous executions (Work/Job), you can activate and modify the following lines
#org.bonitasoft.engine.work.level = FINE
#org.bonitasoft.engine.execution.work.level = FINE
#org.bonitasoft.engine.job.level = FINE
#org.bonitasoft.engine.jobs.level = FINE
#org.bonitasoft.engine.scheduler.level = FINE
# Display monitoring information when property 'org.bonitasoft.engine.monitoring.publisher.logging.enable' is set to true in configuration file 'bonita-platform-community-custom.properties'
org.bonitasoft.engine.configuration.monitoring.LoggingMeterRegistry.level = INFO
# Specific logger for auditing work execution
BONITA_WORK_AUDIT.EXECUTION.level = INFO
# If you want to deactivate warnings on wrong handling of transient data
#org.bonitasoft.engine.operation.TransientDataLeftOperandHandler.level = SEVERE
#org.bonitasoft.engine.expression.ReevaluatingTransientDataExpressionExecutorStrategy.level = SEVERE
# Hibernate is used by Bonita and very verbose in the log. Should stay with WARNING level except when debugging database access issues
org.hibernate.level = WARNING
# Remove wrong warnings about ehcache:
org.hibernate.orm.cache.level = SEVERE
# enable tracking of slow execution queries:
org.hibernate.SQL_SLOW.level = INFO
# Ehcache is used by Bonita and very verbose in the log. Should stay with WARNING level except when debugging cache issues
net.sf.ehcache.level = WARNING
# Deactivate annoying false warning:
org.hibernate.type.TypeFactory.level = SEVERE
org.springframework.level = WARNING
org.bonitasoft.engine.service.impl.BonitaSpringContext.level = WARNING
# tuckey
org.tuckey.level = WARNING
# If you want to have more log on rest api extension provided logger, you can activate and modify the following lines
#org.bonitasoft.api.extension.level = FINE
#!/bin/bash
# ensure to set the proper owner of data volume
if [ `stat -c %U /opt/bonita/` != 'bonita' ]
then
chown -R bonita:bonita /opt/bonita/
fi
# ensure to apply the proper configuration
if [ ! -f /opt/${BONITA_VERSION}-configured ]
then
gosu bonita /opt/files/config.sh \
&& touch /opt/${BONITA_VERSION}-configured || exit 1
fi
if [ -d /opt/custom-init.d/ ]
then
for f in $(ls -v /opt/custom-init.d/*.sh)
do
[ -f "$f" ] && . "$f"
done
fi
# launch tomcat
export LOGGING_CONFIG="-Djava.util.logging.config.file=${BONITA_SERVER_LOGGING_FILE:-/opt/bonita/BonitaCommunity-${BONITA_VERSION}/server/conf/logging.properties}"
exec gosu bonita /opt/bonita/BonitaCommunity-${BONITA_VERSION}/server/bin/catalina.sh run
####################################################################################
#
# Modify the following values to suit your database needs.
# Fore more information, see file ../HOW_TO_CONFIGURE_AND_RUN.txt
#
####################################################################################
#########################################
# Bonita database properties
#########################################
# valid values are (h2, postgres, sqlserver, oracle, mysql)
db.vendor={{DB_VENDOR}}
# when using h2, no server or port setting is needed since connexion is made using file protocol mode using relative directory:
db.server.name={{DB_HOST}}
db.server.port={{DB_PORT}}
# if your database name contains a backslash (\) character, you must double it (\\):
db.database.name={{DB_NAME}}
db.user={{DB_USER}}
# if your database password contains a backslash (\) character, you must double it (\\):
db.password={{DB_PASS}}
###################################
# Business Data database properties
###################################
# valid values are (h2, postgres, sqlserver, oracle, mysql)
bdm.db.vendor={{DB_VENDOR}}
bdm.db.server.name={{DB_HOST}}
bdm.db.server.port={{DB_PORT}}
bdm.db.database.name={{BIZ_DB_NAME}}
bdm.db.user={{BIZ_DB_USER}}
bdm.db.password={{BIZ_DB_PASS}}
# IMPORTANT NOTE regarding H2 database:
# in case you move whole setup folder to another directory, you must change property below
# to point to original folder containing h2 database folder
# new value can be relative or absolute since it still points to the right folder
# WARNING for Windows users: keep forward slashes like below (instead of backslashes):
h2.database.dir=../h2_database
#!/bin/sh
# Set some JVM system properties required by Bonita
PLATFORM_SETUP="-Dorg.bonitasoft.platform.setup.folder=${CATALINA_HOME}/../setup"
H2_DATABASE_DIR="-Dorg.bonitasoft.h2.database.dir=${CATALINA_HOME}/../h2_database"
INCIDENT_LOG_DIR="-Dorg.bonitasoft.engine.incident.folder=${CATALINA_HOME}/logs"
# Define the RDMBS vendor use by Bonita Engine to store data. Valid values are: h2, postgres, sqlserver, oracle, mysql.
DB_OPTS="-Dsysprop.bonita.db.vendor=h2"
# Define the RDMBS vendor use by Bonita Engine to store Business Data. Valid values are: h2, postgres, sqlserver, oracle, mysql.
# If you use different DB engines by tenants, please update directly bonita-tenant-community-custom.properties
BDM_DB_OPTS="-Dsysprop.bonita.bdm.db.vendor=h2"
# Arjuna (JTA service added to Tomcat and required by Bonita Engine for transaction management)
ARJUNA_OPTS="-Dcom.arjuna.ats.arjuna.common.propertiesFile=${CATALINA_HOME}/conf/jbossts-properties.xml"
# Optional JAAS configuration. Usually used when delegating authentication to LDAP / Active Directory server
#SECURITY_OPTS="-Djava.security.auth.login.config=${CATALINA_HOME}/conf/jaas-standard.cfg"
# Pass the JVM system properties to Tomcat JVM using CATALINA_OPTS variable
CATALINA_OPTS="${CATALINA_OPTS} ${PLATFORM_SETUP} ${H2_DATABASE_DIR} ${DB_OPTS} ${BDM_DB_OPTS} ${ARJUNA_OPTS} ${INCIDENT_LOG_DIR} -Dfile.encoding=UTF-8 -Xshare:auto -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${CATALINA_HOME}/logs -Djava.security.egd=file:/dev/./urandom"
export CATALINA_OPTS
# Only set CATALINA_PID if not already set (check for empty value) by startup script (usually done by /etc/init.d/tomcat8 but not by startup.sh nor catalina.sh)
if [ -z ${CATALINA_PID+x} ]; then
CATALINA_PID=${CATALINA_BASE}/catalina.pid;
export CATALINA_PID;
fi
# extra lib required at Tomcat startup (for instance bonita juli extensions)
export CLASSPATH="${CATALINA_HOME}/lib/ext/*"
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<bonita.web.version>${project.version}</bonita.web.version> <bonita.web.version>${project.version}</bonita.web.version>
<bonita.engine.version>${project.version}</bonita.engine.version> <bonita.engine.version>${project.version}</bonita.engine.version>
<tomcat.version>8.5.53</tomcat.version> <tomcat.version>8.5.59</tomcat.version>
<tomcat9.version>9.0.31</tomcat9.version> <tomcat9.version>9.0.39</tomcat9.version>
<slf4j.version>1.7.25</slf4j.version> <slf4j.version>1.7.25</slf4j.version>
<deploy_plugin_skip>false</deploy_plugin_skip> <deploy_plugin_skip>false</deploy_plugin_skip>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment