-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
508 lines (483 loc) · 13.6 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
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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
##Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker
#Requirement: Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, etc. as explained in the reference.
version: "3.6"
services:
zerotier:
image: croc/zerotier
container_name: zerotier
env_file:
- ./envfiles/zerotier.env
volumes:
- './config/route.list:/config/route.list:ro'
network_mode: host
privileged: true
restart: always
# Traefik Reverse Proxy
traefik:
hostname: traefik
# image: traefik:latest
image: traefik:v1.7.16
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
networks:
- default
- traefik_proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
env_file:
- ./envfiles/traefik.env
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${USERDIR}/docker/traefik:/etc/traefik
- ${USERDIR}/docker/shared:/shared
bitwarden:
image: bitwardenrs/server
restart: always
volumes:
- ${USERDIR}/docker/bw-data:/data
environment:
WEBSOCKET_ENABLED: 'true' # Required to use websockets
# SIGNUPS_ALLOWED: 'true'
SIGNUPS_ALLOWED: 'false'
ADMIN_TOKEN: 'random_token'
labels:
- traefik.enable=true
- traefik.docker.network=traefik_proxy
- traefik.web.frontend.rule=Host:bitwarden.${DOMAINNAME}
- traefik.web.port=80
- traefik.hub.frontend.rule=Host:bitwarden.${DOMAINNAME};Path:/notifications/hub
- traefik.hub.port=3012
- traefik.hub.protocol=ws
# NextCloud – Your Own Cloud Storage
nextcloud:
container_name: nextcloud
restart: always
image: linuxserver/nextcloud
volumes:
- ${USERDIR}/docker/nextcloud:/config
- ${USERDIR}/shared_data:/data
- ${USERDIR}/docker/shared:/shared
ports:
- 443
environment:
- PUID=${PUID}
- PGID=${PGID}
networks:
- traefik_proxy
- default
links:
- db
labels:
- "traefik.enable=true"
- "traefik.backend=nextcloud"
- "traefik.frontend.rule=Host:nextcloud.${DOMAINNAME}"
- "traefik.port=443"
- "traefik.protocol=https"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
cloud9:
container_name: cloud9
ports:
- 8001:80
volumes:
- ${USERDIR}:/workspace/
image: kdelfour/cloud9-docker
environment:
- PUID=${PUID}
- PGID=${PGID}
# Home Assistant - Smart Home Hub
homeassistant:
container_name: homeassistant
restart: always
image: homeassistant/home-assistant:latest
devices:
# - /dev/ttyUSB0:/dev/ttyUSB0
# - /dev/ttyUSB1:/dev/ttyUSB1
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- ${USERDIR}/docker/hass:/config
- /etc/localtime:/etc/localtime:ro
- ${USERDIR}/docker/shared:/shared
ports:
- "8123:8123"
privileged: true
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
network_mode: "host"
labels:
- "traefik.enable=false"
# influxdb:
# image: influxdb
# container_name: hass-influxdb
# restart: unless-stopped
# networks:
# default:
# ipv4_address: 172.22.0.101
# volumes:
# - ${USERDIR}/docker/influxdb:/var/lib/influxdb
# environment:
# - PUID=${PUID}
# - PGID=${PGID}
# env_file:
# - ./envfiles/influxdb.env
datascience-notebook:
image: jupyter/datascience-notebook
volumes:
- ${USERDIR}/docker/jupyter:/home/khalilkk/work
ports:
- 8888:8888
container_name: datascience-notebook-container
labels:
- "traefik.enable=true"
- "traefik.backend=jupyter"
- "traefik.frontend.rule=Host:jupyter.${DOMAINNAME}"
- "traefik.port=8888"
- "traefik.protocol=http"
- "traefik.docker.network=traefik_proxy"
networks:
- traefik_proxy
- default
# grafana:
# image: grafana/grafana
# container_name: hass-grafana
# restart: unless-stopped
# environment:
# - PUID=${PUID}
# - PGID=${PGID}
# volumes:
# - ${USERDIR}/docker/grafana:/var/lib/grafana
# - /etc/localtime:/etc/localtime:ro
# ports:
# - 3001:3000/tcp
# networks:
# default:
# ipv4_address: 172.22.0.102
# env_file:
# - ./envfiles/grafana.env
# labels:
# - "traefik.enable=true"
# - "traefik.backend=grafana"
# - "traefik.frontend.rule=Host:grafana.${DOMAINNAME}"
# - "traefik.port=3000"
# - "traefik.protocol=http"
# - "traefik.docker.network=traefik_proxy"
mosquitto:
container_name: mosquitto
restart: unless-stopped
image: eclipse-mosquitto
environment:
- PUID=${PUID}
- PGID=${PGID}
networks:
default:
ipv4_address: 172.22.0.103
volumes:
- ${USERDIR}/docker/mosquitto/data:/mosquitto/data
- ${USERDIR}/docker/mosquitto/log:/mosquitto/log
- ${USERDIR}/docker/mosquitto/config:/mosquitto/config
ports:
- "1883:1883"
- "9001:9001"
- "8883:8883"
labels:
- "traefik.enable=true"
- "traefik.backend=mqtt"
- "traefik.frontend.rule=Host:mqtt.${DOMAINNAME}"
- "traefik.port=9001"
# - "traefik.passHostHeader=true"
- "traefik.protocol=ws"
# - 'traefik.frontend.entryPoints=https'
piwigo:
image: linuxserver/piwigo
restart: always
privileged: true
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
ports:
- "8088:80"
links:
- db
# depends_on:
# - db
volumes:
- ${USERDIR}/docker/piwigo1:/config/www/gallery/_data/i
- type: bind
source: ${USERDIR}/docker/piwigo1/galleries/vesna
target: /config/www/gallery/vesna/vesna
- type: bind
source: ${USERDIR}/docker/piwigo1/galleries/mobile
target: /config/www/gallery/vesna/mobile
- type: bind
source: ${USERDIR}/docker/piwigo1/galleries/shmelek
target: /config/www/gallery/shmelek
- type: bind
source: ${USERDIR}/docker/piwigo1/galleries/khalilkk
target: /config/www/gallery/khalilkk
- type: bind
source: ${USERDIR}/docker/piwigo1/galleries/khabibullins
target: /config/www/gallery/khabibullins
# - :/var/www/galleries
# glances:
# container_name: glances
# image: vimagick/glances
# volumes:
# - ${USERDIR}/docker/glances/:/etc/glances
# - /var/run/docker.sock:/var/run/docker.sock:ro
# environment:
# - GLANCES_OPT=-w
# - PUID=${PUID}
# - PGID=${PGID}
# restart: always
# network_mode: "host"
# ports:
# - "61208:61208"
deconz:
image: marthoc/deconz
container_name: deconz
# network_mode: host
networks:
default:
ipv4_address: 172.22.0.7
restart: always
ports:
- "8089:8089"
- "444:444"
volumes:
- ${USERDIR}/docker/deconz:/root/.local/share/dresden-elektronik/deCONZ
devices:
- /dev/ttyUSB0
environment:
- DECONZ_WEB_PORT=8089
- DECONZ_WS_PORT=445
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0
# motioneye:
# image: ccrisan/motioneye:master-amd64
# container_name: motioneye
# ports:
# - "8081:8081"
# - "8765:8765"
# volumes:
# - ${USERDIR}/docker/motion/etc:/etc/motioneye
# - ${USERDIR}/docker/motion/media:/var/lib/motioneye
# networks:
# - traefik_proxy
# - default
# labels:
# - "traefik.enable=true"
# - "traefik.port=8765"
# - "traefik.protocol=http"
# - "traefik.backend=cctv"
# - "traefik.frontend.rule=Host:cctv.${DOMAINNAME}"
# - "traefik.docker.network=traefik_proxy"
ghost:
image: ghost:latest
container_name: ghost1
restart: always
ports:
- 2368
links:
- db
env_file:
- ./envfiles/ghost.env
networks:
- traefik_proxy
- default
volumes:
- ${USERDIR}/docker/ghost:/var/lib/ghost/content
labels:
- "traefik.enable=true"
- "traefik.backend=blog"
- "traefik.protocol=http"
- "traefik.frontend.rule=Host:blog.${DOMAINNAME}"
- "traefik.docker.network=traefik_proxy"
db:
container_name: db
image: mariadb
restart: always
networks:
default:
ipv4_address: 172.22.0.50
volumes:
- ${USERDIR}/docker/mariadbNEW:/var/lib/mysql
env_file:
- ./envfiles/mariadb.env
heimdall:
image: linuxserver/heimdall
container_name: heimdall
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
# - FORCE_HTTPS=true
volumes:
- ${USERDIR}/docker/heimdall:/config
- ${USERDIR}/docker/shared:/shared
ports:
- 80
- 443
restart: unless-stopped
networks:
- traefik_proxy
- default
labels:
- "traefik.enable=true"
- "traefik.backend=heimdall"
- "traefik.frontend.rule=Host:home.${DOMAINNAME}"
- "traefik.port=80"
- "traefik.docker.network=traefik_proxy"
- "traefik.protocol=http"
phpmyadmin:
hostname: phpmyadmin
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin
restart: always
links:
- db
ports:
- 80
env_file:
- ./envfiles/pma.env
networks:
# - traefik_proxy
- default
# labels:
# - "traefik.enable=true"
# - "traefik.backend=pma"
# - "traefik.frontend.rule=Host:pma.${DOMAINNAME}"
# - "traefik.port=80"
# - "traefik.docker.network=traefik_proxy"
# - "traefik.protocol=http"
cloudberry-backup:
hostname: cloudberry
container_name: cloudberry
image: jlesage/cloudberry-backup
restart: always
ports:
- "5800:5800"
volumes:
- ${USERDIR}/docker/cloudberry-backup:/config:rw
- /mnt/3TB:/storage:ro
portainer:
image: portainer/portainer
container_name: portainer
restart: always
command: -H unix:///var/run/docker.sock
ports:
- 9000:9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${USERDIR}/docker/portainer/data:/data
- ${USERDIR}/docker/shared:/shared
environment:
- TZ=${TZ}
networks:
# - default
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.backend=portainer"
- "traefik.frontend.rule=Host:portainer.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /portainer"
- "traefik.port=9000"
- "traefik.docker.network=traefik_proxy"
- "traefik.protocol=http"
# postgres:
# driver: local
wiki:
image: requarks/wiki:2
links:
- db
environment:
DB_TYPE: mariadb
DB_HOST: db
DB_PORT: 3306
DB_USER: "wikijs"
DB_PASS: "wikijs111!"
DB_NAME: "wikijs"
restart: unless-stopped
ports:
- "3000:3000"
networks:
- default
- traefik_proxy
labels:
# The following lines are valid for Traefik version 1.x:
- "traefik.enable=true"
- "traefik.backend=wiki"
- "traefik.frontend.rule=Host:wiki.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /portainer"
- "traefik.port=3000"
- "traefik.docker.network=traefik_proxy"
- "traefik.protocol=http"
# synapse:
# build:
# context: ../..
# dockerfile: docker/Dockerfile
# image: docker.io/matrixdotorg/synapse:latest
# Since synapse does not retry to connect to the database, restart upon
# failure
# restart: unless-stopped
# See the readme for a full documentation of the environment settings
# environment:
# - SYNAPSE_CONFIG_PATH=${USERDIR}/docker/synapse/
# volumes:
# You may either store all the files in a local folder
# - ${USERDIR}/docker/synapse/matrix-config:/etc
# - ${USERDIR}/docker/synapse/files:/data
# depends_on:
# - db
# networks:
# - traefik_proxy
# labels:
# - "traefik.enable=true"
# - "traefik.backend=matrix"
# - "traefik.frontend.rule=Host:matrix.${DOMAINNAME}"
# - "traefik.port=8008"
# - "traefik.docker.network=traefik_proxy"
# - "traefik.protocol=http"
networks:
traefik_proxy:
external:
name: traefik_proxy
# ipam:
# config:
# - subnet: 172.18.0.0/24
default:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24