Merge pull request #152 from jnbt/master
Only configure database connection if needed
This commit is contained in:
		
						commit
						c9a33c73bc
					
				| @ -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 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kyâne Pichou
						Kyâne Pichou