You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2021/10/02 15:46:22 UTC
[incubator-hop] branch master updated: Explicitly declares and
passes HOP variables to tomcat plus some cleaning
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new f43454d Explicitly declares and passes HOP variables to tomcat plus some cleaning
new a036f42 Merge pull request #1104 from enricomariam42/master
f43454d is described below
commit f43454d66e51ff57f7e6988c41d9a0bbad4a6ca5
Author: enricomariam42 <en...@asst-brianza.it>
AuthorDate: Sat Oct 2 12:55:22 2021 +0200
Explicitly declares and passes HOP variables to tomcat plus some cleaning
---
docker/Dockerfile.web | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/docker/Dockerfile.web b/docker/Dockerfile.web
index 919ac1c..990b376 100644
--- a/docker/Dockerfile.web
+++ b/docker/Dockerfile.web
@@ -18,22 +18,31 @@
FROM tomcat:9
LABEL maintainer="Apache Hop Team"
-ENV HOP_WEB_THEME=light
-ENV HOP_CONFIG_FOLDER=${CATALINA_HOME}/webapps/ROOT/config
-ENV HOP_AUDIT_FOLDER=${CATALINA_HOME}/webapps/ROOT/audit
-ENV JAVA_OPTS='-Xms1g -Xmx2g -DHOP_CONFIG_FOLDER=${HOP_CONFIG_FOLDER} -DHOP_AUDIT_FOLDER=${HOP_AUDIT_FOLDER} -DHOP_WEB_THEME=${HOP_WEB_THEME}'
+ENV HOP_AES_ENCODER_KEY=
+ENV HOP_AUDIT_FOLDER="${CATALINA_HOME}/webapps/ROOT/audit"
+ENV HOP_CONFIG_FOLDER="${CATALINA_HOME}/webapps/ROOT/config"
+# specify the hop log level
+ENV HOP_LOG_LEVEL="Basic"
+# any JRE settings you want to pass on
+# The “-XX:+AggressiveHeap” tells the container to use all memory assigned to the container.
+# this removed the need to calculate the necessary heap Xmx
+ENV HOP_OPTIONS="-XX:+AggressiveHeap"
+ENV HOP_PASSWORD_ENCODER_PLUGIN="Hop"
+ENV HOP_PLUGIN_BASE_FOLDERS="plugins"
+# path to jdbc drivers
+ENV HOP_SHARED_JDBC_FOLDER=
+ENV HOP_WEB_THEME="light"
+
+# Set TOMCAT start variables
+ENV CATALINA_OPTS='${HOP_OPTIONS} -DHOP_AES_ENCODER_KEY="${HOP_AES_ENCODER_KEY}" -DHOP_AUDIT_FOLDER="${HOP_AUDIT_FOLDER}" -DHOP_CONFIG_FOLDER="${HOP_CONFIG_FOLDER}" -DHOP_LOG_LEVEL="${HOP_LOG_LEVEL}" -DHOP_PASSWORD_ENCODER_PLUGIN="${HOP_PASSWORD_ENCODER_PLUGIN}" -DHOP_PLUGIN_BASE_FOLDERS="${HOP_PLUGIN_BASE_FOLDERS}" -DHOP_SHARED_JDBC_FOLDER="${HOP_SHARED_JDBC_FOLDER}" -DHOP_WEB_THEME="${HOP_WEB_THEME}"'
# Cleanup and create folder
RUN rm -rf webapps/* \
- && mkdir ${CATALINA_HOME}/webapps/ROOT \
- && export HOP_AUDIT_FOLDER="${HOP_AUDIT_FOLDER}" \
- && export HOP_CONFIG_FOLDER="${HOP_CONFIG_FOLDER}" \
- && export HOP_WEB_THEME="${HOP_WEB_THEME}"
+ && mkdir "${CATALINA_HOME}"/webapps/ROOT
# Copy resources
-
-COPY ./assemblies/web/target/webapp/ ${CATALINA_HOME}/webapps/ROOT/
-COPY ./assemblies/plugins/dist/target/plugins ${CATALINA_HOME}/plugins
+COPY ./assemblies/web/target/webapp/ "${CATALINA_HOME}"/webapps/ROOT/
+COPY ./assemblies/plugins/dist/target/plugins "${CATALINA_HOME}"/plugins
# Fix hop-config.json
-RUN sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' webapps/ROOT/config/hop-config.json
+RUN sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' "${CATALINA_HOME}"/webapps/ROOT/config/hop-config.json