-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
171 lines (159 loc) · 4.4 KB
/
docker-compose.yml
File metadata and controls
171 lines (159 loc) · 4.4 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
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
version: '3.8'
services:
fail2ban-service:
build: .
container_name: fail2ban-service
ports:
- "12345:12345" # SPOA port (HAProxy)
- "9001:9001" # gRPC port (Envoy)
- "8888:8888" # HTTP port (Nginx)
- "514:514/udp" # Syslog port
volumes:
- ./tests-ressources/config.yaml:/app/config.yaml:ro
- ./tests-ressources/logs:/var/log/fail2ban-haproxy
environment:
- TZ=UTC
restart: unless-stopped
networks:
- mail-network
haproxy:
image: haproxy:2.8-alpine
container_name: haproxy-mail
ports:
- "993:993" # IMAPS
- "143:143" # IMAP
- "587:587" # SMTP Submission
- "465:465" # SMTPS
- "80:80" # HTTP (SOGo)
- "443:443" # HTTPS (SOGo)
volumes:
- ./tests-ressources/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- ./tests-ressources/spoe-ip-reputation.conf:/usr/local/etc/haproxy/spoe-ip-reputation.conf:ro
depends_on:
- fail2ban-service
- dovecot
- postfix
- sogo
restart: unless-stopped
networks:
- mail-network
dovecot:
image: dovecot/dovecot:latest
container_name: dovecot-mail
volumes:
- ./tests-ressources/dovecot.conf:/etc/dovecot/dovecot.conf:ro
- ./tests-ressources/dovecot-logs:/var/log/dovecot
- mail-data:/var/mail
ports:
- "10993:993" # Internal IMAPS
- "10143:143" # Internal IMAP
restart: unless-stopped
networks:
- mail-network
logging:
driver: syslog
options:
syslog-address: "udp://fail2ban-service:514"
tag: "dovecot"
postfix:
image: postfix:latest
container_name: postfix-mail
volumes:
- ./tests-ressources/postfix/main.cf:/etc/postfix/main.cf:ro
- ./tests-ressources/postfix/master.cf:/etc/postfix/master.cf:ro
- mail-data:/var/mail
- ./tests-ressources/ssl:/etc/ssl/postfix:ro
ports:
- "10587:587" # Internal SMTP Submission
- "10465:465" # Internal SMTPS
environment:
- POSTFIX_HOSTNAME=mail.example.com
restart: unless-stopped
networks:
- mail-network
logging:
driver: syslog
options:
syslog-address: "udp://fail2ban-service:514"
tag: "postfix"
sogo:
image: sogo/sogo:latest
container_name: sogo-mail
volumes:
- ./tests-ressources/sogo/sogo.conf:/etc/sogo/sogo.conf:ro
- ./tests-ressources/sogo/apache.conf:/etc/apache2/conf-enabled/SOGo.conf:ro
ports:
- "10080:80" # Internal HTTP
- "10443:443" # Internal HTTPS
environment:
- SOGO_POSTGRES_HOST=postgres
- SOGO_POSTGRES_DB=sogo
- SOGO_POSTGRES_USER=sogo
- SOGO_POSTGRES_PASSWORD=sogo_password
depends_on:
- postgres
- postfix
- dovecot
restart: unless-stopped
networks:
- mail-network
logging:
driver: syslog
options:
syslog-address: "udp://fail2ban-service:514"
tag: "sogo"
postgres:
image: postgres:15-alpine
container_name: postgres-sogo
environment:
- POSTGRES_DB=sogo
- POSTGRES_USER=sogo
- POSTGRES_PASSWORD=sogo_password
volumes:
- postgres-data:/var/lib/postgresql/data
- ./tests-ressources/sogo/sogo-schema.sql:/docker-entrypoint-initdb.d/sogo-schema.sql:ro
restart: unless-stopped
networks:
- mail-network
redis:
image: redis:7-alpine
container_name: redis-cache
restart: unless-stopped
networks:
- mail-network
# Envoy proxy for testing ext_authz integration
envoy:
image: envoyproxy/envoy:v1.28-latest
container_name: envoy-proxy
ports:
- "8080:8080" # Envoy HTTP listener
- "9901:9901" # Envoy admin
volumes:
- ./tests-ressources/envoy-example.yaml:/etc/envoy/envoy.yaml:ro
depends_on:
- fail2ban-service
- sogo
restart: unless-stopped
networks:
- mail-network
command: ["/usr/local/bin/envoy", "-c", "/etc/envoy/envoy.yaml"]
# Nginx proxy for testing auth_request integration
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "8081:80" # Nginx HTTP listener
volumes:
- ./tests-ressources/nginx-example.conf:/etc/nginx/nginx.conf:ro
depends_on:
- fail2ban-service
- sogo
restart: unless-stopped
networks:
- mail-network
volumes:
mail-data:
postgres-data:
networks:
mail-network:
driver: bridge