You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/10/26 08:42:44 UTC

[inlong] branch master updated: [INLONG-6289][Docker][Audit] Add configuration to choose starting proxy or store or all (#6290)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7f8e8e06b [INLONG-6289][Docker][Audit] Add configuration to choose starting proxy or store or all (#6290)
7f8e8e06b is described below

commit 7f8e8e06ba65d99d968f7cfddeed256361324331
Author: Lucas <10...@users.noreply.github.com>
AuthorDate: Wed Oct 26 16:42:38 2022 +0800

    [INLONG-6289][Docker][Audit] Add configuration to choose starting proxy or store or all (#6290)
---
 inlong-audit/audit-docker/Dockerfile      |  2 ++
 inlong-audit/audit-docker/audit-docker.sh | 16 ++++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/inlong-audit/audit-docker/Dockerfile b/inlong-audit/audit-docker/Dockerfile
index 0a1042f3e..1c5edd7b3 100644
--- a/inlong-audit/audit-docker/Dockerfile
+++ b/inlong-audit/audit-docker/Dockerfile
@@ -31,6 +31,8 @@ ENV PULSAR_AUDIT_TOPIC="persistent:\/\/public\/default\/inlong-audit"
 ENV TUBE_MASTER_LIST="localhost:8715"
 ENV TUBE_AUDIT_TOPIC="inlong-audit"
 ENV AUDIT_DBNAME="apache_inlong_audit"
+# proxy/store/all, start audit module individually, or all
+ENV START_MODE="all"
 # mysql / clickhouse / elasticsearch
 ENV STORE_MODE=mysql
 # mysql
diff --git a/inlong-audit/audit-docker/audit-docker.sh b/inlong-audit/audit-docker/audit-docker.sh
index 474f68934..28dde5431 100755
--- a/inlong-audit/audit-docker/audit-docker.sh
+++ b/inlong-audit/audit-docker/audit-docker.sh
@@ -80,14 +80,18 @@ fi
 
 # start proxy
 cd "${file_path}/"
-if [ "${MQ_TYPE}" = "pulsar" ]; then
-  bash +x ./bin/proxy-start.sh pulsar
-fi
-if [ "${MQ_TYPE}" = "tubemq" ]; then
-  bash +x ./bin/proxy-start.sh tube
+if [ "${START_MODE}" = "all" ] || [ "${START_MODE}" = "proxy" ]; then
+  if [ "${MQ_TYPE}" = "pulsar" ]; then
+    bash +x ./bin/proxy-start.sh pulsar
+  fi
+  if [ "${MQ_TYPE}" = "tubemq" ]; then
+    bash +x ./bin/proxy-start.sh tube
+  fi
 fi
 # start store
-bash +x ./bin/store-start.sh
+if [ "${START_MODE}" = "all" ] || [ "${START_MODE}" = "store" ]; then
+  bash +x ./bin/store-start.sh
+fi
 sleep 3
 # keep alive
 tail -F ./logs/info.log