-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the database container in the Docker setup more generic #5014
base: trunk
Are you sure you want to change the base?
Conversation
Can you add some instructions on testing this locally? I presume it needs a stop, install, and start again so the container is restarted with the correct name and the wp-config.php file is updated with the correct host name. |
Sure! To test this, you'll need to perform the following on a pre-existing setup:
This will test the new compose file with MySQL (the default). To then test with MariaDB, run the same commands as above but run the following two commands first (or update the
Unfortunately, after this change, I believe that any local setup using the current configuration would see their database reset. I'm not sure how to avoid that with this change. |
We could avoid the data loss by retaining the |
We could post a brief note on Making WordPress Core detailing this. Another possible path we could take is to export the database when running |
Perhaps retaining the |
I don't have strong opinions against that, but it doesn't fully resolve the potential confusion the ticket aims to address. What if we were to include both the new one in this PR and |
…r-images # Conflicts: # .github/workflows/phpunit-tests.yml # docker-compose.yml
Currently, mysql is hard coded in several locations within the docker-compose.yml file. Although changing database types works interchangeably for the most part (Core also supports MariaDB), it is confusing to have a container named mysql that runs MariaDB.
For previous MariaDB versions, the mysql command is symlinked to the mariadb one. However, in MariaDB 11.0 that symlink is removed and causes failures. Making this container more generic will help spot commands still using mysql, and other potential issues.
Trac ticket: https://core.trac.wordpress.org/ticket/59110
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.