uselagoon / lagoon-images

This repository builds the images used in Lagoon and local development environments
Apache License 2.0
27 stars 33 forks source link

Pygmy Mailhog is not available to PHP containers on mac #1072

Open steveworley opened 3 months ago

steveworley commented 3 months ago

The GovCMS team made change to the scaffolded docker stack to attach the PHP container to the amazeeio network that Pygmy creates, this was done to resolve issues for some users where they could not test mail configuration from Drupal.

It appears on mac (or potentially some other docker configurations) that mailhog is listening on host.docker.internal instead of the internal IP (172.17.0.1 1025).

https://github.com/govCMS/scaffold/issues/94

tobybellwood commented 3 months ago

On mac, you can also add an environment variable to the php&cli containers that will auto-configure whilst we wait for #1073 to come in. SSMTP_MAILHUB: host.docker.internal:1025

The extra_hosts method will be useful in linux later as an alternative to the 172.17.0.1 default too.

AlexSkrypnyk commented 2 months ago

I've been using the SSMTP_MAILHUB: host.docker.internal:1025 override in my docker-compose.yml since April 2023 (more than a year) and it works really well.