This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
187 lines (176 loc) · 3.98 KB
/
docker-compose.yaml
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
services:
#
# Mail Servers
#
# Valid: MTA-STS with Let's Encrypt
postfix-le-mta-sts:
build:
context: postfix
args:
name: a
certdomain: audit.alexsci.com
tlsSecurityLevel: may
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.11
ports:
- "${IP0:?error}:${HOST_MAIL_PORT:?error}:25"
volumes:
- "${CERTS_PATH:?error}/:/etc/letsencrypt/:ro"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
# Invalid: MTA-STS but doesn't use TLS
postfix-no-encrypt:
build:
context: postfix
args:
name: b
tlsSecurityLevel: none
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.12
ports:
- "${IP1:?error}:${HOST_MAIL_PORT:?error}:25"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
# Valid: MTA-STS with Let's Encrypt (IPv6 tester)
postfix-le-mta-sts-ipv6:
build:
context: postfix
args:
name: c
certdomain: audit.alexsci.com
tlsSecurityLevel: may
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.13
ports:
- "${IPV6_0:?error}:${HOST_MAIL_PORT:?error}:25"
volumes:
- "${CERTS_PATH:?error}/:/etc/letsencrypt/:ro"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
# Invalid: MTA-STS with unknown/untrusted CA
postfix-uk-mta-sts:
build:
context: postfix
args:
name: d
certdomain: mail-b.audit.alexsci.com
tlsSecurityLevel: may
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.14
ports:
- "${IPV6_1:?error}:${HOST_MAIL_PORT:?error}:25"
volumes:
- "${INVALID_CERTS_PATH:?error}/:/etc/letsencrypt/:ro"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
# Valid: MTA-STS with Let's Encrypt (IPv6, requires TLS)
postfix-le-mta-sts-required:
build:
context: postfix
args:
name: e
certdomain: audit.alexsci.com
tlsSecurityLevel: encrypt
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.15
ports:
- "${IPV6_2:?error}:${HOST_MAIL_PORT:?error}:25"
volumes:
- "${CERTS_PATH:?error}/:/etc/letsencrypt/:ro"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
# Valid: Legacy / Plaintext only - No MTA-STS
postfix-legacy-no-tls:
build:
context: postfix
args:
name: f
certdomain: audit.alexsci.com
tlsSecurityLevel: none
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.16
ports:
- "${IPV6_3:?error}:${HOST_MAIL_PORT:?error}:25"
environment:
- POSTGRES_PASSWORD
depends_on:
- db
#
# API for web frontend
#
api:
build: api
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.34
depends_on:
- db
environment:
- POSTGRES_PASSWORD
- ADMIN_SECRET
#
# Static hosting for MTA-STS policy files
#
nginx:
build:
context: nginx
args:
certdomain: audit.alexsci.com
restart: unless-stopped
networks:
privatenet:
ipv4_address: 10.11.26.35
ports:
- "${IP0:?error}:${HOST_WEBSECURE_PORT:?error}:443"
volumes:
- "${CERTS_PATH:?error}/:/etc/letsencrypt/:ro"
depends_on:
- api
db:
image: postgres:15.2
restart: unless-stopped
volumes:
- postfix-audit-db:/var/lib/postgresql/data
networks:
privatenet:
ipv4_address: 10.11.26.36
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=audit
- POSTGRES_PASSWORD
networks:
privatenet:
name: postfix-audit-net
external: false
internal: false
ipam:
driver: default
config:
- subnet: 10.11.26.0/24
ip_range: 10.11.26.0/26
gateway: 10.11.26.254
volumes:
postfix-audit-db: