Skip to content

Commit

Permalink
Add repository URL generation to the container
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 10, 2018
1 parent e404ede commit a3640db
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion midpoint/midpoint-server/container_files/repository-url
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a3640db

Please sign in to comment.