-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
277 lines (275 loc) · 8.25 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
version: "3"
services:
mqtt:
container_name: mqtt
image: eclipse-mosquitto:latest
volumes:
- /srv/blakeshome/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- mosquitto_data:/mosquitto/data
ports:
- "1883:1883"
- "9001:9001"
portainer:
container_name: portainer
restart: always
image: portainer/portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer:/data
ports:
- "127.0.0.1:9000:9000"
unifi:
container_name: unifi
restart: unless-stopped
image: jacobalberty/unifi
volumes:
- unifi:/unifi
network_mode: host
environment:
TZ: "America/Chicago"
RUNAS_UID0: "false"
unifi_backup:
container_name: unifi_backup
restart: unless-stopped
build:
context: unifi_backup
volumes:
- unifi:/unifi
environment:
TZ: "America/Chicago"
ENCRYPTION_KEY: "${UNIFI_BACKUP_ENCRYPTION_KEY}"
AWS_ACCESS_KEY_ID: AKIAIUDDE7N2WIGEYOPA
AWS_SECRET_ACCESS_KEY: "${UNIFI_AWS_SECRET}"
AWS_DEFAULT_REGION: us-east-2
googletracker:
container_name: google_tracker
restart: unless-stopped
build:
context: googletracker
environment:
TZ: "America/Chicago"
EMAIL: [email protected]
PASSWORD: "${GOOGLETRACKER_PASSWORD}"
POLL_INTERVAL: 300
MQTT_SERVER: mqtt.blakeshome.com
HOME_LATITUDE: "${GOOGLETRACKER_HOME_LATITUDE}"
HOME_LONGITUDE: "${GOOGLETRACKER_HOME_LONGITUDE}"
network_mode: host
# mqttlogger:
# container_name: mqttlogger
# restart: unless-stopped
# build:
# context: mqttlogger
# environment:
# TZ: "America/Chicago"
# network_mode: host
# volumes:
# - ./mqttlogger:/mqttlogger
homeassistant:
container_name: hass
image: homeassistant/home-assistant:0.101.3
volumes:
- /srv/blakeshome/home-assistant:/config
network_mode: host
environment:
TZ: "America/Chicago"
appdaemon:
container_name: appdaemon
restart: unless-stopped
image: acockburn/appdaemon:latest
volumes:
- ./appdaemon:/conf
network_mode: host
environment:
TZ: "America/Chicago"
HA_URL: "http://localhost:8123"
TOKEN: "${HA_TOKEN}"
DASH_URL: "http://127.0.0.1:5050"
pihole:
container_name: pihole
restart: unless-stopped
build:
context: pihole
environment:
TZ: "America/Chicago"
WEBPASSWORD: "${DOCKER_PIHOLE_PW}"
ServerIP: 192.168.2.2
VIRTUAL_HOST: pihole.blakeshome.com
INTERFACE: enp3s0
DNSMASQ_LISTENING: local
DHCP_ACTIVE: "true"
DHCP_START: 192.168.2.30
DHCP_END: 192.168.2.251
DHCP_ROUTER: 192.168.2.1
DHCP_LEASETIME: 1
PIHOLE_DOMAIN: local
volumes:
- pihole:/etc/pihole
- /srv/blakeshome/pihole/dnsmasq.d:/etc/dnsmasq.d
- /srv/blakeshome/pihole/mqttpub.sh:/opt/mqttpub.sh:ro
cap_add:
- NET_ADMIN
network_mode: host
oauth2_proxy:
container_name: oauth2_proxy
restart: unless-stopped
image: blakeblackshear/oauth2_proxy
volumes:
- /srv/blakeshome/oauth2_proxy:/etc/oauth2_proxy:ro
network_mode: host
environment:
OAUTH2_PROXY_CLIENT_ID: 114257218611-r0nucuv66g6n0h7dcsvnhqprgr6rq1jg.apps.googleusercontent.com
OAUTH2_PROXY_CLIENT_SECRET: "${OAUTH2_PROXY_CLIENT_SECRET}"
OAUTH2_PROXY_COOKIE_SECRET: "${OAUTH2_PROXY_COOKIE_SECRET}"
OAUTH2_PROXY_COOKIE_DOMAIN: blakeshome.com
command: -config=/etc/oauth2_proxy/oauth2_proxy.cfg
nginx:
container_name: nginx
restart: unless-stopped
build:
context: nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/html:/etc/nginx/html:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/naxsi_core.rules:/etc/nginx/naxsi_core.rules:ro
- ./nginx/whitelist.rules:/etc/nginx/whitelist.rules:ro
- ssl_certs:/etc/ssl/private:ro
- ./nginx/cameras:/var/www/cameras:ro
- camera_stream:/data/cameras
- camera_nvr:/data/nvr
- /var/www/public:/var/www/public:ro
environment:
BLAKE_TOKEN: "${BLAKE_HASS_TOKEN}"
ALI_TOKEN: "${ALI_HASS_TOKEN}"
network_mode: host
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/tokens.template > /etc/nginx/tokens.json && exec nginx -g 'daemon off;'"
lets_encrypt:
container_name: acme.sh
restart: unless-stopped
image: neilpang/acme.sh
command: daemon
volumes:
- ssl_certs:/acme.sh
network_mode: host
environment:
CF_Email: [email protected]
CF_Key: "${DOCKER_CF_KEY}"
camera_back_hls_med:
container_name: camera_back_hls_med
restart: unless-stopped
image: jrottenberg/ffmpeg:4.0-alpine
command: >-
-hide_banner -y
-rtsp_transport tcp -stimeout 5000000 -xerror -use_wallclock_as_timestamps 1 -r 25
-fflags +genpts -avoid_negative_ts make_zero
-i "rtsp://viewer:${CAMERA_PASS}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=1"
-f lavfi -i anullsrc=channel_layout=mono:sample_rate=16000
-map 0:0 -map 1:0 -c:v copy -c:a aac -shortest
-hls_list_size 5 -hls_init_time 1 -hls_time 1 -hls_flags delete_segments+append_list+discont_start+omit_endlist
-hls_start_number_source epoch
/stream/back-med.m3u8
volumes:
- camera_stream:/stream
camera_back_nvr:
container_name: camera_back_nvr
restart: unless-stopped
image: jrottenberg/ffmpeg:4.0-alpine
command: >-
-hide_banner -y
-rtsp_transport tcp -stimeout 5000000 -xerror -use_wallclock_as_timestamps 1 -r 25
-fflags +genpts -avoid_negative_ts make_zero
-i "rtsp://viewer:${CAMERA_PASS}@10.0.10.10:554/live"
-f lavfi -i anullsrc=channel_layout=mono:sample_rate=16000
-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1
-strftime 1 -c copy -an -map 0 /nvr/back-%Y%m%d%H%M%S.mp4
-map 0:0 -map 1:0 -c:v copy -c:a aac -shortest
-hls_list_size 5 -hls_init_time 1 -hls_time 1 -hls_flags delete_segments+append_list+discont_start+omit_endlist
-hls_start_number_source epoch
/stream/back.m3u8
volumes:
- camera_nvr:/nvr
- camera_stream:/stream
# live camera feed jsmpeg
# ffmpeg -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
# -r 25 -fflags +genpts -avoid_negative_ts make_zero -i rtsp://viewer:[email protected]:554/live
# -reset_timestamps 1 -strftime 1 -f mpegts -codec:v mpeg1video -s 640:360 -b:v 1500k -r 25 -bf 0 -an
# -tune zerolatency http://localhost:8081/supersecret
nvr_snapshot:
container_name: nvr_snapshot
restart: unless-stopped
build:
context: nvr_snapshot
environment:
MONITORDIR: /nvr
volumes:
- camera_nvr:/nvr
nvr_cleaner:
container_name: nvr_cleaner
restart: unless-stopped
build:
context: nvr_cleaner
volumes:
- camera_nvr:/data
environment:
FIND_PARAMS: -mmin +10080 # 7*24*60
samba:
container_name: samba
restart: unless-stopped
image: dperson/samba:latest
command: -S -n -s "movies;/movies" -w "WORKGROUP" -g "netbios name = FILESERVER"
network_mode: host
volumes:
- movies:/movies
db:
container_name: postgres
image: postgres:alpine
restart: unless-stopped
volumes:
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
ports:
- "127.0.0.1:5432:5432"
netdata:
restart: always
hostname: netdata.blakeshome.com
image: netdata/netdata
ports:
- "127.0.0.1:19999:19999"
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
valetudo_downstairs_map:
restart: always
image: blakeblackshear/icantbelieveitsnotvaletudo:0.2.0
volumes:
- ./valetudo_maps/downstairs.json:/app/config.json
ports:
- "127.0.0.1:3000:3000"
volumes:
mosquitto_data:
nodered_data:
unifi:
pihole:
ssl_certs:
portainer:
postgres:
camera_stream:
camera_nvr:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/mnt/data/nvr'
movies:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/mnt/movies'