Skip to content

Commit 87491e3

Browse files
committed
MCLOUD-6898: Add option to customize port for MailHog
1 parent ffb68b4 commit 87491e3

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

images/php/7.2-cli/docker-entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ touch $CRON_LOG
4040

4141
PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

43-
if [ -z "${MAILHOG_SMTP_PORT}" ]; then
44-
MAILHOG_SMTP_PORT=1025
45-
fi
46-
4743
# Configure Sendmail if required
4844
if [ "$ENABLE_SENDMAIL" == "true" ]; then
49-
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:${MAILHOG_SMTP_PORT}\"/" ${PHP_EXT_DIR}/zz-mail.ini
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
5046
else
5147
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
5248
fi

images/php/7.3-cli/docker-entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ touch $CRON_LOG
4040

4141
PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

43-
if [ -z "${MAILHOG_SMTP_PORT}" ]; then
44-
MAILHOG_SMTP_PORT=1025
45-
fi
46-
4743
# Configure Sendmail if required
4844
if [ "$ENABLE_SENDMAIL" == "true" ]; then
49-
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:${MAILHOG_SMTP_PORT}\"/" ${PHP_EXT_DIR}/zz-mail.ini
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
5046
else
5147
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
5248
fi

images/php/7.4-cli/docker-entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ touch $CRON_LOG
4040

4141
PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

43-
if [ -z "${MAILHOG_SMTP_PORT}" ]; then
44-
MAILHOG_SMTP_PORT=1025
45-
fi
46-
4743
# Configure Sendmail if required
4844
if [ "$ENABLE_SENDMAIL" == "true" ]; then
49-
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:${MAILHOG_SMTP_PORT}\"/" ${PHP_EXT_DIR}/zz-mail.ini
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
5046
else
5147
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
5248
fi

images/php/cli/docker-entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ touch $CRON_LOG
4040

4141
PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

43-
if [ -z "${MAILHOG_SMTP_PORT}" ]; then
44-
MAILHOG_SMTP_PORT=1025
45-
fi
46-
4743
# Configure Sendmail if required
4844
if [ "$ENABLE_SENDMAIL" == "true" ]; then
49-
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:${MAILHOG_SMTP_PORT}\"/" ${PHP_EXT_DIR}/zz-mail.ini
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
5046
else
5147
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
5248
fi

0 commit comments

Comments
 (0)