diff --git a/.env b/.env index d393c9b324..bc22991269 100644 --- a/.env +++ b/.env @@ -46,12 +46,12 @@ LOCAL_DB_TYPE=mysql ## # The database version to use. # -# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above. +# Defaults to 8.0 with the assumption that LOCAL_DB_TYPE is set to `mysql` above. # # When using `mysql`, see https://hub.docker.com/r/amd64/mysql for valid versions. # When using `mariadb`, see https://hub.docker.com/r/amd64/mariadb for valid versions. ## -LOCAL_DB_VERSION=5.7 +LOCAL_DB_VERSION=8.0 # The debug settings to add to `wp-config.php`. LOCAL_WP_DEBUG=true diff --git a/README.md b/README.md index 9af956b28e..7d71d75f7e 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,29 @@ Starting the environment again is a single command: npm run env:start ``` +#### Resetting the development environment + +The development environment can be reset. This will destroy the database and attempt to remove the pulled Docker images. + +``` +npm run env:reset +``` + +### Apple Silicone machines and old MySQL versions + +The MySQL Docker images do not support Apple Silicone processors (M1, M2, etc.) for MySQL versions 5.7 and earlier. + +When using MySQL <= 5.7 on an Apple Silicone machine, you must create a `docker-compose.override.yml` file with the following contents: + +``` +services: + + mysql: + platform: linux/amd64 +``` + +Additionally, the "Use Rosetta for x86/AMD64 emulation on Apple Silicon" setting in Docker needs to be disabled for this workaround. + ## Credentials These are the default environment credentials: diff --git a/docker-compose.yml b/docker-compose.yml index 58f4e08d91..bec05ab2a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -65,7 +65,7 @@ services: # The MySQL container. ## mysql: - image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} + image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} networks: - wpdevnet