kezhenxu94 commented on a change in pull request #7007:
URL: https://github.com/apache/dolphinscheduler/pull/7007#discussion_r757251507



##########
File path: docker/build/startup-init-conf.sh
##########
@@ -26,10 +26,19 @@ echo "init env variables"
 # Database
 #============================================================================
 export DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"}
+export DATABASE_DRIVER=${DATABASE_DRIVER:-"org.postgresql.Driver"}
+export DATABASE_HOST=${DATABASE_HOST:-"127.0.0.1"}
+export DATABASE_PORT=${DATABASE_PORT:-"5432"}
+export DATABASE_USERNAME=${DATABASE_USERNAME:-"root"}
+export DATABASE_PASSWORD=${DATABASE_PASSWORD:-"root"}
+export DATABASE_DATABASE=${DATABASE_DATABASE:-"dolphinscheduler"}
+export DATABASE_PARAMS=${DATABASE_PARAMS:-"characterEncoding=utf8"}
+# transform params to SPRING_DATASOURCE_XXX
+export 
SPRING_DATASOURCE_URL="jdbc:${DATABASE_TYPE}://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}?${DATABASE_PARAMS}"
+export SPRING_DATASOURCE_USERNAME=${DATABASE_USERNAME}
+export SPRING_DATASOURCE_PASSWORD=${DATABASE_PASSWORD}
+export SPRING_DATASOURCE_DRIVER_CLASS_NAME=${DATABASE_DRIVER}

Review comment:
       This is not needed, when the database type is set, the corresponding 
driver will be automatically picked up so let’s not expose the config to reduce 
users extra work.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to