From a3640dbb8db6826b50a78b654b5f5d3852306a17 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Mon, 10 Sep 2018 16:16:26 +0200 Subject: [PATCH] Add repository URL generation to the container --- .../container_files/repository-url | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/midpoint/midpoint-server/container_files/repository-url b/midpoint/midpoint-server/container_files/repository-url index abaeb2c..8681880 100755 --- a/midpoint/midpoint-server/container_files/repository-url +++ b/midpoint/midpoint-server/container_files/repository-url @@ -1,7 +1,25 @@ #!/bin/bash if [ $REPO_JDBC_URL == "default" ]; then - echo "jdbc:mariadb://$REPO_HOST:$REPO_PORT/$REPO_DATABASE?characterEncoding=utf8" + case $REPO_DATABASE_TYPE in + mariadb) + echo "jdbc:mariadb://$REPO_HOST:$REPO_PORT/$REPO_DATABASE?characterEncoding=utf8" + ;; + mysql) + echo "jdbc:mysql://$REPO_HOST:$REPO_PORT/$REPO_DATABASE?characterEncoding=utf8" + ;; + oracle) + echo "jdbc:oracle:thin:@$REPO_HOST:$REPO_PORT/xe" + ;; + postgresql) + echo "jdbc:postgresql://$REPO_HOST:$REPO_PORT/$REPO_DATABASE" + ;; + sqlserver) + echo "jdbc:sqlserver://$REPO_HOST:$REPO_PORT;database=$REPO_DATABASE" + ;; + *) + echo "~~~~~ please supply JDBC URL for your repository ~~~~~" + esac else echo $REPO_JDBC_URL fi