-
-
Notifications
You must be signed in to change notification settings - Fork 693
Closed as not planned
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem?
I have seen that there are several variables for the passwords of the root and db user inside the db container
MYSQL_PWD=db
MYSQL_ROOT_PASSWORD=root
MYSQL_PASSWORD=db
Would it be possible to read these variables from the .ddev/.env file, i.e. via
MYSQL_PASSWORD=db-changed
MYSQL_ROOT_PASSWORD=root-changed
and pass it to the /healtcheck.sh inside the db container?
While changing the root password currently works, changing the password of the db user seems to collide with the /healthcheck.sh of the db container, since the password is hardcoded
# If we can now access the server, we're healthy and ready
if mysql --host=127.0.0.1 -udb -pdb --database=db -e "SHOW DATABASES LIKE 'db';" >/dev/null; then
printf "healthy"
touch /tmp/healthy
exit 0
fi
and the .ddev/.env file is not passed to the db container.
Of course i could create another user for this, but it would be more elegant to change the password of the existing db user only.
Describe your solution
- Include
.ddev/.envin db container or source it in/healtcheck.shfrom/mnt/ddev_config/.env - Adjust
/healtcheck.shinside the db container to use the environment variableMYSQL_PASSWORD
Describe alternatives
No response
Additional context
No response
Reactions are currently unavailable