Skip to content
Snippets Groups Projects
Commit de3f2e6c authored by jurgenhaas's avatar jurgenhaas
Browse files

composer/plugin/docker4drupal#64 Add support for mailpit

parent 1b2aa876
No related branches found
No related tags found
1 merge request!3develop
......@@ -93,11 +93,11 @@ The following services are available in your browser while the Docker containers
- Dashboard: http://docker.localhost:8080
- Drupal site: http://[PROJECTNAME].docker.localhost:8000
- PhpMyAdmin: http://pma.[PROJECTNAME].docker.localhost:8000
- Mailhog http://mailhog.[PROJECTNAME].docker.localhost:8000
- Solr http://solr.[PROJECTNAME].docker.localhost:8000
- Node http://front.[PROJECTNAME].docker.localhost:8000
- Varnish http://varnish.[PROJECTNAME].docker.localhost:8000
- PhpMyAdmin: http://pma-[PROJECTNAME].docker.localhost:8000
- MailPit http://mailpit-[PROJECTNAME].docker.localhost:8000
- Solr http://solr-[PROJECTNAME].docker.localhost:8000
- Node http://front-[PROJECTNAME].docker.localhost:8000
- Varnish http://varnish-[PROJECTNAME].docker.localhost:8000
Note that Solr, Node and Varnish are not enabled by default. See the [customization](/composer/plugin/d4d#customization) chapter below to learn how you can enable them.
......@@ -116,7 +116,7 @@ docker-compose logs -f [SERVICENAME]
Each service has its own name:
- mailhog
- mailpit
- mariadb
- nginx
- node
......@@ -237,11 +237,24 @@ docker4drupal:
webserver:
type: apache
mailhog:
enable: 0
host: 'smtp.freesmtpservers.com'
port: 25
username: ''
password: ''
mechanism: 'NONE'
mailpit:
enable: 1
host: 'smtp.freesmtpservers.com'
port: 25
username: ''
password: ''
auth: 'none'
starttls: ''
allowinsecure: ''
secret: ''
returnpath: ''
recipientallowlist: ''
varnish:
enable: 0
redis:
......
......@@ -39,6 +39,16 @@ MAILHOG_MECHANISM=NONE
MAILHOG_PASSWORD=
MAILHOG_PORT=25
MAILHOG_USERNAME=
MAILPIT_HOST=smtp.freesmtpservers.com
MAILPIT_PORT=25
MAILPIT_USERNAME=
MAILPIT_PASSWORD=
MAILPIT_STARTTLS=
MAILPIT_ALLOW_INSECURE=
MAILPIT_AUTH=none
MAILPIT_SECRET=
MAILPIT_RETURNPATH=
MAILPIT_RECIPIENT_ALLOW_LIST=
PHP_COVERAGE=0
PHP_DEBUG=0
PHP_VERSION=8.1
......
......@@ -83,7 +83,7 @@ Based on this ID, ...
- Docker4Drupal creates a number of containers depending on the services you
require, e.g.
- `project1_apache_1`
- `project1_mailhog_1`
- `project1_mailpit_1`
- `project1_mariadb_1`
- `project1_php_1`
- `project1_pma_1`
......@@ -119,7 +119,7 @@ the following domain names will be used for the respective services:
- `project1.docker.localhost:8000`: The Drupal website.
- `pma-project1.docker.localhost:8000`: PhpMyAdmin of the project.
- `mailhog-project1.docker.localhost:8000`: The Mailhog service for the project.
- `mailpit-project1.docker.localhost:8000`: The Mailhog service for the project.
- `bs-project1.docker.localhost:8000`: Browsersync instance when running Gulp.
In other words, the project ID plus some service identifier are used as the
......@@ -247,9 +247,31 @@ With this setup, you can debug both web requests coming from the browser and
CLI commands for PHP which is executed inside the PHP container like e.g.
drush - all with the same setup.
## Using MailPit
When using the [Docker4Drupal](../../composer/plugin/d4d/index.md), a MailPit service will be configured automatically by default.
This captures all outgoing email so that you can view those emails in a dashboard from your browser. Should you want
to release an email to see how it looks in you email client, MailPit provides a button to do that. This requires SMTP
server configuration, that you can provide in your local `.env` files like this:
```bash
MAILPIT_HOST=smtp.freesmtpservers.com
MAILPIT_PORT=25
MAILPIT_USERNAME=
MAILPIT_PASSWORD=
MAILPIT_STARTTLS=
MAILPIT_ALLOW_INSECURE=
MAILPIT_AUTH=none
MAILPIT_SECRET=
MAILPIT_RETURNPATH=
MAILPIT_RECIPIENT_ALLOW_LIST=
```
For more details about those parameters, please refer to [SMTP relay configuration](https://mailpit.axllent.org/docs/configuration/smtp-relay/#smtp-relay-configuration).
## Using MailHog
When using the [Docker4Drupal](../../composer/plugin/d4d/index.md), a MailHog service will be configured automatically.
When using the [Docker4Drupal](../../composer/plugin/d4d/index.md), a MailHog service can be configured.
This captures all outgoing email so that you can view those emails in a dashboard from your browser. Should you want
to release an email to see how it looks in you email client, MailHog provides a button to do that. This requires SMTP
server configuration, that you can provide in your local `.env` files like this:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment