File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
cloud_base_developer_manual Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1212use Magento \CloudDocker \Config \Config ;
1313use Magento \CloudDocker \Config \Environment \Converter ;
1414use Magento \CloudDocker \Filesystem \FileList ;
15+ use Magento \CloudDocker \Service \ServiceInterface ;
1516
1617/**
1718 * Developer compose configuration.
@@ -149,11 +150,18 @@ public function build(Config $config): Manager
149150 $ dbVolumes
150151 )
151152 ]);
153+
154+ $ variables = [
155+ 'MAGENTO_RUN_MODE ' => 'developer ' ,
156+ 'PHP_EXTENSIONS ' => implode (' ' , $ this ->extensionResolver ->get ($ config ))
157+ ];
158+
159+ if ($ config ->hasServiceEnabled (ServiceInterface::SERVICE_MAILHOG )) {
160+ $ variables ['SENDMAIL_PATH ' ] = '/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025 ' ;
161+ }
162+
152163 $ manager ->updateService (self ::SERVICE_GENERIC , [
153- 'environment ' => $ this ->converter ->convert (array_merge (
154- ['MAGENTO_RUN_MODE ' => 'developer ' ],
155- ['PHP_EXTENSIONS ' => implode (' ' , $ this ->extensionResolver ->get ($ config ))]
156- ))
164+ 'environment ' => $ this ->converter ->convert ($ variables )
157165 ]);
158166
159167 return $ manager ;
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ services:
147147 environment :
148148 - MAGENTO_RUN_MODE=developer
149149 - ' PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis'
150+ - ' SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025'
150151 build :
151152 hostname : build.magento2.docker
152153 image : ' magento/magento-cloud-docker-php:7.3-cli-1.2.0'
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ services:
127127 environment :
128128 - MAGENTO_RUN_MODE=developer
129129 - ' PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis'
130+ - ' SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025'
130131 build :
131132 hostname : build.magento2.docker
132133 image : ' magento/magento-cloud-docker-php:7.3-cli-1.2.0'
You can’t perform that action at this time.
0 commit comments