This repository was archived by the owner on Feb 17, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (61 loc) · 1.85 KB
/
docker-compose.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
networks:
discourse:
external: true
services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:11.3.1@sha256:83fc46f7fff63a9c40d181050dcdbb823012a55ffe7273a1c5e941e477bb5511
container_name: mailserver
# If the FQDN for your mail-server is only two labels (eg: example.com),
# you can assign this entirely to `hostname` and remove `domainname`.
hostname: mail
env_file: mailserver.env
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
# - "143:143" # IMAP4 (explicit TLS => STARTTLS)
# - "465:465" # ESMTP (implicit TLS)
- "587:587" # ESMTP (explicit TLS => STARTTLS)
# - "993:993" # IMAP4 (implicit TLS)
- "110:110" # POP3
- "995:995" # POP3 (with TLS)
volumes:
- mail-data:/var/mail
- mail-state:/var/mail-state
- mail-logs:/var/log/mail
- config:/tmp/docker-mailserver
- /etc/localtime:/etc/localtime:ro
- caddy_data:/caddy-data:ro
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0
networks:
discourse:
deploy:
# swarm zero-down time deployment
update_config:
delay: 5s
order: start-first
monitor: 4s
failure_action: rollback
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
volumes:
mail-data:
mail-state:
mail-logs:
config:
caddy_data:
external: true