You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/05/26 05:51:06 UTC

[dolphinscheduler] branch dev updated: [Bug] init docker compose DATABASE env (#10244)

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

zhongjiajie pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 4351148f36 [Bug] init docker compose DATABASE env (#10244)
4351148f36 is described below

commit 4351148f36b2ab63303d95a26e8f3330eb3c74e3
Author: caishunfeng <ca...@gmail.com>
AuthorDate: Thu May 26 13:50:59 2022 +0800

    [Bug] init docker compose DATABASE env (#10244)
    
    skip source env if in docker
---
 deploy/docker/.env                                    | 1 +
 dolphinscheduler-tools/src/main/bin/upgrade-schema.sh | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/deploy/docker/.env b/deploy/docker/.env
index abec7b3e73..7c2e427763 100755
--- a/deploy/docker/.env
+++ b/deploy/docker/.env
@@ -19,5 +19,6 @@ HUB=ghcr.io/apache/dolphinscheduler
 TAG=latest
 
 TZ=Asia/Shanghai
+DATABASE=postgresql
 SPRING_DATASOURCE_URL=jdbc:postgresql://dolphinscheduler-postgresql:5432/dolphinscheduler
 REGISTRY_ZOOKEEPER_CONNECT_STRING=dolphinscheduler-zookeeper:2181
diff --git a/dolphinscheduler-tools/src/main/bin/upgrade-schema.sh b/dolphinscheduler-tools/src/main/bin/upgrade-schema.sh
index 055157bc2b..0541c35c4d 100755
--- a/dolphinscheduler-tools/src/main/bin/upgrade-schema.sh
+++ b/dolphinscheduler-tools/src/main/bin/upgrade-schema.sh
@@ -19,7 +19,9 @@
 BIN_DIR=$(dirname $0)
 DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/../..; pwd)}
 
-source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
+if [ "$DOCKER" != "true" ]; then
+  source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
+fi
 
 JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"}