Skip to content

Commit 3b815c2

Browse files
committed
Build/Test Tools: Introduce LOCAL_DB_PORTS environment variable.
This change introduces a `LOCAL_DB_PORTS` environment variable to the `wordpress-develop` Docker environment. This allows users to establish a persistent port mapping for the MySQL database, making it easier to connect to with development tools like PhpStorm. Otherwise, the default database port is ephemeral. For example, setting `LOCAL_DB_PORTS="33060:3306"` in the `.env` file will make the MySQL container consistently accessible on port `33060`. Developed in WordPress#9968. Props westonruter, mindctrl. See #48281. Fixes #64014. git-svn-id: https://develop.svn.wordpress.org/trunk@60926 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 217d39a commit 3b815c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ services:
7070
- wpdevnet
7171

7272
ports:
73-
- "3306"
73+
- "${LOCAL_DB_PORTS-3306}"
7474

7575
environment:
7676
MYSQL_ROOT_PASSWORD: password

0 commit comments

Comments
 (0)