This is an automated email from the ASF dual-hosted git repository.

shown pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d73ac6fc [improve] support master custom java opts (#2634)
0d73ac6fc is described below

commit 0d73ac6fc4dbd7a23b708d817e79509bdae287d2
Author: aias00 <[email protected]>
AuthorDate: Thu Aug 29 23:27:10 2024 +0800

    [improve] support master custom java opts (#2634)
    
    Co-authored-by: shown <[email protected]>
---
 script/assembly/server/bin/entrypoint.sh | 6 +++++-
 script/docker/collector/Dockerfile       | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/script/assembly/server/bin/entrypoint.sh 
b/script/assembly/server/bin/entrypoint.sh
index 4889fa272..0a9b0b26e 100644
--- a/script/assembly/server/bin/entrypoint.sh
+++ b/script/assembly/server/bin/entrypoint.sh
@@ -46,7 +46,11 @@ if [ ! -d $LOGS_DIR ]; then
 fi
 
 # JVM Configuration
-JAVA_OPTS=" -Doracle.jdbc.timezoneAsRegion=false"
+if [ -z "$JAVA_OPTS" ]; then
+  JAVA_OPTS=" -Doracle.jdbc.timezoneAsRegion=false"
+else
+  JAVA_OPTS="${JAVA_OPTS} -Doracle.jdbc.timezoneAsRegion=false"
+fi
 
 # JVM Configuration
 JAVA_MEM_OPTS=" -server -XX:SurvivorRatio=6 -XX:+UseParallelGC 
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$LOGS_DIR"
diff --git a/script/docker/collector/Dockerfile 
b/script/docker/collector/Dockerfile
index f5a76f173..624638801 100644
--- a/script/docker/collector/Dockerfile
+++ b/script/docker/collector/Dockerfile
@@ -25,6 +25,7 @@ RUN mkdir /var/run/sshd
 
 ADD apache-hertzbeat-collector-*-incubating-bin.tar.gz /opt/
 
+ENV JAVA_OPTS ""
 ENV TZ=Asia/Shanghai
 ENV LANG=en_US.UTF-8
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to