Skip to content

Commit c6000a7

Browse files
committed
also remove db.user and db.password
1 parent 15e9271 commit c6000a7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docker/web-and-data/docker-entrypoint.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ parse_db_params_from_config_and_command_line() {
2323
else
2424
PROPERTIES_FILE=$BAKED_IN_WAR_CONFIG_FILE
2525
fi
26-
for param in db.host db.user db.portal_db_name db.password db.connection_string spring.datasource.url; do
26+
for param in db.host db.user db.portal_db_name db.password db.connection_string spring.datasource.username spring.datasource.password spring.datasource.url; do
2727
if $(parse_db_params_from_command_line $@ | grep -q $param); then
2828
prop=$(parse_db_params_from_command_line $@ | grep "^$param" || [[ $? == 1 ]])
2929
else
@@ -33,7 +33,7 @@ parse_db_params_from_config_and_command_line() {
3333
then
3434
# Replace dot in parameter name with underscore.
3535
prop=$(sed "s/^db\./db_/" <<< $prop)
36-
prop=$(sed "s/^spring\.datasource\.url/spring\_datasource\_url/" <<< $prop)
36+
prop=$(sed "s/^spring\.datasource\./spring\_datasource\_/" <<< $prop)
3737
if [[ $param == spring.datasource.url ]]
3838
then
3939
# Remove the parameters (?...) from the connection URL.
@@ -64,7 +64,7 @@ check_db_connection() {
6464
then
6565
echo "----------------------------------------------------------------------------------------------------------------"
6666
echo "-- Connection error:"
67-
echo "-- You try to connect to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' or 'db.connection_string' properties."
67+
echo "-- You try to connect to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' or 'db.user', 'db.password' and 'db.connection_string' properties."
6868
echo "-- Please remove these properties and use the 'spring.datasource.url' property instead. See https://docs.cbioportal.org/deployment/customization/application.properties-reference/"
6969
echo "-- for assistance on building a valid connection string."
7070
echo "------------------------------------------------------------f---------------------------------------------------"
@@ -85,11 +85,11 @@ check_db_connection() {
8585
fi
8686
fi
8787

88-
while ! mysqladmin ping -s -h$(echo ${db_host} | cut -d: -f1) -P${db_port} -u${db_user} -p${db_password};
88+
while ! mysqladmin ping -s -h$(echo ${db_host} | cut -d: -f1) -P${db_port} -u${spring_datasource_username} -p${db_datasource_password};
8989
do
9090
sleep 5s;
9191
if [ -n "$SHOW_DEBUG_INFO" ] && [ "$SHOW_DEBUG_INFO" != "false" ]; then
92-
echo mysqladmin ping -s -h$(echo ${db_host} | cut -d: -f1) -P${db_port} -u${db_user} -p${db_password}
92+
echo mysqladmin ping -s -h$(echo ${db_host} | cut -d: -f1) -P${db_port} -u${spring_datasource_username} -p${db_datasource_password}
9393
fi
9494
echo "Database not available yet (first time can take a few minutes to load seed database)... Attempting reconnect..."
9595
done

docs/deployment/customization/application.properties-Reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This page describes the main properties within application.properties.
55
## Database Settings
66

77
```
8-
db.user=
9-
db.password=
8+
spring.datasource.username=
9+
spring.datasource.password=
1010
spring.datasource.url=
1111
spring.datasource.driver-class-name=[this is the name of your JDBC driver, e.g., com.mysql.jdbc.Driver]
1212
```

0 commit comments

Comments
 (0)