-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
46 lines (42 loc) · 1.6 KB
/
Copy pathcompose.yaml
File metadata and controls
46 lines (42 loc) · 1.6 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
# MailKite Server — docker compose.
#
# cp .env.example .env # set HMAC_SECRET
# docker compose up -d # backend + UI on :8787
# docker compose --profile edges up # + the Haraka MX edge on :25
#
# The backend (API + web console) is the default service. The SMTP/IMAP edges are
# profile-gated: they need privileged ports (25/587/993), public DNS, PTR records, and
# real TLS material — see docs/self-hosting.md before enabling them.
services:
backend:
build:
context: .
dockerfile: api-local/Dockerfile
ports:
- "8787:8787"
environment:
# Shared edge<->backend secret. Generate one: openssl rand -hex 32
HMAC_SECRET: ${HMAC_SECRET:?set HMAC_SECRET in .env}
volumes:
- mail-data:/data
restart: unless-stopped
# --- SMTP MX edge (inbound) — enable with: --profile edges ----------------------
# Requires: port 25 reachable from the internet, MX + PTR DNS records.
mta:
profiles: [edges]
build: ./mta
ports:
- "25:25"
environment:
MAILKITE_API_URL: http://backend:8787
MAILKITE_INGEST_URL: http://backend:8787/api/ingest
MAILKITE_HMAC_SECRET: ${HMAC_SECRET:?set HMAC_SECRET in .env}
depends_on:
- backend
restart: unless-stopped
# --- IMAP edge -------------------------------------------------------------------
# Not composed yet: imap/ has no Dockerfile and requires real TLS PEMs mounted at
# config/tls/ (IMAPS is implicit TLS — there is no plaintext mode to demo). Run it on
# the host per docs/self-hosting.md, pointing MAILKITE_API_URL at this backend.
volumes:
mail-data: