WIP: Set DB port if env var set
1 unresolved thread
1 unresolved thread
Part of #26 (closed)
Required as currently we use the default expected port from wordpress (3306
) , which for DBoD will be variable.
Replaced by !48 (merged)
Edited by Francisco Borges Aurindo Barros
Merge request reports
Activity
requested review from @rpareek
- Resolved by Rudraksh Pareek
LGTM. Do we also need a change at the deployment/chart level?
requested review from @jyde
requested review from @rpareek
requested review from @vasvi
mentioned in merge request !48 (merged)
73 73 74 74 echo "--> Creating Wordpress configuration files ..." 75 75 # --skip-check avoids the need for mysql binary and mysql lcoal install 76 wp config create --dbname="$MYSQL_DATABASE" --dbhost="$MYSQL_HOST" --dbprefix="$MYSQL_TABLE_PREFIX" --dbuser="$MYSQL_USER" --dbpass="$MYSQL_PASSWORD" --skip-check 76 if [ -v $MYSQL_PORT ]; then 77 wp config create --dbname="$MYSQL_DATABASE" --dbhost="$MYSQL_HOST:$MYSQL_PORT" --dbprefix="$MYSQL_TABLE_PREFIX" --dbuser="$MYSQL_USER" --dbpass="$MYSQL_PASSWORD" --skip-check 78 else 79 wp config create --dbname="$MYSQL_DATABASE" --dbhost="$MYSQL_HOST" --dbprefix="$MYSQL_TABLE_PREFIX" --dbuser="$MYSQL_USER" --dbpass="$MYSQL_PASSWORD" --skip-check 80 fi - Comment on lines +76 to +80
Nitpick: Just a suggestion on this could be the change bellow, so we do not repeat the command twice and make it a bit easier to read.
if [ -v "$MYSQL_PORT" ]; then
DBHOST="$MYSQL_HOST:$MYSQL_PORT"
else
DBHOST="$MYSQL_HOST"
fi
wp config create --dbhost**="$DBHOST"
...(rest of command)Edited by Georgios Tsoulos
added 4 commits
-
b9507d5d...bd2acc7b - 3 commits from branch
add-authz-endpoint
- c075ba6c - Set DB port if env var set
-
b9507d5d...bd2acc7b - 3 commits from branch
Please register or sign in to reply