forked from truespar/sentio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
63 lines (59 loc) · 2.57 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
63 lines (59 loc) · 2.57 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# ─────────────────────────────────────────────────────────────────────────────
# Sentio SMTP - end-to-end test overlay
#
# docker compose -f docker-compose.yml -f docker-compose.test.yml up -d
# scripts/e2e/run-e2e.sh
#
# Adds two sinks and points outbound delivery at one of them:
#
# mailpit - catch-all SMTP sink on :1025 with a REST API + web UI on
# :8025 (published). Everything Sentio delivers lands here.
# webhook-sink - echoes any HTTP request back and logs the body, so inbound
# route deliveries can be asserted from `docker compose logs`.
#
# SAFETY - why no mail can escape to the internet:
#
# 1. delivery.relay.enabled=true makes DeliveryEngine skip MX resolution
# entirely and hand every outbound message to relay.host
# (crates/sentio-smtp-client/src/delivery.rs). There is no code path left
# that dials a public MX.
# 2. The fixtures use *.test domains. RFC 6761 reserves .test as never
# globally resolvable, so even if the relay were misconfigured the lookup
# fails rather than reaching a real server.
#
# Both belts are deliberate: either one alone would be sufficient.
# ─────────────────────────────────────────────────────────────────────────────
services:
mailpit:
image: axllent/mailpit:latest
restart: unless-stopped
environment:
MP_SMTP_BIND_ADDR: "0.0.0.0:1025"
MP_UI_BIND_ADDR: "0.0.0.0:8025"
MP_MAX_MESSAGES: "500"
# Accept anything; this is a sink, not a real MTA.
MP_SMTP_AUTH_ACCEPT_ANY: "true"
MP_SMTP_AUTH_ALLOW_INSECURE: "true"
ports:
- "8025:8025" # web UI + REST API, browsable from the host
healthcheck:
test: ["CMD", "/mailpit", "readyz"]
interval: 5s
timeout: 3s
retries: 20
networks: [sentio_net]
webhook-sink:
image: mendhak/http-https-echo:37
restart: unless-stopped
environment:
HTTP_PORT: "8080"
networks: [sentio_net]
# Point outbound delivery at mailpit instead of real MX hosts.
sentio:
environment:
SENTIO__DELIVERY__RELAY__ENABLED: "true"
SENTIO__DELIVERY__RELAY__HOST: "mailpit"
SENTIO__DELIVERY__RELAY__PORT: "1025"
SENTIO__DELIVERY__RELAY__TLS_MODE: "none"
depends_on:
mailpit: { condition: service_healthy }