-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdocker-compose.services.yml
More file actions
executable file
·123 lines (117 loc) · 2.88 KB
/
Copy pathdocker-compose.services.yml
File metadata and controls
executable file
·123 lines (117 loc) · 2.88 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.8'
# Additional services: Mail, DNS, etc.
services:
postfix:
image: boky/postfix:latest
restart: always
volumes:
- postfix-data:/var/spool/postfix
- postfix-config:/etc/postfix
environment:
- HOSTNAME=${MAIL_HOSTNAME:-mail.example.com}
- ALLOWED_SENDER_DOMAINS=${ALLOWED_SENDER_DOMAINS:-example.com}
- RELAYHOST=${RELAYHOST:-}
ports:
- "25:25"
- "587:587"
networks:
- proxy-network
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "25"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
dovecot:
image: dovecot/dovecot:latest
restart: always
volumes:
- dovecot-data:/var/mail
- dovecot-config:/etc/dovecot
ports:
- "110:110"
- "143:143"
- "993:993"
- "995:995"
networks:
- proxy-network
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "143"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
bind9:
image: internetsystemsconsortium/bind9:9.18
restart: always
ports:
- "53:53/udp"
- "53:53/tcp"
- "953:953/tcp" # rndc control port
volumes:
- bind-config:/etc/bind
- bind-cache:/var/cache/bind
- bind-records:/var/lib/bind
environment:
- BIND9_USER=bind
- TZ=${TZ:-UTC}
networks:
- proxy-network
healthcheck:
test: ["CMD", "host", "-t", "A", "localhost", "127.0.0.1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Secondary BIND9 nameserver – receives zone transfers (AXFR) from the primary.
# Exposed on port 5353 (host) → 53 (container) so both instances can run on the
# same host without conflicting. Configure your registrar / glue records to point
# ns2 to this host on the standard port 53 when deploying on separate machines.
bind9-secondary:
image: internetsystemsconsortium/bind9:9.18
restart: always
ports:
- "5353:53/udp"
- "5353:53/tcp"
volumes:
- bind-secondary-config:/etc/bind
- bind-secondary-cache:/var/cache/bind
- bind-secondary-records:/var/lib/bind
environment:
- BIND9_USER=bind
- TZ=${TZ:-UTC}
networks:
- proxy-network
depends_on:
bind9:
condition: service_healthy
healthcheck:
test: ["CMD", "host", "-t", "A", "localhost", "127.0.0.1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
postfix-data:
driver: local
postfix-config:
driver: local
dovecot-data:
driver: local
dovecot-config:
driver: local
bind-config:
driver: local
bind-cache:
driver: local
bind-records:
driver: local
bind-secondary-config:
driver: local
bind-secondary-cache:
driver: local
bind-secondary-records:
driver: local
networks:
proxy-network:
external: true