-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.mailhog.yml
More file actions
47 lines (45 loc) · 1.79 KB
/
docker-compose.mailhog.yml
File metadata and controls
47 lines (45 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Compose file to start the mailhog container.
#
# Mailhog is used on non-live environments to capture all outgoing
# mail from Drupal (or any PHP scripts). The mailhog interface can
# be accessed from http://localhost:8025.
#
# The logic for whether this file is loaded can be found in the
# `env.sh` script.
#
# Here we also mount php.ini settings into other containers to tell
# PHP to send mail to mailhog. Any extra services which send mail
# should be added below.
services:
mailhog:
image: mailhog/mailhog
ports:
- 8025:8025
# We have mailhog join both the web and db networks so that all
# other containers can communicate with mailhog, regardless of
# which network they're on. We're less concerned about security
# here because mailhog does not run in the LIVE environment.
networks:
- web
- db
restart: on-failure
# This is where we mount the php.ini config inside the other containers. If you
# add any extra services, add each service below, using the name of each service
# and mounting the volumne as shown.
#
# This docker-compose file is loaded after the environment-specific compose files,
# so any services defined in those files can also be referenced here.
#
# In `env.sh` we tell Docker to merge together the main docker-compose.yml, the
# environment specific compose file, and this compose file, so the volume
# defined here for the mailhog-php.ini file will be merged with the other volumes
# defined for each service.
drupal:
volumes:
- ./docker/mailhog-php.ini:/usr/local/etc/php/conf.d/docker-mailhog.ini:ro
drupal-cli:
volumes:
- ./docker/mailhog-php.ini:/usr/local/etc/php/conf.d/docker-mailhog.ini:ro
cron:
volumes:
- ./docker/mailhog-php.ini:/usr/local/etc/php/conf.d/docker-mailhog.ini:ro