-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.prod.yml
More file actions
37 lines (36 loc) · 1.81 KB
/
Copy pathcompose.prod.yml
File metadata and controls
37 lines (36 loc) · 1.81 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
# Production-only overrides, combined with the shared compose.yml:
#
# docker compose -f compose.yml -f compose.prod.yml ...
#
# The justfile does this with `env=prod` (e.g. `just run prod`).
services:
# Outgoing mail relay for Nagios notifications. The application hands mail to
# it on port 8025 (set MAILER_DSN=smtp://mailer:8025 in the production app/.env).
#
# Delivery model (configured via the repository-root .env):
# * SMARTHOST set -> relay through that authenticated SMTP provider
# (recommended). Because the spool is persisted on disk,
# a transient provider outage is tolerated: queued mail is
# retried until it gets through, so Nagios notifications
# are never silently dropped.
# * SMARTHOST empty -> deliver directly to the recipients' MX servers.
mailer:
image: docker.io/devture/exim-relay:4.98-r0-4
restart: unless-stopped
# Same uid:gid as the other containers (the `exim` user inside the image),
# so it can own its persistent spool directory below.
user: 100:101
environment:
HOSTNAME: ${HOSTNAME}
DISABLE_SENDER_VERIFICATION: 1
# Upstream smarthost as `host::port` (e.g. smtp.example.com::587) plus the
# authentication credentials. The relay uses opportunistic STARTTLS, so use a
# STARTTLS port like 587 (implicit TLS on 465 is not supported by this image).
# Leave SMARTHOST empty for direct-to-MX.
SMARTHOST: ${SMARTHOST}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
volumes:
# Persistent spool (store-and-forward queue) so undelivered mail survives
# restarts and is retried. Created/owned by the `_var-exim-spool` just recipe.
- ./var/container-data/exim-spool:/var/spool/exim:rw,cached