-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
254 lines (245 loc) · 5.36 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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
version: '3.1'
services:
openldap:
build:
context: ./images/rpi-openldap/
image: bingen/rpi-openldap:latest
deploy:
placement:
constraints:
- node.role == manager
secrets:
- source: ldap_pwd
target: admin_pwd
uid: '999'
mode: 0440
- source: ldap_mail_pwd
target: mail_pwd
uid: '999'
mode: 0440
- source: ldap_nextcloud_pwd
target: nextcloud_pwd
uid: '999'
mode: 0440
- source: ldap_gogs_pwd
target: gogs_pwd
uid: '999'
mode: 0440
# container_name: openldap
tty: true
stdin_open: true
env_file:
- openldap.env
networks:
- default
#ports:
#- "389:389"
#- "639:639"
#- "8080:80"
volumes:
- ${LDAP_DATA_VOLUME_PATH}:/var/lib/ldap
- ${LDAP_CONFIG_VOLUME_PATH}:/etc/ldap/slapd.d
- ${LDAP_CERTS_VOLUME_PATH}:/container/service/slapd/assets/certs/
hostname: openldap.${LDAP_DOMAIN}
db:
build:
context: ./images/rpi-mariadb/
image: bingen/rpi-mariadb:latest
secrets:
- source: db_pwd
target: admin_pwd
mode: 0440
environment:
- MYSQL_ROOT_PWD_FILE=/run/secrets/admin_pwd
#container_name: mariadb
networks:
- default
#ports:
#- "3306:3306"
volumes:
#- ${DB_CONFIG_VOLUME_PATH}:/etc/mysql
- ${DB_DATA_VOLUME_PATH}:/var/lib/mysql
haproxy:
build:
context: ./images/rpi-haproxy/
image: bingen/rpi-haproxy:latest
depends_on:
# For DNS resolution
- nextcloud
- gogs
- pihole
env_file:
- haproxy.env
networks:
- default
ports:
- "80:80"
- "443:443"
volumes:
- ${LETSENCRYPT_VOLUME_PATH}:/etc/letsencrypt
mail:
build:
context: ./images/rpi-email/
image: bingen/rpi-mailserver:latest
depends_on:
- openldap
secrets:
- source: ldap_mail_pwd
target: ldap_pwd
uid: '999'
mode: 0440
hostname: ${MAIL_HOSTNAME}.${MAIL_DOMAIN}
#domainname: ${MAIL_DOMAIN}
env_file:
- mail.env
networks:
- default
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- ${MAIL_DATA_VOLUME_PATH}:${MAIL_DATA_PATH}
#- ${MAIL_STATE_VOLUME_PATH}:${MAIL_STATE_PATH}
cap_add:
- NET_ADMIN
nextcloud:
build:
context: ./images/rpi-nextcloud/
args:
- NEXTCLOUD_VERSION=${NEXTCLOUD_VERSION}
- NEXTCLOUD_DATA_PATH=${NEXTCLOUD_DATA_PATH}
- NEXTCLOUD_BACKUP_PATH=${NEXTCLOUD_BACKUP_PATH}
image: bingen/rpi-nextcloud:latest
deploy:
placement:
constraints:
- node.role == worker
depends_on:
- db
- openldap
#- haproxy
secrets:
- source: nextcloud_admin_pwd
target: admin_pwd
uid: '999'
mode: 0440
- source: ldap_nextcloud_pwd
target: ldap_pwd
uid: '999'
mode: 0440
- source: db_pwd
target: mysql_pwd
mode: 0440
- source: nextcloud_salt
target: salt
uid: '999'
mode: 0440
- source: nextcloud_secret
target: secret
uid: '999'
mode: 0440
env_file:
- nextcloud.env
networks:
- default
ports:
- "8000:80"
- "8443:443"
volumes:
- ${NEXTCLOUD_DATA_VOLUME_PATH}:${NEXTCLOUD_DATA_PATH}
- ${NEXTCLOUD_BACKUP_VOLUME_PATH}:${NEXTCLOUD_BACKUP_PATH}
sftp:
build:
context: ./images/rpi-sftp/
image: bingen/rpi-sftp
ports:
- "1022:22"
volumes:
- ${PAPERLESS_CONSUMPTION_VOLUME_PATH}:${PAPERLESS_CONSUMPTION_PATH}
secrets:
- source: paperless_ftp_pwd
target: ftp_pwd
uid: '999'
mode: 0440
env_file:
- sftp.env
gogs:
build:
context: ./images/rpi-gogs/
image: bingen/rpi-gogs
depends_on:
- db
- openldap
env_file:
- gogs.env
ports:
- "2080:2080"
- "2443:2443"
- "2022:22"
volumes:
- ${GOGS_DATA_VOLUME_PATH}:/data
secrets:
- source: db_pwd
target: mysql_pwd
mode: 0440
- source: ldap_gogs_pwd
target: ldap_pwd
uid: '999'
mode: 0440
- source: gogs_admin_pwd
target: admin_pwd
uid: '999'
mode: 0440
pihole:
image: pihole/pihole:v4.0_armhf
deploy:
placement:
constraints:
- node.role == manager
env_file:
- pihole.env
# cap_add: # for DHCP
# - NET_ADMIN
ports:
- "53:53/tcp"
- "53:53/udp"
# - "67:67/udp" # for DHCP
- "8314:80"
- "3443:443"
volumes:
- ${PIHOLE_CONFIG_VOLUME_PATH}:/etc/pihole/
- ${PIHOLE_DNSMASQ_VOLUME_PATH}:/etc/dnsmasq.d/
restart: always
#wordpress:
#transmission:
#image: lsioarmhf/transmission:15.01.17
secrets:
db_pwd:
external: true
ldap_pwd:
external: true
ldap_mail_pwd:
external: true
ldap_nextcloud_pwd:
external: true
ldap_gogs_pwd:
external: true
nextcloud_admin_pwd:
external: true
nextcloud_salt:
external: true
nextcloud_secret:
external: true
gogs_admin_pwd:
external: true
paperless_webserver_pwd:
external: true
paperless_passphrase:
external: true
paperless_ftp_pwd:
external: true
networks:
default:
driver: overlay