diff --git a/app/docker-entry.sh b/app/docker-entry.sh index e5d9542..4b67798 100644 --- a/app/docker-entry.sh +++ b/app/docker-entry.sh @@ -51,9 +51,14 @@ if [ "$1" = 'platform' ]; then echo "Using existing config file" $MM_CONFIG fi - echo -ne "Configure database connection..." - export MM_SQLSETTINGS_DATASOURCE="postgres://$MM_USERNAME:$MM_PASSWORD@$DB_HOST:$DB_PORT_NUMBER/$MM_DBNAME?sslmode=disable&connect_timeout=10" - echo OK + if [ -z "$MM_SQLSETTINGS_DATASOURCE"] + then + echo -ne "Configure database connection..." + export MM_SQLSETTINGS_DATASOURCE="postgres://$MM_USERNAME:$MM_PASSWORD@$DB_HOST:$DB_PORT_NUMBER/$MM_DBNAME?sslmode=disable&connect_timeout=10" + echo OK + else + echo "Using existing database connection" + fi echo "Wait until database $DB_HOST:$DB_PORT_NUMBER is ready..." until nc -z $DB_HOST $DB_PORT_NUMBER