Make MailHog port configurable

This commit is contained in:
cytopia 2018-08-12 13:30:05 +02:00
parent ad69497ce4
commit eee6612b0b
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
2 changed files with 22 additions and 6 deletions

View File

@ -5,7 +5,7 @@ services:
hostname: mailhog
image: mailhog/mailhog:latest
ports:
- "${LOCAL_LISTEN_ADDR}8025:8025"
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_CUSTOM_MAILHOG:-8025}:8025"
networks:
app_net:
ipv4_address: 172.16.238.201

View File

@ -3,10 +3,10 @@
.. _custom_container_ingegrate_mailhog:
*****************
Integrate Mailhog
Integrate MailHog
*****************
This section will guide you through getting Mailhog integrated into the Devilbox.
This section will guide you through getting MailHog integrated into the Devilbox.
.. seealso:: |ext_lnk_container_mailhog|
@ -22,7 +22,7 @@ Overview
The Devilbox ships various example configurations to overwrite the default stack. Those files are
located under ``compose/`` in the Devilbox git directory.
In case of Mailhog, the file is ``compose/docker-compose.override.yml-mailhog``. This file
In case of MailHog, the file is ``compose/docker-compose.override.yml-mailhog``. This file
must be copied into the root of the Devilbox git directory.
+-----------------------+-------------------------------------------------+
@ -32,12 +32,14 @@ must be copied into the root of the Devilbox git directory.
+-----------------------+-------------------------------------------------+
| Container IP address | ``172.16.238.201`` |
+-----------------------+-------------------------------------------------+
| Exposed port | ``8025`` |
| Exposed port | ``8025`` (can be changed via ``.env``) |
+-----------------------+-------------------------------------------------+
| Available at | ``http://localhost:8025`` |
+-----------------------+-------------------------------------------------+
| Container name | ``mailhog`` |
+-----------------------+-------------------------------------------------+
| ``.env`` variable | ``HOST_PORT_CUSTOM_MAILHOG`` |
+-----------------------+-------------------------------------------------+
| Further configuration | php.ini settings need to be applied per version |
+-----------------------+-------------------------------------------------+
@ -87,6 +89,20 @@ Add the following content to the newly created ini file:
.. seealso:: :ref:`php_ini`
``.env`` settings
-----------------
By Default MailHog is using the host port ``8025``, this can be adjusted in the ``.env`` file.
Add ``HOST_PORT_CUSTOM_MAILHOG`` to *.env* and customize its value.
.. code-block:: bash
:caption: .env
HOST_PORT_CUSTOM_MAILHOG=8025
.. seealso:: :ref:`env_file`
Start the Devilbox
------------------
@ -105,4 +121,4 @@ Functionality
-------------
* Once the Devilbox is running, visit http://localhost:8025 in your browser.
* Any email send by any of the Devilbox managed projects will then appear in Mailhog
* Any email send by any of the Devilbox managed projects will then appear in MailHog