-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
418 lines (399 loc) · 10 KB
/
docker-compose.yml
File metadata and controls
418 lines (399 loc) · 10 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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
version: "3.9"
name: homecloud
networks:
default:
name: homecloud
external: true
services:
whoami:
container_name: homecloud_whoami
profiles: ["coreservices"]
image: traefik/whoami
restart: unless-stopped
expose:
- 80
deploy:
resources:
limits:
memory: 8M
reservations:
memory: 8M
lb:
container_name: homecloud_lb
profiles: ["coreservices"]
image: axistools/nginx-ldap:alpine
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost/ || exit 1
start_period: 2m
interval: 60s
retries: 5
timeout: 5s
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 32M
depends_on:
- whoami
- authentikapp
- nextcloudweb
mariadb:
container_name: homecloud_mariadb
profiles: ["dbonly", "coreservices"]
image: mariadb:10
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
expose:
- 3306
secrets:
- mariadb_root_password
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mariadb_root_password
MARIADB_AUTO_UPGRADE: "yes"
healthcheck:
test: mariadb-admin ping -h 127.0.0.1 -uroot -p$$(cat $$MYSQL_ROOT_PASSWORD_FILE)
start_period: 30s
interval: 60s
retries: 5
timeout: 10s
postgres:
container_name: homecloud_postgres
profiles: ["dbonly", "coreservices"]
image: postgres:15-alpine
restart: unless-stopped
secrets:
- postgres_psql_password
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_psql_password
expose:
- 5432
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
start_period: 30s
interval: 30s
retries: 5
timeout: 10s
redis:
container_name: homecloud_redis
profiles: ["coreservices", "dbonly"]
image: redis
command: redis-server --save 300 1 --loglevel warning #--requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
restart: unless-stopped
expose:
- 6379
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
start_period: 30s
interval: 30s
retries: 5
timeout: 5s
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
authentikapp:
container_name: homecloud_authentikapp
profiles: ["coreservices"]
image: ghcr.io/goauthentik/server:2023.10
restart: unless-stopped
command: server
expose:
- 9000
- 9443
secrets:
- postgres_authentik_password
- authentik_secret_key
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_REDIS__DB: 1
AUTHENTIK_POSTGRESQL__HOST: postgres
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: file:///run/secrets/postgres_authentik_password
AUTHENTIK_SECRET_KEY: file:///run/secrets/authentik_secret_key
AUTHENTIK_ERROR_REPORTING__ENABLED: false
AUTHENTIK_LOG_LEVEL: error
AUTHENTIK_DEFAULT_USER_CHANGE_USERNAME: false
depends_on:
- postgres
- redis
deploy:
resources:
limits:
memory: 640M
reservations:
memory: 128M
authentikworker:
container_name: homecloud_authentikworker
profiles: ["coreservices"]
image: ghcr.io/goauthentik/server:2023.10
restart: unless-stopped
command: worker
secrets:
- postgres_authentik_password
- authentik_secret_key
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_REDIS__DB: 1
AUTHENTIK_POSTGRESQL__HOST: postgres
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: file:///run/secrets/postgres_authentik_password
AUTHENTIK_SECRET_KEY: file:///run/secrets/authentik_secret_key
AUTHENTIK_ERROR_REPORTING__ENABLED: false
AUTHENTIK_LOG_LEVEL: error
AUTHENTIK_DEFAULT_USER_CHANGE_USERNAME: false
# `user: root` and the docker socket volume are optional.
# See more for the docker socket integration here:
# https://goauthentik.io/docs/outposts/integrations/docker
# Removing `user: root` also prevents the worker from fixing the permissions
# on the mounted folders, so when removing this make sure the folders have the correct UID/GID
# (1000:1000 by default)
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- postgres
- redis
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
nextcloudapp:
container_name: homecloud_nextcloudapp
profiles: ["coreservices"]
image: nextcloud:31-fpm-alpine
restart: unless-stopped
healthcheck:
test: nc -z postgres 5432 || nc -z 127.0.0.1 9000 || exit 1
start_period: 2m
interval: 60s
retries: 5
timeout: 5s
secrets:
- postgres_nextcloud_password
- nextcloud_admin_password
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_nextcloud_password
REDIS_HOST: redis
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD_FILE: /run/secrets/nextcloud_admin_password
PHP_UPLOAD_LIMIT: 10G
depends_on:
- postgres
- redis
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 256M
nextcloudweb:
container_name: homecloud_nextcloudweb
profiles: ["coreservices"]
image: nginx:alpine
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost/ || exit 1
start_period: 1m
interval: 60s
retries: 5
timeout: 5s
depends_on:
- nextcloudapp
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 32M
nextcloudcron:
container_name: homecloud_nextcloudcron
profiles: ["coreservices"]
image: nextcloud:31-fpm-alpine
restart: unless-stopped
entrypoint: /cron.sh
depends_on:
- nextcloudapp
- postgres
- redis
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
talk:
container_name: homecloud_talk
profiles: ["talk"]
image: nextcloud/aio-talk
restart: unless-stopped
ports:
- 3478:3478/tcp
- 3478:3478/udp
environment:
TZ: "Asia/Singapore"
TALK_PORT: 3478
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
code:
container_name: homecloud_code
profiles: ['code']
image: collabora/code
restart: unless-stopped
expose:
- 9980
environment:
TZ: "Asia/Singapore"
dictionaries: en_US
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 256M
imaginary:
container_name: homecloud_imaginary
profiles: ["coreservices"]
image: nextcloud/aio-imaginary:latest
restart: unless-stopped
expose:
- 9000
environment:
TZ: "Asia/Singapore"
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 128M
clamav:
container_name: homecloud_clamav
profiles: ["clamav"]
image: nextcloud/aio-clamav
restart: unless-stopped
expose:
- 3310
environment:
TZ: "Asia/Singapore"
CLAMD_STARTUP_TIMEOUT: 90
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 3G
elasticsearch:
container_name: homecloud_elasticsearch
profiles: ["coreservices"]
image: nextcloud/aio-fulltextsearch
init: false
restart: unless-stopped
expose:
- 9200
secrets:
- elasticsearch_elastic_password
environment:
TZ: "Asia/Singapore"
cluster.name: homecloud
discovery.type: single-node
http.port: 9200
ES_JAVA_OPTS: -Xms1024M -Xmx1024M
logger.org.elasticsearch.discovery: WARN
bootstrap.memory_lock: true
xpack.license.self_generated.type: basic
xpack.security.enabled: true
xpack.security.audit.enabled: true
ELASTIC_PASSWORD_FILE: /run/secrets/elasticsearch_elastic_password
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 256M
calibreweb:
container_name: homecloud_calibreweb
profiles: ["calibreweb"]
image: lscr.io/linuxserver/calibre-web
healthcheck:
test: curl --fail http://localhost:8083/ || exit 1
restart: unless-stopped
secrets:
- calibreweb_admin_password
expose:
- 8083
environment:
TZ: "Asia/Singapore"
FILE__PASSWORD: /run/secrets/calibreweb_admin_password
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
jellyfin:
container_name: homecloud_jellyfin
profiles: ["jellyfin"]
image: lscr.io/linuxserver/jellyfin
healthcheck:
test: curl --fail http://localhost:8096/ || exit 1
restart: unless-stopped
expose:
- 8096
environment:
TZ: "Asia/Singapore"
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
bookstack:
container_name: homecloud_bookstack
profiles: ["bookstack"]
image: lscr.io/linuxserver/bookstack
restart: unless-stopped
secrets:
- mariadb_bookstack_password
environment:
PUID: 1000
PGID: 1000
DB_HOST: mariadb
DB_PORT: 3306
DB_USER: bookstack
DB_DATABASE: bookstack
FILE__DB_PASS: /run/secrets/mariadb_bookstack_password
expose:
- 80
depends_on:
- mariadb
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M