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 ...@@ -93,11 +93,11 @@ The following services are available in your browser while the Docker containers
- Dashboard: http://docker.localhost:8080 - Dashboard: http://docker.localhost:8080
- Drupal site: http://[PROJECTNAME].docker.localhost:8000 - Drupal site: http://[PROJECTNAME].docker.localhost:8000
- PhpMyAdmin: http://pma.[PROJECTNAME].docker.localhost:8000 - PhpMyAdmin: http://pma-[PROJECTNAME].docker.localhost:8000
- Mailhog http://mailhog.[PROJECTNAME].docker.localhost:8000 - MailPit http://mailpit-[PROJECTNAME].docker.localhost:8000
- Solr http://solr.[PROJECTNAME].docker.localhost:8000 - Solr http://solr-[PROJECTNAME].docker.localhost:8000
- Node http://front.[PROJECTNAME].docker.localhost:8000 - Node http://front-[PROJECTNAME].docker.localhost:8000
- Varnish http://varnish.[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. 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] ...@@ -116,7 +116,7 @@ docker-compose logs -f [SERVICENAME]
Each service has its own name: Each service has its own name:
- mailhog - mailpit
- mariadb - mariadb
- nginx - nginx
- node - node
...@@ -237,11 +237,24 @@ docker4drupal: ...@@ -237,11 +237,24 @@ docker4drupal:
webserver: webserver:
type: apache type: apache
mailhog: mailhog:
enable: 0
host: 'smtp.freesmtpservers.com' host: 'smtp.freesmtpservers.com'
port: 25 port: 25
username: '' username: ''
password: '' password: ''
mechanism: 'NONE' mechanism: 'NONE'
mailpit:
enable: 1
host: 'smtp.freesmtpservers.com'
port: 25
username: ''
password: ''
auth: 'none'
starttls: ''
allowinsecure: ''
secret: ''
returnpath: ''
recipientallowlist: ''
varnish: varnish:
enable: 0 enable: 0
redis: redis:
......
...@@ -39,6 +39,16 @@ MAILHOG_MECHANISM=NONE ...@@ -39,6 +39,16 @@ MAILHOG_MECHANISM=NONE
MAILHOG_PASSWORD= MAILHOG_PASSWORD=
MAILHOG_PORT=25 MAILHOG_PORT=25
MAILHOG_USERNAME= 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_COVERAGE=0
PHP_DEBUG=0 PHP_DEBUG=0
PHP_VERSION=8.1 PHP_VERSION=8.1
......
...@@ -83,7 +83,7 @@ Based on this ID, ... ...@@ -83,7 +83,7 @@ Based on this ID, ...
- Docker4Drupal creates a number of containers depending on the services you - Docker4Drupal creates a number of containers depending on the services you
require, e.g. require, e.g.
- `project1_apache_1` - `project1_apache_1`
- `project1_mailhog_1` - `project1_mailpit_1`
- `project1_mariadb_1` - `project1_mariadb_1`
- `project1_php_1` - `project1_php_1`
- `project1_pma_1` - `project1_pma_1`
...@@ -119,7 +119,7 @@ the following domain names will be used for the respective services: ...@@ -119,7 +119,7 @@ the following domain names will be used for the respective services:
- `project1.docker.localhost:8000`: The Drupal website. - `project1.docker.localhost:8000`: The Drupal website.
- `pma-project1.docker.localhost:8000`: PhpMyAdmin of the project. - `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. - `bs-project1.docker.localhost:8000`: Browsersync instance when running Gulp.
In other words, the project ID plus some service identifier are used as the 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 ...@@ -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. CLI commands for PHP which is executed inside the PHP container like e.g.
drush - all with the same setup. 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 ## 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 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 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: 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