From 7bd199a5856b64e814396cf84569fe01b73a9543 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:40:31 -0600 Subject: [PATCH 1/4] Switch from MailDev to Mailpit --- tools/docker/README.md | 10 +++++----- tools/docker/config/ssmtp.conf | 2 +- tools/docker/jetpack-docker-config-default.yml | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 5a69492962891..775e4a66d456e 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -7,7 +7,7 @@ Unified environment for developing Jetpack using Docker containers providing fol * All monorepo plugins will be available as plugins within the Docker WP instance. * Xdebug setup. * WP-CLI installed. -* MailDev to catch all the emails leaving WordPress so that you can observe them from browser. +* Mailpit to catch all the emails leaving WordPress so that you can observe them from browser * phpMyAdmin to aid in viewing the database. * Handy shorthand commands like `jetpack docker up` and `jetpack docker phpunit` to simplify the usage. @@ -67,8 +67,8 @@ You can control some of the behavior of Jetpack's Docker configuration with envi You can set the following variables on a per-command basis (`PORT_WORDPRESS=8000 jetpack docker up`) or, preferably, in the `tools/docker/.env` file you set up earlier. * `PORT_WORDPRESS`: (default=`80`) The port on your host machine connected to the WordPress container's HTTP server. -* `PORT_MAILDEV`: (default=`1080`) The port on your host machine connected to the MailDev container's MailDev HTTP server. -* `PORT_SMTP`: (default=`25`) The port on your host machine connected to the MailDev container's SMTP server. +* `PORT_INBOX`: (default=`1080`) The port on your host machine connected to the Mailpit container's web interface. +* `PORT_SMTP`: (default=`25`) The port on your host machine connected to the Mailpit container's SMTP server. * `PORT_SFTP`: (default=`1022`) The port on your host machine connected to the SFTP container's SFTP server. ### Container Environments @@ -122,7 +122,7 @@ jetpack docker uninstall jetpack docker up ``` -Start the containers (WordPress, MySQL and MailDev) defined in `docker-compose.yml`. +Start the containers (WordPress, MySQL and Mailpit) defined in `docker-compose.yml`. This command will rebuild the WordPress container if you made any changes to `docker-compose.yml`. @@ -426,7 +426,7 @@ We recommend to regularly review the log to make sure performance issues don't g ### Debugging emails -Emails don’t leave your WordPress and are caught by [MailDev](http://danfarrelly.nyc/MailDev/) SMTP server container instead. +Emails don’t leave your WordPress and are caught by the [Mailpit](https://mailpit.axllent.org/) SMTP server container instead. To debug emails via web-interface, open [http://localhost:1080](http://localhost:1080) diff --git a/tools/docker/config/ssmtp.conf b/tools/docker/config/ssmtp.conf index 51c12c1236d88..416df685adada 100644 --- a/tools/docker/config/ssmtp.conf +++ b/tools/docker/config/ssmtp.conf @@ -6,7 +6,7 @@ root=postmaster # The place where the mail goes. -mailhub=maildev:25 +mailhub=mailpit:1025 #UseSTARTTLS=NO #AuthUser= #AuthPass= diff --git a/tools/docker/jetpack-docker-config-default.yml b/tools/docker/jetpack-docker-config-default.yml index 7c82511b69db5..0ef288202124b 100644 --- a/tools/docker/jetpack-docker-config-default.yml +++ b/tools/docker/jetpack-docker-config-default.yml @@ -28,16 +28,16 @@ dev: MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD:-wordpress}' ## SMTP Server + Web Interface for viewing and testing emails during development. - ## http://maildev.github.io/maildev/ - maildev: - image: maildev/maildev + ## https://mailpit.axllent.org/ + mailpit: + image: axllent/mailpit + container_name: mailpit ports: - - '${PORT_MAILDEV:-1080}:80' - - '${PORT_SMTP:-25}:25' + - '${PORT_INBOX:-1080}:8025' + - '${PORT_SMTP:-25}:1025' environment: - # It runs in its own container, it may as well use the standard ports instead of 1080 and 1025 so we don't have to reconfigure everything trying to send mail to it. - MAILDEV_WEB_PORT: 80 - MAILDEV_SMTP_PORT: 25 + MP_SMTP_AUTH_ACCEPT_ANY: 1 + MP_SMTP_AUTH_ALLOW_INSECURE: 1 ## SFTP server running at localhost:1022 sftp: From 3db0fd45907d3f2d540d53eb17edf380704b6593 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:41:53 -0600 Subject: [PATCH 2/4] Update key-value format in Dockerfile --- tools/docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 3d2e832ae5add..7c4e891eed6fc 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -7,8 +7,8 @@ ARG COMPOSER_VERSION ARG NODE_VERSION ARG PNPM_VERSION -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 # Bypass WP-CLI `--allow-root` check. Reworking the container to not run as root would be a lot of work for basically no benefit. ENV WP_CLI_ALLOW_ROOT=1 From 7955bd4b4ee9d4fd1947e0cd0118d59e4e2b236d Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:08:59 -0600 Subject: [PATCH 3/4] Allow PHPMyAdmin custom port --- tools/docker/jetpack-docker-config-default.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/jetpack-docker-config-default.yml b/tools/docker/jetpack-docker-config-default.yml index 0ef288202124b..8d3727ba4e85d 100644 --- a/tools/docker/jetpack-docker-config-default.yml +++ b/tools/docker/jetpack-docker-config-default.yml @@ -22,7 +22,7 @@ dev: links: - db:mysql ports: - - 8181:80 + - '${PORT_PHPMY:-8181}:80' environment: MYSQL_USERNAME: '${MYSQL_USER:-wordpress}' MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD:-wordpress}' @@ -39,7 +39,7 @@ dev: MP_SMTP_AUTH_ACCEPT_ANY: 1 MP_SMTP_AUTH_ALLOW_INSECURE: 1 - ## SFTP server running at localhost:1022 + ## SFTP server running at localhost:1022 by default sftp: image: jmcombs/sftp:alpine volumes: From 638cc70eb70f911a9f8285f5a93c9c7d967015b6 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:24:43 -0600 Subject: [PATCH 4/4] Add PORT_PHPMY to docs --- tools/docker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/docker/README.md b/tools/docker/README.md index 775e4a66d456e..e160692ea0ffd 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -69,6 +69,7 @@ You can set the following variables on a per-command basis (`PORT_WORDPRESS=8000 * `PORT_WORDPRESS`: (default=`80`) The port on your host machine connected to the WordPress container's HTTP server. * `PORT_INBOX`: (default=`1080`) The port on your host machine connected to the Mailpit container's web interface. * `PORT_SMTP`: (default=`25`) The port on your host machine connected to the Mailpit container's SMTP server. +* `PORT_PHPMY`: (default=`8181`) The port on your host machine connected to the phpMyAdmin container's web interface. * `PORT_SFTP`: (default=`1022`) The port on your host machine connected to the SFTP container's SFTP server. ### Container Environments