Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
midPoint_container/container_files/mp-dir/repository-url
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If AUTHENTICATION=internal we avoid loading mod_shib and starting shibd. Also added environment variable checks so if some are missing due to wrong Docker composition, midPoint will inform user in a reasonable way.
executable file
52 lines (50 sloc)
1.2 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function resolvePort() { | |
if [[ $REPO_PORT == "default" ]]; then | |
case $REPO_DATABASE_TYPE in | |
mariadb) | |
echo 3306 | |
;; | |
mysql) | |
echo 3306 | |
;; | |
oracle) | |
echo 1521 | |
;; | |
postgresql) | |
echo 5432 | |
;; | |
sqlserver) | |
echo 1433 | |
;; | |
*) | |
echo "~~~~~ please supply JDBC port for your repository ~~~~~" | |
esac | |
else | |
echo $REPO_PORT | |
fi | |
} | |
if [[ $REPO_JDBC_URL == "default" ]]; then | |
REPO_PORT=$( resolvePort ) | |
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 |