forked from hardware/mailserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.sample.yml
83 lines (78 loc) · 2.81 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
version: '2'
services:
mailserver:
image: hardware/mailserver
domainname: domain.tld # Mail server FQDN & reverse = mail.domain.tld.
hostname: mail
# 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
# - ENABLE_POSTGREY=true # Enable 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/mail:/var/mail
- /mnt/docker/mail/opendkim:/etc/opendkim/keys
# - /mnt/docker/nginx/certs:/etc/letsencrypt
depends_on:
- mariadb
# Control panel
postfixadmin:
image: hardware/postfixadmin
container_name: postfixadmin
domainname: domain.tld
hostname: mail
environment:
- DBPASS=xxxxxxx
depends_on:
- mailserver
- mariadb
# Webmail
rainloop:
image: hardware/rainloop
container_name: rainloop
volumes:
- /mnt/docker/rainloop:/rainloop/data
depends_on:
- mailserver
- mariadb
# Web server
# Configuration : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
nginx:
image: wonderfall/boring-nginx
container_name: nginx
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
mariadb:
image: mariadb:10.1
container_name: mariadb
# 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