Skip to content

Commit f6f6bc6

Browse files
committed
MCLOUD-6898: Add option to customize port for MailHog
1 parent 6509699 commit f6f6bc6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Compose/ProductionBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ public function build(Config $config): Manager
405405
$this->serviceFactory->getDefaultVersion(ServiceInterface::SERVICE_MAILHOG),
406406
[
407407
'ports' => [
408-
($config->getMailHogSmtpPort() ?: '1025').':1025',
409-
($config->getMailHogHttpPort() ?: '8025').':8025',
408+
$config->getMailHogSmtpPort() . ':1025',
409+
$config->getMailHogHttpPort() . ':8025',
410410
]
411411
]
412412
),

src/Config/Source/BaseSource.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class BaseSource implements SourceInterface
2727
public const DEFAULT_HOST = 'magento2.docker';
2828
public const DEFAULT_PORT = '80';
2929
public const DEFAULT_TLS_PORT = '443';
30+
public const DEFAULT_MAILHOG_SMTP_PORT = '1025';
31+
public const DEFAULT_MAILHOG_HTTP_PORT = '8025';
32+
3033

3134
/**
3235
* @var EnvReader
@@ -73,7 +76,9 @@ public function read(): Repository
7376
self::SYSTEM_HOST => self::DEFAULT_HOST,
7477
self::SYSTEM_TLS_PORT => self::DEFAULT_TLS_PORT,
7578
self::INSTALLATION_TYPE => self::INSTALLATION_TYPE_COMPOSER,
76-
self::MAGENTO_VERSION => $this->getMagentoVersion()
79+
self::MAGENTO_VERSION => $this->getMagentoVersion(),
80+
self::SYSTEM_MAILHOG_SMTP_PORT => self::DEFAULT_MAILHOG_SMTP_PORT,
81+
self::SYSTEM_MAILHOG_HTTP_PORT => self::DEFAULT_MAILHOG_HTTP_PORT
7782
]);
7883

7984
try {

0 commit comments

Comments
 (0)