forked from hardware/mailserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.sample.yml
114 lines (109 loc) · 3.93 KB
/
docker-compose.sample.yml
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
version: '2'
services:
mailserver:
image: hardware/mailserver
container_name: mailserver
domainname: domain.tld # Mail server FQDN & reverse = mail.domain.tld.
hostname: mail
# restart: always
# extra_hosts: - Required for external database (on other server or for local database on host)
# - "mariadb:xx.xx.xx.xx" - Replace with IP address of MariaDB server
ports:
- "25:25" # SMTP - Required
# - "110:110" # POP3 STARTTLS - Optional - For webmails/desktop clients
- "143:143" # IMAP STARTTLS - Optional - For webmails/desktop clients
# - "465:465" # SMTPS SSL/TLS - Optional - Enabled for compatibility reason, otherwise disabled
- "587:587" # Submission STARTTLS - Optional - For webmails/desktop clients
- "993:993" # IMAPS SSL/TLS - Optional - For webmails/desktop clients
# - "995:995" # POP3S SSL/TLS - Optional - For webmails/desktop clients
- "4190:4190" # SIEVE STARTTLS - Optional - Recommended for mail filtering
environment:
- DBPASS=xxxxxxx
# - ENABLE_POP3=true # Enable POP3 protocol
# - GREYLISTING=gross # Enable gross greylisting policy server
# - DISABLE_CLAMAV=true # Disable virus scanning
# - DISABLE_SPAMASSASSIN=true # Disable SPAM checking
# - DISABLE_SIEVE=true # Disable ManageSieve protocol
volumes:
- /mnt/docker/mail:/var/mail
- /mnt/docker/mail/opendkim:/etc/opendkim/keys
# - /mnt/docker/nginx/certs:/etc/letsencrypt
depends_on:
- mariadb
# Administration interface
# https://github.com/hardware/postfixadmin
# http://postfixadmin.sourceforge.net/
# Configuration : https://github.com/hardware/mailserver/wiki/Postfixadmin-initial-configuration
postfixadmin:
image: hardware/postfixadmin
container_name: postfixadmin
domainname: domain.tld
hostname: mail
# restart: always
environment:
- DBPASS=xxxxxxx
depends_on:
- mailserver
- mariadb
# Webmail (Optional)
# https://github.com/hardware/rainloop
# https://www.rainloop.net/
# Configuration : https://github.com/hardware/mailserver/wiki/Rainloop-initial-configuration
rainloop:
image: hardware/rainloop
container_name: rainloop
# restart: always
volumes:
- /mnt/docker/rainloop:/rainloop/data
depends_on:
- mailserver
- mariadb
# Authoritative DNS server (Optional)
# https://github.com/hardware/nsd-dnssec
# https://www.nlnetlabs.nl/projects/nsd/
# Configuration : https://github.com/hardware/mailserver/wiki/NSD-initial-configuration
nsd:
image: hardware/nsd-dnssec
container_name: nsd
# restart: always
ports:
- "53:53"
- "53:53/udp"
volumes:
- /mnt/docker/nsd/conf:/etc/nsd
- /mnt/docker/nsd/zones:/zones
- /mnt/docker/nsd/db:/var/db/nsd
# Web server
# https://github.com/Wonderfall/dockerfiles/tree/master/nginx
# https://nginx.org/
# Configuration : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
nginx:
image: wonderfall/boring-nginx
container_name: nginx
# restart: always
ports:
- "80:8000"
- "443:4430"
volumes:
- /mnt/docker/nginx/sites-enabled:/sites-enabled
- /mnt/docker/nginx/conf:/conf.d
- /mnt/docker/nginx/log:/var/log/nginx
- /mnt/docker/nginx/certs:/certs
depends_on:
- postfixadmin
- rainloop
# Database
# https://github.com/docker-library/mariadb
# https://mariadb.org/
mariadb:
image: mariadb:10.1
container_name: mariadb
# restart: always
# Info : These variables are ignored when the volume already exists (databases created before).
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxx
- MYSQL_DATABASE=postfix
- MYSQL_USER=postfix
- MYSQL_PASSWORD=xxxxxxx
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql