-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new version (7.4.1) of Bonita BPM #2598
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 30, 2017
warning: insecure protocol git:// detected: git://github.com/Bonitasoft-Community/docker_bonita
diff --git a/bonita_7.2.4/Dockerfile b/bonita_7.2.4/Dockerfile
deleted file mode 100644
index 72042a2..0000000
diff --git a/bonita_7.2.4/files/WEB-INF/web.xml b/bonita_7.2.4/files/WEB-INF/web.xml
deleted file mode 100644
index 2e237c9..0000000
diff --git a/bonita_7.2.4/files/config.sh b/bonita_7.2.4/files/config.sh
deleted file mode 100755
index 6265096..0000000
diff --git a/bonita_7.2.4/files/startup.sh b/bonita_7.2.4/files/startup.sh
deleted file mode 100755
index e520ddb..0000000
diff --git a/bonita_7.2.4/templates/bonita-platform-community-custom.properties b/bonita_7.2.4/templates/bonita-platform-community-custom.properties
deleted file mode 100644
index 8bc445c..0000000
diff --git a/bonita_7.2.4/templates/bonita-tenant-community-custom.properties b/bonita_7.2.4/templates/bonita-tenant-community-custom.properties
deleted file mode 100644
index def4044..0000000
diff --git a/bonita_7.2.4/templates/mysql/bonita.xml b/bonita_7.2.4/templates/mysql/bonita.xml
deleted file mode 100644
index 99a6d99..0000000
diff --git a/bonita_7.2.4/templates/platform-tenant-config.properties b/bonita_7.2.4/templates/platform-tenant-config.properties
deleted file mode 100644
index 67e8a8e..0000000
diff --git a/bonita_7.2.4/templates/postgres/bonita.xml b/bonita_7.2.4/templates/postgres/bonita.xml
deleted file mode 100644
index 70c8a9a..0000000
diff --git a/bonita_7.2.4/templates/setenv.sh b/bonita_7.2.4/templates/setenv.sh
deleted file mode 100755
index 1654c81..0000000
diff --git a/bonita_latest/Dockerfile b/bonita_7.3.3/Dockerfile
similarity index 100%
copy from bonita_latest/Dockerfile
copy to bonita_7.3.3/Dockerfile
diff --git a/bonita_latest/files/WEB-INF/web.xml b/bonita_7.3.3/files/WEB-INF/web.xml
similarity index 100%
copy from bonita_latest/files/WEB-INF/web.xml
copy to bonita_7.3.3/files/WEB-INF/web.xml
diff --git a/bonita_latest/files/config.sh b/bonita_7.3.3/files/config.sh
similarity index 100%
copy from bonita_latest/files/config.sh
copy to bonita_7.3.3/files/config.sh
diff --git a/bonita_7.2.4/files/functions.sh b/bonita_7.3.3/files/functions.sh
similarity index 100%
rename from bonita_7.2.4/files/functions.sh
rename to bonita_7.3.3/files/functions.sh
diff --git a/bonita_latest/files/startup.sh b/bonita_7.3.3/files/startup.sh
similarity index 100%
copy from bonita_latest/files/startup.sh
copy to bonita_7.3.3/files/startup.sh
diff --git a/bonita_latest/templates/database.properties b/bonita_7.3.3/templates/database.properties
similarity index 100%
copy from bonita_latest/templates/database.properties
copy to bonita_7.3.3/templates/database.properties
diff --git a/bonita_latest/templates/h2/bitronix-resources.properties b/bonita_7.3.3/templates/h2/bitronix-resources.properties
similarity index 100%
rename from bonita_latest/templates/h2/bitronix-resources.properties
rename to bonita_7.3.3/templates/h2/bitronix-resources.properties
diff --git a/bonita_latest/templates/h2/bonita.xml b/bonita_7.3.3/templates/h2/bonita.xml
similarity index 100%
rename from bonita_latest/templates/h2/bonita.xml
rename to bonita_7.3.3/templates/h2/bonita.xml
diff --git a/bonita_7.2.4/templates/mysql/bitronix-resources.properties b/bonita_7.3.3/templates/mysql/bitronix-resources.properties
similarity index 100%
rename from bonita_7.2.4/templates/mysql/bitronix-resources.properties
rename to bonita_7.3.3/templates/mysql/bitronix-resources.properties
diff --git a/bonita_latest/templates/mysql/bonita.xml b/bonita_7.3.3/templates/mysql/bonita.xml
similarity index 100%
rename from bonita_latest/templates/mysql/bonita.xml
rename to bonita_7.3.3/templates/mysql/bonita.xml
diff --git a/bonita_7.2.4/templates/postgres/bitronix-resources.properties b/bonita_7.3.3/templates/postgres/bitronix-resources.properties
similarity index 100%
rename from bonita_7.2.4/templates/postgres/bitronix-resources.properties
rename to bonita_7.3.3/templates/postgres/bitronix-resources.properties
diff --git a/bonita_latest/templates/postgres/bonita.xml b/bonita_7.3.3/templates/postgres/bonita.xml
similarity index 100%
rename from bonita_latest/templates/postgres/bonita.xml
rename to bonita_7.3.3/templates/postgres/bonita.xml
diff --git a/bonita_latest/templates/setenv.sh b/bonita_7.3.3/templates/setenv.sh
similarity index 100%
copy from bonita_latest/templates/setenv.sh
copy to bonita_7.3.3/templates/setenv.sh
diff --git a/bonita_latest/Dockerfile b/bonita_latest/Dockerfile
index 98b7375..8d6df42 100644
--- a/bonita_latest/Dockerfile
+++ b/bonita_latest/Dockerfile
@@ -26,27 +26,13 @@ RUN wget -q "https://github.com/tianon/gosu/releases/download/1.6/gosu-$(dpkg --
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
-ENV BONITA_VERSION 7.3.3
+ENV BONITA_VERSION 7.4.1
ENV TOMCAT_VERSION 7.0.67
-ENV BONITA_SHA256 128911e3b6241e135b2dbc496d8ce383d921f2f2478fc5fad4331e1fd362eb4f
-ENV POSTGRES_JDBC_DRIVER postgresql-9.3-1102.jdbc41.jar
-ENV POSTGRES_SHA256 b78749d536da75c382d0a71c717cde6850df64e16594676fc7cacb5a74541d66
-ENV MYSQL_JDBC_DRIVER mysql-connector-java-5.1.26
-ENV MYSQL_SHA256 40b2d49f6f2551cc7fa54552af806e8026bf8405f03342205852e57a3205a868
-
-# retrieve JDBC drivers
-RUN mkdir /opt/files \
- && wget -q https://jdbc.postgresql.org/download/${POSTGRES_JDBC_DRIVER} -O /opt/files/${POSTGRES_JDBC_DRIVER} \
- && echo "$POSTGRES_SHA256" /opt/files/${POSTGRES_JDBC_DRIVER} | sha256sum -c - \
- && wget -q http://dev.mysql.com/get/Downloads/Connector-J/${MYSQL_JDBC_DRIVER}.zip -O /opt/files/${MYSQL_JDBC_DRIVER}.zip \
- && echo "$MYSQL_SHA256" /opt/files/${MYSQL_JDBC_DRIVER}.zip | sha256sum -c - \
- && unzip -q /opt/files/${MYSQL_JDBC_DRIVER}.zip -d /opt/files/ \
- && mv /opt/files/${MYSQL_JDBC_DRIVER}/${MYSQL_JDBC_DRIVER}-bin.jar /opt/files/ \
- && rm -r /opt/files/${MYSQL_JDBC_DRIVER} \
- && rm /opt/files/${MYSQL_JDBC_DRIVER}.zip
+ENV BONITA_SHA256 e299ae1b68f40699ec8607911967c614206c7e74d6ab36ea03d3f1de7e8109a3
# add Bonita BPM archive to the container
-RUN wget -q http://download.forge.ow2.org/bonita/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}.zip -O /opt/files/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}.zip \
+RUN mkdir /opt/files \
+ && wget -q http://download.forge.ow2.org/bonita/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}.zip -O /opt/files/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}.zip \
&& echo "$BONITA_SHA256" /opt/files/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}.zip | sha256sum -c -
# create Volume to store Bonita BPM files
diff --git a/bonita_latest/files/WEB-INF/web.xml b/bonita_latest/files/WEB-INF/web.xml
index 591f192..9710663 100644
--- a/bonita_latest/files/WEB-INF/web.xml
+++ b/bonita_latest/files/WEB-INF/web.xml
@@ -153,12 +153,27 @@
<url-pattern>/portal/downloadDocument</url-pattern>
<url-pattern>/portal/documentDownload</url-pattern>
<url-pattern>/API/documentDownload</url-pattern>
+ <url-pattern>/API/identity/*</url-pattern>
+ <url-pattern>/API/customuserinfo/*</url-pattern>
+ <url-pattern>/API/system/*</url-pattern>
+ <url-pattern>/API/userXP/*</url-pattern>
+ <url-pattern>/API/portal/*</url-pattern>
+ <url-pattern>/API/bpm/*</url-pattern>
+ <url-pattern>/API/bdm/*</url-pattern>
+ <url-pattern>/API/living/*</url-pattern>
+ <url-pattern>/API/tenant/*</url-pattern>
+ <url-pattern>/API/platform/*</url-pattern>
+ <url-pattern>/API/monitoring/*</url-pattern>
+ <url-pattern>/API/form/*</url-pattern>
+ <url-pattern>/API/extension/*</url-pattern>
<url-pattern>/portal/runreport</url-pattern>
<url-pattern>/portal/BonitaConsole.html</url-pattern>
<url-pattern>/login.jsp</url-pattern>
<url-pattern>/portal/portal.nocache.js</url-pattern>
<url-pattern>/portal.js/index.html</url-pattern>
<url-pattern>/apps/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
@@ -170,10 +185,16 @@
<url-pattern>/API/*</url-pattern>
<url-pattern>/APIToolkit/*</url-pattern>
<!--
- In the case of a custom page served in a living application calls to the
- REST API are done though /portal/custom-page/API then forwarded to /API which breaks dynamic security rules.
+ In the case of a custom page served in a custom profile calls to the
+ REST API are done though /portal/custom-page/API
-->
<url-pattern>/portal/custom-page/API/*</url-pattern>
+ <!--
+ In the case of a form or in the case of a custom page served in a living application
+ REST API are done though /portal/resource/*/API or /apps/*/API (layout)
+ -->
+ <url-pattern>/portal/resource/*</url-pattern>
+ <url-pattern>/apps/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>RestAPIAuthorizationFilter</filter-name>
@@ -516,6 +537,7 @@
<servlet-mapping>
<servlet-name>formFileUploadServlet</servlet-name>
<url-pattern>/API/formFileUpload</url-pattern>
+ <url-pattern>/portal/custom-page/API/formFileUpload</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>exportProcessActorsServlet</servlet-name>
@@ -524,6 +546,7 @@
<servlet-mapping>
<servlet-name>iconServlet</servlet-name>
<url-pattern>/API/avatars/*</url-pattern>
+ <url-pattern>/portal/custom-page/API/avatars/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>deprecatedDocumentDownloadServlet</servlet-name>
@@ -533,6 +556,7 @@
<servlet-name>documentDownload</servlet-name>
<url-pattern>/portal/documentDownload</url-pattern>
<url-pattern>/API/documentDownload</url-pattern>
+ <url-pattern>/portal/custom-page/API/documentDownload</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>formsDocumentDownload</servlet-name>
@@ -542,6 +566,7 @@
<servlet-name>formsDocumentImage</servlet-name>
<url-pattern>/portal/formsDocumentImage</url-pattern>
<url-pattern>/API/formsDocumentImage</url-pattern>
+ <url-pattern>/portal/custom-page/API/formsDocumentImage</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>loginService</servlet-name>
@@ -630,6 +655,28 @@
</servlet-mapping>-->
+ <!-- Container Resources -->
+ <resource-ref>
+ <res-ref-name>java:comp/env/bonitaDS</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>java:comp/env/bonitaSequenceManagerDS</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>java:comp/env/BusinessDataDS</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>java:comp/env/NotManagedBizDataDS</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
diff --git a/bonita_latest/files/config.sh b/bonita_latest/files/config.sh
index e1fa882..4bcbaa9 100755
--- a/bonita_latest/files/config.sh
+++ b/bonita_latest/files/config.sh
@@ -21,13 +21,11 @@ then
DB_VENDOR='postgres'
DB_HOST=$POSTGRES_PORT_5432_TCP_ADDR
DB_PORT=$POSTGRES_PORT_5432_TCP_PORT
- JDBC_DRIVER=$POSTGRES_JDBC_DRIVER
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
- JDBC_DRIVER=${MYSQL_JDBC_DRIVER}-bin.jar
else
DB_VENDOR=${DB_VENDOR:-h2}
fi
@@ -38,11 +36,9 @@ case $DB_VENDOR in
DB_PORT=${DB_PORT:-9091}
;;
"postgres")
- JDBC_DRIVER=$POSTGRES_JDBC_DRIVER
DB_PORT=${DB_PORT:-5432}
;;
"mysql")
- JDBC_DRIVER=${MYSQL_JDBC_DRIVER}-bin.jar
DB_PORT=${DB_PORT:-3306}
;;
*)
@@ -103,10 +99,8 @@ fi
# apply conf
# copy templates
-cp ${BONITA_TPL}/setenv.sh ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/bin/setenv.sh
+cp ${BONITA_TPL}/setenv.sh ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/tomcat-templates/setenv.sh
cp ${BONITA_TPL}/database.properties ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/database.properties
-cp ${BONITA_TPL}/${DB_VENDOR}/bitronix-resources.properties ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/conf/bitronix-resources.properties
-cp ${BONITA_TPL}/${DB_VENDOR}/bonita.xml ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/conf/Catalina/localhost/bonita.xml
# if required, uncomment dynamic checks on REST API
if [ "$REST_API_DYN_AUTH_CHECKS" = 'true' ]
@@ -117,7 +111,7 @@ fi
if [ "$HTTP_API" = 'false' ]
then
cd ${BONITA_FILES}/
- zip ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/webapps/bonita.war WEB-INF/web.xml
+ zip ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/server/webapps/bonita.war WEB-INF/web.xml
fi
# replace variables
@@ -129,18 +123,15 @@ find ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION
-e 's/^#platformAdminUsername\s*=.*/'"platformAdminUsername=${PLATFORM_LOGIN}"'/' \
-e 's/^#platformAdminPassword\s*=.*/'"platformAdminPassword=${PLATFORM_PASSWORD}"'/'
-sed -i -e 's/{{DB_VENDOR}}/'"${DB_VENDOR}"'/' \
- -e 's/{{BIZ_DB_VENDOR}}/'"${BIZ_DB_VENDOR}"'/' \
- -e 's/{{JAVA_OPTS}}/'"${JAVA_OPTS}"'/' \
- ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/bin/setenv.sh
+sed -i -e 's/{{JAVA_OPTS}}/'"${JAVA_OPTS}"'/' ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_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}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/lib/bonita/$file ]
+ if [ ! -e ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/lib/$file ]
then
- cp ${BONITA_FILES}/${JDBC_DRIVER} ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/lib/bonita/
+ cp ${BONITA_FILES}/${JDBC_DRIVER} ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/lib/
fi
fi
@@ -153,7 +144,9 @@ sed -e 's/{{DB_VENDOR}}/'"${DB_VENDOR}"'/' \
-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}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/conf/bitronix-resources.properties \
- ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/conf/Catalina/localhost/bonita.xml \
- ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/database.properties
+ -i ${BONITA_PATH}/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/setup/database.properties
+# use the setup tool to initialize and configure Bonita BPM Tomcat bundle
+cd /opt/bonita/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}
+./setup/setup.sh init
+./setup/setup.sh configure
diff --git a/bonita_latest/files/startup.sh b/bonita_latest/files/startup.sh
index a710960..3672da5 100755
--- a/bonita_latest/files/startup.sh
+++ b/bonita_latest/files/startup.sh
@@ -18,4 +18,4 @@ then
done
fi
# launch tomcat
-exec gosu bonita /opt/bonita/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/bin/catalina.sh run
+exec gosu bonita /opt/bonita/BonitaBPMCommunity-${BONITA_VERSION}-Tomcat-${TOMCAT_VERSION}/server/bin/catalina.sh run
diff --git a/bonita_latest/templates/database.properties b/bonita_latest/templates/database.properties
index d85c4fe..b9c56d6 100644
--- a/bonita_latest/templates/database.properties
+++ b/bonita_latest/templates/database.properties
@@ -1,72 +1,39 @@
-#####################
-# Database properties
-#####################
-
-# others valid values are commented
-db.vendor={{DB_VENDOR}}
-#db.vendor=postgres
-#db.vendor=sqlserver
-#db.vendor=oracle
-#db.vendor=mysql
-
-db.server.name={{DB_HOST}}
-
-# when using h2, no port setting is needed since connexion is made using file protocol mode using relative directory.
+####################################################################################
#
-# 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 stills points to the right folder
-h2.database.dir=../database
-
-## postgres
-#db.server.port=5432
-
-## sqlserver
-#db.server.port=1433
+# Modify the following values to suit your database needs.
+# Fore more information, see file ../HOW_TO_INSTALL_AND_RUN.txt
+#
+####################################################################################
-## oracle
-#db.server.port=1521
-## mysql
-#db.server.port=3306
+#########################################
+# Bonita BPM 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}}
db.database.name={{DB_NAME}}
db.user={{DB_USER}}
db.password={{DB_PASS}}
-# properties below don't need to be modified unless specific requirements
-
-# h2 properties
-
-h2.driverClassName=org.h2.Driver
-
-# connecting to h2 via file instead of tcp protocol ensure that:
-# 1) DB file will be created on demand
-# 2) when h2 server started by web container (tomcat/jboss) is stopped, setup tool can still pull/push configuration
-# for first run if no h2 tcp server is running
-h2.url=jdbc:h2:file:${h2.database.dir}/${db.database.name};lock_mode=0;mvcc=true;db_close_on_exit=false;ignorecase=true;
-# If using h2 in TCP mode (H2 server up and running in Bonita BPM Studio, for instance), use this URL:
-#h2.url=jdbc:h2:tcp://${db.server.name}:${db.server.port}/${db.database.name};MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE;IGNORECASE=TRUE;
+###################################
+# 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}}
-# postgres properties
-postgres.driverClassName=org.postgresql.Driver
-postgres.url=jdbc:postgresql://${db.server.name}:${db.server.port}/${db.database.name}
-# mysql properties
-mysql.driverClassName=com.mysql.jdbc.Driver
-mysql.url=jdbc:mysql://${db.server.name}:${db.server.port}/${db.database.name}?useUnicode=true&characterEncoding=UTF-8
-
-# sqlserver properties
-sqlserver.url=jdbc:sqlserver://${db.server.name}:${db.server.port};database=${db.database.name}
-sqlserver.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
-
-# oracle properties
-oracle.driverClassName=oracle.jdbc.OracleDriver
-oracle.url=jdbc:oracle:thin:@${db.server.name}:${db.server.port}:${db.database.name}
-
-# spring properties
-spring.datasource.username=${db.user}
-spring.datasource.password=${db.password}
-spring.datasource.driver-class-name=${${db.vendor}.driverClassName}
-spring.datasource.url=${${db.vendor}.url}
+# 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
diff --git a/bonita_latest/templates/mysql/bitronix-resources.properties b/bonita_latest/templates/mysql/bitronix-resources.properties
deleted file mode 100644
index 9ae69bb..0000000
diff --git a/bonita_latest/templates/postgres/bitronix-resources.properties b/bonita_latest/templates/postgres/bitronix-resources.properties
deleted file mode 100644
index 4549e1e..0000000
diff --git a/bonita_latest/templates/setenv.sh b/bonita_latest/templates/setenv.sh
index 3a60d39..f869d52 100755
--- a/bonita_latest/templates/setenv.sh
+++ b/bonita_latest/templates/setenv.sh
@@ -2,16 +2,17 @@
# Set some JVM system properties required by Bonita BPM
-PLATFORM_SETUP="-Dorg.bonitasoft.platform.setup.folder=${CATALINA_HOME}/setup"
-H2_DATABASE_DIR="-Dorg.bonitasoft.h2.database.dir=${CATALINA_HOME}/database"
+PLATFORM_SETUP="-Dorg.bonitasoft.platform.setup.folder=${CATALINA_HOME}/../setup"
+#When changing org.bonitasoft.h2.database.dir location, update ${CATALINA_HOME}/conf/bitronix-resources.properties datasources accordingly.
+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={{DB_VENDOR}}"
+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={{BIZ_DB_VENDOR}}"
+BDM_DB_OPTS="-Dsysprop.bonita.bdm.db.vendor=h2"
# Bitronix (JTA service added to Tomcat and required by Bonita Engine for transaction management)
BTM_OPTS="-Dbtm.root=${CATALINA_HOME} -Dbitronix.tm.configuration=${CATALINA_HOME}/conf/bitronix-config.properties" |
Build test of #2598; 6afcd08 ( $ bashbrew build bonita:7.3.3
warning: insecure protocol git:// detected: git://github.com/Bonitasoft-Community/docker_bonita
Building bashbrew/cache:1d65ac1ea40dbd41ffad524fc2799f220d5dd2a1a9e1dc242ab6a579661a15cf (bonita:7.3.3)
Tagging bonita:7.3.3
$ test/run.sh bonita:7.3.3
testing bonita:7.3.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build bonita:7.4.1
Building bashbrew/cache:0fbbf2b93c5d2121c694087e630193cd7a35fff0c2df69796af593f1e0a17684 (bonita:7.4.1)
Tagging bonita:7.4.1
Tagging bonita:latest
$ test/run.sh bonita:7.4.1
testing bonita:7.4.1
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
|
tianon
approved these changes
Jan 30, 2017
yosifkit
approved these changes
Jan 30, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main changes :