Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -67,8 +67,9 @@ 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_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
Expand Down Expand Up @@ -122,7 +123,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`.

Expand Down Expand Up @@ -426,7 +427,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)

Expand Down
2 changes: 1 addition & 1 deletion tools/docker/config/ssmtp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
root=postmaster

# The place where the mail goes.
mailhub=maildev:25
mailhub=mailpit:1025
#UseSTARTTLS=NO
#AuthUser=
#AuthPass=
Expand Down
20 changes: 10 additions & 10 deletions tools/docker/jetpack-docker-config-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ dev:
links:
- db:mysql
ports:
- 8181:80
- '${PORT_PHPMY:-8181}:80'
environment:
MYSQL_USERNAME: '${MYSQL_USER:-wordpress}'
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 server running at localhost:1022 by default
sftp:
image: jmcombs/sftp:alpine
volumes:
Expand Down
Loading