File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ LOCAL_PHP_XDEBUG_MODE=develop,debug
3636# Whether or not to enable Memcached.
3737LOCAL_PHP_MEMCACHED = false
3838
39+ # Whether or not to enable MailHog.
40+ LOCAL_MAILHOG = true
41+
3942# #
4043# The database software to use.
4144#
Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ services:
122122 mysql :
123123 condition : service_healthy
124124
125+ # #
126+ # The MailHog container.
127+ # #
128+ mailhog :
129+ container_name : mailhog
130+ image : mailhog/mailhog
131+ logging :
132+ driver : ' none'
133+ ports :
134+ - 1025:1025 # smtp server
135+ - 8025:8025 # web ui
136+ networks :
137+ - wpdevnet
138+
125139 # #
126140 # The Memcached container.
127141 # #
Original file line number Diff line number Diff line change 2828}
2929
3030// Start the local-env containers.
31- const containers = ( process . env . LOCAL_PHP_MEMCACHED === 'true' )
32- ? 'wordpress-develop memcached'
33- : 'wordpress-develop' ;
31+ let containers = 'wordpress-develop' ;
32+
33+ if ( process . env . LOCAL_PHP_MEMCACHED === 'true' ) {
34+ containers += ' memcached' ;
35+ }
36+
37+ if ( process . env . LOCAL_MAILHOG === 'true' ) {
38+ containers += ' mailhog' ;
39+ }
40+
3441execSync ( `docker compose ${ composeFiles } up --quiet-pull -d ${ containers } ` , { stdio : 'inherit' } ) ;
3542
3643// If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
You can’t perform that action at this time.
0 commit comments