Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit b678eb1

Browse files
BaDosmeker12
andauthored
MCLOUD-6898: Add option to customize port for MailHog (#7860)
* MCLOUD-6898: Add option to customize port for MailHog * MCLOUD-6660: Add option to disable MailHog * Update src/cloud/docker/docker-config.md Co-authored-by: Margaret Eker <[email protected]>
1 parent 3477b59 commit b678eb1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/cloud/docker/docker-config.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,20 @@ The default {{ site.data.var.mcd-prod }} configuration includes the [MailHog] se
107107

108108
When the MailHog service is installed, go to the following URL to open the service and view outgoing emails: `http://magento2.docker:8025`
109109

110+
By default, MailHog listens on port 1025 for SMTP and port 8025 for the frontend dashboard and API. You can change the default ports using the `--mailhog-http-port` and `--mailhog-smtp-port` options.
111+
112+
```bash
113+
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026
114+
```
115+
116+
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8026`, and use port 1026 for SMTP communication.
117+
118+
If you do not need the [MailHog] service, use the `--no-mailhog` option to generate the Docker compose configuration:
119+
120+
```bash
121+
./vendor/bin/ece-docker build:compose --no-mailhog
122+
```
123+
110124
[php]: https://www.php.net/manual/en/install.php
111125
[Composer]: https://getcomposer.org
112126
[Docker]: https://www.docker.com/get-started

src/cloud/docker/docker-quick-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ docker-compose -f docker-compose.yml -f docker-compose-custom.yml [-f more-custo
5151
| [Mode][] | `--mode`, `-m` | production, developer
5252
| [File synchronization engine][] | `--sync-engine` | native (default), docker-sync, mutagen
5353
| Specify a custom URL for Magento | `--host`<br>`--port`
54+
| Specify custom HTTP and SMTP ports for MailHog | `--mailhog-http-port`<br>`--mailhog-smtp-port`
5455

5556
{:.bs-callout-info}
5657
See [Service versions] for a list of service configuration options you can add to the `ece-docker build:compose` command to customize the Cloud Docker environment configuration.

0 commit comments

Comments
 (0)