-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-for-metalbox-things-services.yml
147 lines (140 loc) · 5.5 KB
/
docker-compose-for-metalbox-things-services.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
version: "3.9"
networks:
networks_vlan_20:
external: true
networks_traefik_proxy:
external: true
services:
# dns-upstream-things:
# image: jhnrn/cloudflared:latest
# container_name: "dns-upstream-${THINGS_VLAN_NAME}"
# command: proxy-dns
# restart: always
# environment:
# TZ: ${TZ}
# TUNNEL_METRICS: "0.0.0.0:49312"
# TUNNEL_DNS_ADDRESS: "0.0.0.0"
# TUNNEL_DNS_PORT: ${TUNNEL_DNS_PORT}
# TUNNEL_DNS_UPSTREAM: ${THINGS_DNS_UPSTREAM}
# networks:
# networks_vlan_20:
# ipv4_address: ${THINGS_DNS_UPSTREAM_ADDRESS}
# healthcheck:
# test: dig +short @127.0.0.1 -p${TUNNEL_DNS_PORT} cloudflare.com AAAA || exit 1
# # test: 'curl --http2 -H "accept: application/dns-json" "https://1.1.1.1/dns-query?name=cloudflare.com" || exit 1'
# interval: 30s
# timeout: 5s
# retries: 2
# labels:
# - autoheal=true
# pihole:
# container_name: pihole-${THINGS_VLAN_NAME}
# hostname: pihole-${THINGS_VLAN_NAME}
# image: pihole/pihole:dev
# environment:
# TZ: ${TZ}
# WEBPASSWORD: ${PIHOLE_WEBPASSWORD}
# PIHOLE_DNS_: dns-upstream-things#${TUNNEL_DNS_PORT}
# # Listen on all interfaces and permit all origins
# # This allows Pihole to work in this setup and when answering across VLANS,
# # but do not expose pi-hole to the internet!
# DNSMASQ_LISTENING: local
# DNS_BOGUS_PRIV: true
# DNS_FQDN_REQUIRED: true
# DHCP_ACTIVE: ${DHCP_ACTIVE}
# DHCP_START: 10.100.${THINGS_VLAN_ID}.${DHCP_START_OCTET}
# DHCP_END: 10.100.${THINGS_VLAN_ID}.${DHCP_END_OCTET}
# DHCP_ROUTER: ${THINGS_GATEWAY}
# PIHOLE_DOMAIN: ${DOMAIN}
# DHCP_LEASETIME: 24
# WEBTHEME: default-auto
# # Volumes store your data between container upgrades
# volumes:
# - ${DATA_STORAGE}/pihole/${THINGS_VLAN_NAME}/pihole:/etc/pihole
# - ${DATA_STORAGE}/pihole/${THINGS_VLAN_NAME}/dnsmasq.d:/etc/dnsmasq.d
# - ${DATA_STORAGE}/pihole/${THINGS_VLAN_NAME}/pihole/custom.list:/etc/pihole/custom.list
# # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
# cap_add:
# - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
# networks:
# networks_vlan_20:
# ipv4_address: ${THINGS_DNS_IP_ADDRESS}
# dns:
# - 127.0.0.1
# restart: unless-stopped
# depends_on:
# dns-upstream-things:
# condition: service_healthy
# healthcheck:
# test: ping -c 1 bing.com || exit 1
# # test: dig +short @127.0.0.1 pi.hole || exit 1
# interval: 30s
# retries: 5
# labels:
# - homepage.group=DNS
# - homepage.weight=1
# - homepage.name=Pihole-things
# - homepage.icon=pi-hole.png
# - homepage.href=http://${THINGS_DNS_IP_ADDRESS}/admin
# - homepage.description=for ${THINGS_VLAN_NAME}
# - homepage.widget.type=pihole
# - homepage.widget.key=${PIHOLE_TOKEN}
# - homepage.widget.url=http://${THINGS_DNS_IP_ADDRESS}
# # - homepage.widget.fields=["queries", "blocked", "gravity"]
homeassistant:
container_name: homeassistant
hostname: homeassistant
image: homeassistant/home-assistant:${HOMEASSISTANT_VERSION}
volumes:
- ${DATA_STORAGE}/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
devices:
# - /dev/ttyACMO # (optional) Add serial devices to the container
- ${ZIGBEE_DEVICE}
privileged: true
restart: unless-stopped
networks:
networks_traefik_proxy:
networks_vlan_20:
ipv4_address: ${HOMEASSISTANT_IP_ADDRESS}
dns:
- ${THINGS_DNS_IP_ADDRESS}
labels:
- traefik.enable=true
- traefik.http.routers.homeassistant.rule=Host(`home.${DOMAIN}`)
- traefik.http.routers.homeassistant.tls.certresolver=certificato
- traefik.http.routers.homeassistant.entrypoints=web,web-secure
- traefik.http.routers.homeassistant.middlewares=quantum_metal-ipallowlist
- traefik.http.services.homeassistant.loadbalancer.server.port=8123
- traefik.docker.network=networks_traefik_proxy
go2rtc:
container_name: go2rtc
image: alexxit/go2rtc
# network_mode: host # important for WebRTC, HomeKit, UDP cameras
privileged: true # only for FFmpeg hardware transcoding
restart: unless-stopped
environment:
TZ: ${TZ}
CAMERA_RTSP_PASSWORD: ${CAMERA_RTSP_PASSWORD}
CAMERA_RTSP_USER: ${CAMERA_RTSP_USER}
networks:
networks_vlan_20:
networks_traefik_proxy:
dns:
- ${THINGS_DNS_IP_ADDRESS}
devices:
- /dev/dri # If using Intel QuickSync or VAAPI, direct rendering interface (DRI) devices for each GPU. <node> is a number for each card in the system starting from 128.
volumes:
- ${DATA_STORAGE}/go2rtc:/config # folder for go2rtc.yaml file (edit from WebUI)
labels:
- traefik.enable=true
- traefik.http.routers.go2rtc.rule=Host(`camera.${DOMAIN}`)
- traefik.http.routers.go2rtc.tls.certresolver=certificato
- traefik.http.routers.go2rtc.entrypoints=web,web-secure
- traefik.http.services.go2rtc.loadbalancer.server.port=1984
- traefik.http.routers.go2rtc.middlewares=quantum-ipallowlist
- traefik.tcp.routers.go2rtc-tcp.rule=HostSNI(`*`)
- traefik.tcp.routers.go2rtc-tcp.entrypoints=rtsp
- traefik.tcp.routers.go2rtc-tcp.service=go2rtc-tcp
- traefik.tcp.services.go2rtc-tcp.loadbalancer.server.port=8554
- traefik.docker.network=networks_traefik_proxy