-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose-gitlab.yml
241 lines (230 loc) · 5.77 KB
/
compose-gitlab.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
networks:
maild:
# You nedd to create it by hand on the target docker host
external: true
volumes:
vmail: # mail storage
spool: # temp mail storage
clamav: # AV storage
amavis: # filtering storage
spamassassin: # spam data
db: # database storage
services:
db:
image: ${IMG_DB}:${TAG}
build: ./db/
container_name: maild-db
hostname: db
restart: always
env_file:
- vars/db.env
- vars/mua.env
- .env
volumes:
- db:/var/lib/postgresql/data
networks:
- maild
admin:
image: ${IMG_ADMIN}:${TAG}
build: ./admin/
container_name: maild-admin
hostname: admin
restart: always
# ports:
# - "8080:80"
environment:
POSTFIXADMIN_DB_PASSWORD: ${POSTGRES_PASSWORD}
env_file:
- vars/db.env
- vars/admin.env
- .env
depends_on:
- db
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
labels:
# main traefik data
- "traefik.enable=true"
- "traefik.http.routers.mailadmin.rule=Host(`mailadmin.maild.cu`)"
- "traefik.http.routers.mailadmin.entrypoints=websecure"
# custom service (non default port)
- "traefik.http.routers.mailadmin.service=mailadmin_custom_port"
- "traefik.http.services.mailadmin_custom_port.loadbalancer.server.port=80"
# auth and access control, you need to create the chain before activate this middleware
#- "traefik.http.routers.mailadmin.middlewares=chain-no-auth-public@file"
mua:
image: ${IMG_MUA}:${TAG}
build: ./mua/
container_name: maild-mua
hostname: mua
restart: always
# ports:
# - "80:80"
env_file:
- vars/db.env
- vars/mua.env
- .env
depends_on:
- mda
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
labels:
# main traefik data
- "traefik.enable=true"
- "traefik.http.routers.webmail.rule=Host(`webmails.chagod.software`)"
- "traefik.http.routers.webmail.entrypoints=websecure"
# custom service (non default port)
- "traefik.http.routers.webmail.service=webmail_custom_port"
- "traefik.http.services.webmail_custom_port.loadbalancer.server.port=80"
# auth and access control
- "traefik.http.routers.webmail.middlewares=chain-no-auth@file"
mda:
image: ${IMG_MDA}:${TAG}
build: ./mda/
domainname: ${DEFAULT_DOMAIN}
container_name: maild-mda
hostname: mda
restart: always
env_file:
- vars/db.env
- vars/mda.env
- vars/ssl.env
- .env
ports:
# - "110:110"
# - "143:143"
- "993:993"
- "995:995"
# - "4190"
# - "12345"
depends_on:
- db
volumes:
- vmail:/home/vmail
- /certs:/certs
- spool:/var/spool/
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
mta:
image: ${IMG_MTA}:${TAG}
build: ./mta/
container_name: maild-mta
domainname: ${DEFAULT_DOMAIN}
hostname: mta
restart: always
environment:
MAILADMIN: ${MAIL_ADMIN_USER}@${DEFAULT_DOMAIN}
DEBUG: 'true'
env_file:
- vars/mta.env
- vars/ssl.env
- vars/db.env
- .env
ports:
- "25:25"
- "465:465"
- "587:587"
volumes:
- vmail:/home/vmail
- /certs:/certs
- spool:/var/spool/
depends_on:
- db
- mda
- amavis
- clamav
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
clamav:
image: ${IMG_CLAMAV}:${TAG}
build: ./clamav/
domainname: ${DEFAULT_DOMAIN}
container_name: maild-clamav
hostname: clamav
restart: always
# healthcheck: # buiilt in the image
# test: [ "CMD", "./check.sh" ]
# interval: 60s
# retries: 3
# start_period: 120s
env_file:
- vars/clamav.env
# ports:
# - "3310"
volumes:
- clamav:/var/lib/clamav
- amavis:/var/lib/amavis
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
amavis:
image: ${IMG_AMAVIS}:${TAG}
build: ./amavis/
domainname: ${DEFAULT_DOMAIN}
container_name: maild-amavis
hostname: amavis
restart: always
# healthcheck: # buiilt in the image
# test: ["CMD", "/check.sh"]
# interval: 60s
# retries: 3
# start_period: 120s
env_file:
- vars/amavis.env
- vars/db.env
- .env
# ports:
# - "10024:10024"
volumes:
- amavis:/var/lib/amavis
- spamassassin:/var/lib/spamassassin
- spool:/var/spool/
depends_on:
- db
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"
cron:
image: ${IMG_CRON}:${TAG}
build: ./cron/
domainname: ${DEFAULT_DOMAIN}
container_name: maild-cron
hostname: cron
restart: always
env_file:
- vars/db.env
- vars/amavis.env
- .env
volumes:
- /var/log:/var/log
- vmail:/home/vmail
depends_on:
- db
networks:
- maild
logging: # See https://docs.docker.com/config/containers/logging/syslog/
driver: syslog
options:
syslog-address: "unixgram:///dev/log"