-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
412 lines (412 loc) · 14 KB
/
docker-compose.yml
File metadata and controls
412 lines (412 loc) · 14 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
volumes:
settings:
airnav-radar:
tar1090:
tar1090-timelapse:
tar1090-collectd:
tar1090-log:
aircraft-data:
tailscale-state:
services:
kiosk:
restart: unless-stopped
build: ./kiosk
privileged: true
ports:
- 8081:8080
volumes:
- 'settings:/data'
labels:
io.balena.features.supervisor-api: '1'
wifi-connect:
build: ./wifi-connect
restart: unless-stopped
network_mode: host
environment:
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
- PORTAL_LISTENING_PORT=8181
- PORTAL_SSID=balenaWiFi
- PORTAL_PASSPHRASE=balenaWiFi
- ACTIVITY_TIMEOUT=180
ports:
- "8181:8181"
cap_add:
- NET_ADMIN
labels:
io.balena.features.dbus: '1'
io.balena.features.supervisor-api: '1'
frontend-proxy:
image: traefik
build: ./traefik
restart: unless-stopped
ports:
- "80:80"
labels:
io.balena.features.balena-socket: '1'
io.balena.features.supervisor-api: '1'
dump1090-fa:
build: ./dump1090-fa
image: dump1090-fa
restart: unless-stopped
# privileged is required so start.sh can write
# /sys/module/usbcore/parameters/usbfs_memory_mb=0 (lifts the 16 MB
# usbfs buffer cap for high-rate SDR captures such as Airspy at 12 Msps).
# Unprivileged containers get /sys mounted read-only regardless of
# capabilities, so the write fails with EROFS and trips the start.sh
# set -e crash loop.
privileged: true
environment:
- LAT=
- LON=
devices:
- "/dev/bus/usb"
# `expose:` is informational only on the default Compose bridge network and
# balena-cli strips it from the composition at push time. Kept commented as
# documentation of which ports each service makes available to peers.
# expose:
# - "30001"
# - "30002"
# - "30003"
# - "30004"
# - "30005"
# - "30102"
# - "30104"
# - "30105"
# - "30106"
# - "8080"
ports:
- "30001:30001"
- "30002:30002"
- "30003:30003"
- "30004:30004"
- "30005:30005"
- "30102:30102"
- "30104:30104"
- "30105:30105"
- "30106:30106"
- "8080:8080"
volumes:
- 'aircraft-data:/run/dump1090-fa'
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
# New, permanent redirect (from 13 March 2021)
- "traefik.http.routers.skyaware.rule=PathPrefix(`/skyaware`)"
- "traefik.http.routers.skyaware.middlewares=skyaware-redirect" # <- dump1090-fa-redirect to be deprecated later
- "traefik.http.middlewares.skyaware-redirect.redirectregex.regex=^.*/skyaware$$"
- "traefik.http.middlewares.skyaware-redirect.redirectregex.replacement=/skyaware/"
- "traefik.http.middlewares.skyaware-redirect.redirectregex.permanent=true"
# Temporary redirect for legacy purposes (from 13 March 2021)
- "traefik.http.routers.dump1090-fa.rule=PathPrefix(`/dump1090-fa`)"
- "traefik.http.routers.dump1090-fa.middlewares=dump1090-fa-redirect"
- "traefik.http.middlewares.dump1090-fa-redirect.redirectregex.regex=^.*/dump1090-fa.*$$"
- "traefik.http.middlewares.dump1090-fa-redirect.redirectregex.replacement=/skyaware/"
- "traefik.http.middlewares.dump1090-fa-redirect.redirectregex.permanent=true"
# Airspy stats page, served by the in-container lighttpd when
# AIRSPY_ADSB_STATS=true (87-airspy.conf adds /airspy_adsb/ -> /run/airspy_adsb/).
- "traefik.http.routers.airspy-adsb.rule=PathPrefix(`/airspy_adsb`)"
- "traefik.http.routers.airspy-adsb.middlewares=airspy-adsb-redirect"
- "traefik.http.middlewares.airspy-adsb-redirect.redirectregex.regex=^.*/airspy_adsb$$"
- "traefik.http.middlewares.airspy-adsb-redirect.redirectregex.replacement=/airspy_adsb/"
- "traefik.http.middlewares.airspy-adsb-redirect.redirectregex.permanent=true"
dump978-fa:
build: ./dump978-fa
image: dump978-fa
restart: unless-stopped
environment:
- LAT=
- LON=
- DUMP978_DEVICE=00000978
- DUMP978_ENABLED=false
devices:
- "/dev/bus/usb"
# expose: kept for docs, see dump1090-fa note
# expose:
# - "30978"
# - "30979"
# - "8978"
ports:
- "30978:30978"
- "30979:30979"
- "8978:8978"
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
- "traefik.http.routers.dump978-fa.rule=PathPrefix(`/skyaware978`)"
- "traefik.http.routers.dump978-fa.middlewares=dump978-fa-redirect"
- "traefik.http.middlewares.dump978-fa-redirect.redirectregex.regex=^.*/skyaware978$$"
- "traefik.http.middlewares.dump978-fa-redirect.redirectregex.replacement=/skyaware978/"
- "traefik.http.middlewares.dump978-fa-redirect.redirectregex.permanent=true"
piaware:
depends_on:
- dump1090-fa
build: ./piaware
image: piaware
restart: unless-stopped
environment:
- FLIGHTAWARE_FEEDER_ID=
- DUMP978_ENABLED=false
labels:
io.balena.features.supervisor-api: '1'
fr24feed:
depends_on:
- dump1090-fa
build: ./fr24feed
image: fr24feed
restart: unless-stopped
ports:
- "8754:8754"
environment:
- FR24_KEY=
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
- "traefik.http.routers.fr24feed.rule=PathPrefix(`/fr24feed`)"
- "traefik.http.routers.fr24feed-a.rule=Path(`/logo.png`)"
- "traefik.http.routers.fr24feed-b.rule=Path(`/monitor.json`)"
- "traefik.http.routers.fr24feed-c.rule=Path(`/settings.html`)"
- "traefik.http.routers.fr24feed-d.rule=Path(`/restart.html`)"
- "traefik.http.routers.fr24feed-e.rule=Path(`/tracked.html`)"
- "traefik.http.routers.fr24feed-f.rule=Path(`/fr24.css`)"
- "traefik.http.routers.fr24feed-g.rule=Path(`/jquery.js`)"
- "traefik.http.routers.fr24feed-h.rule=Path(`/flights.json`)"
- "traefik.http.routers.fr24feed-i.rule=Path(`/shutdown.html`)"
- "traefik.http.routers.fr24feed-j.rule=Path(`/logs.bin`)"
- "traefik.http.routers.fr24feed-k.rule=Path(`/shutdown.bin`)"
- "traefik.http.routers.fr24feed-l.rule=Path(`/restart.bin`)"
- "traefik.http.routers.fr24feed-m.rule=Path(`/config.json`)"
- "traefik.http.routers.fr24feed-n.rule=Path(`/index.html`)"
- "traefik.http.routers.fr24feed-o.rule=Path(`/settings_na.html`)"
- "traefik.http.routers.fr24feed-p.rule=Path(`/logs.html`)"
- "traefik.http.routers.fr24feed-q.rule=Path(`/wifi.html`)"
- "traefik.http.routers.fr24feed-r.rule=Path(`/access_points.json`)"
- "traefik.http.routers.fr24feed-s.rule=Path(`/monitor.txt`)"
- "traefik.http.routers.fr24feed-t.rule=Path(`/save.bin`)"
- "traefik.http.routers.fr24feed-u.rule=Path(`/wifi.bin`)"
- "traefik.http.routers.fr24feed-v.rule=Path(`/logs-uat-fr24.bin`)"
- "traefik.http.routers.fr24feed-w.rule=Path(`/logs-uat-tcp.bin`)"
- "traefik.http.routers.fr24feed-x.rule=Path(`/diagnostics_dump.tgz`)"
- "traefik.http.routers.fr24feed.middlewares=fr24feed-redirect,fr24feed-stripprefix"
- "traefik.http.middlewares.fr24feed-redirect.redirectregex.regex=^.*/fr24feed$$"
- "traefik.http.middlewares.fr24feed-redirect.redirectregex.replacement=/fr24feed/"
- "traefik.http.middlewares.fr24feed-redirect.redirectregex.permanent=true"
- "traefik.http.middlewares.fr24feed-stripprefix.stripprefix.prefixes=/fr24feed"
planefinder:
depends_on:
- dump1090-fa
build: ./planefinder
image: planefinder
restart: unless-stopped
ports:
- "30053:30053"
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
- "traefik.http.routers.planefinder.rule=PathPrefix(`/planefinder`)"
- "traefik.http.routers.planefinder-a.rule=PathPrefix(`/ajax/`)"
- "traefik.http.routers.planefinder-b.rule=PathPrefix(`/assets/`)"
- "traefik.http.routers.planefinder-c.rule=PathPrefix(`/client/`)"
- "traefik.http.routers.planefinder-d.rule=Path(`/gps.html`)"
- "traefik.http.routers.planefinder.middlewares=planefinder-redirect,planefinder-stripprefix"
- "traefik.http.middlewares.planefinder-redirect.redirectregex.regex=^.*/planefinder$$"
- "traefik.http.middlewares.planefinder-redirect.redirectregex.replacement=/planefinder/"
- "traefik.http.middlewares.planefinder-redirect.redirectregex.permanent=true"
- "traefik.http.middlewares.planefinder-stripprefix.stripprefix.prefixes=/planefinder"
opensky-network:
depends_on:
- dump1090-fa
build: ./opensky-network
image: opensky-network
restart: unless-stopped
environment:
- OPENSKY_USERNAME=
- OPENSKY_SERIAL=
labels:
io.balena.features.supervisor-api: '1'
airnav-radar:
depends_on:
- dump1090-fa
build: ./airnav-radar
image: airnav-radar
restart: unless-stopped
# expose: kept for docs, see dump1090-fa note
# expose:
# - "32088"
environment:
- AIRNAV_RADAR_KEY=
- LAT=
- LON=
- ALT=
volumes:
# Slight hack to make AirNav Radar run on the amd64 architecture
# which lacks a kernel-provided /sys/class/thermal. The Dockerfile
# bakes /var/radarbox/thermal/thermal_zone0/temp = 24000 into the
# image; on first container start, Docker copies that path's content
# into the (empty) named volume, so the same fake temp is also
# visible at /sys/class/thermal. Nothing writes at runtime, so both
# mounts are :ro.
- 'airnav-radar:/sys/class/thermal:ro'
- 'airnav-radar:/var/radarbox/thermal:ro'
labels:
io.balena.features.supervisor-api: '1'
adsb-exchange:
depends_on:
- dump1090-fa
build:
context: ./adsb-exchange
image: adsb-exchange
restart: unless-stopped
environment:
ADSB_EXCHANGE_SITENAME: ''
ADSB_EXCHANGE_UUID: ''
LAT: ''
LON: ''
ALT: ''
# expose: kept for docs, see dump1090-fa note
# expose:
# - '30154'
# - '30157'
# - '31003'
labels:
io.balena.features.supervisor-api: '1'
wingbits:
depends_on:
- dump1090-fa
build: ./wingbits
image: wingbits
restart: unless-stopped
environment:
- WINGBITS_DEVICE_ID=
- LAT=
- LON=
# privileged is required: without it the embedded Beast listener
# on port 30015 never comes up and GeoSigners are not detected.
# Granular caps/devices (SYS_RAWIO, NET_ADMIN, /dev/bus/usb,
# major-189 cgroup rule) are not sufficient.
privileged: true
# expose: kept for docs, see dump1090-fa note
# expose:
# - '30154'
labels:
io.balena.features.supervisor-api: '1'
planewatch:
depends_on:
- dump1090-fa
build: ./planewatch
image: planewatch
restart: unless-stopped
environment:
- LAT=
- LON=
- ALT=
- PLANEWATCH_API_KEY=
# expose: kept for docs, see dump1090-fa note
# expose:
# - '30105'
labels:
io.balena.features.supervisor-api: '1'
autohupr:
build: ./autohupr
restart: unless-stopped
tmpfs:
- /tmp/work
labels:
io.balena.features.balena-api: '1'
io.balena.features.supervisor-api: '1'
tar1090:
depends_on:
- dump1090-fa
- adsb-exchange
build: ./tar1090
image: tar1090
restart: unless-stopped
environment:
- BEASTHOST=dump1090-fa
- MLATHOST=adsb-exchange
- MLATPORT=30157
- LAT=
- LON=
volumes:
- tar1090:/var/globe_history
- tar1090-timelapse:/var/timelapse1090
- tar1090-collectd:/var/lib/collectd
- tar1090-log:/var/log
ports:
- "8078:80"
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
- "traefik.http.routers.tar1090.rule=PathPrefix(`/tar1090`)"
- "traefik.http.routers.tar1090-a.rule=PathPrefix(`/graphs1090`)"
mlat-client:
depends_on:
- dump1090-fa
build: ./mlat-client
image: mlat-client
restart: unless-stopped
environment:
- LAT=
- LON=
- ALT=
- MLAT_CLIENT_USER=
- MLAT_SERVER=
labels:
io.balena.features.supervisor-api: '1'
ident:
depends_on:
- dump1090-fa
build: ./ident
image: ident
restart: unless-stopped
environment:
- IDENT_ADDR=:8080
- IDENT_DATA_DIR=/run/dump1090-fa
- IDENT_UPSTREAM_TYPE=dump1090-fa
- IDENT_BASE_PATH=/ident
# expose: kept for docs, see dump1090-fa note
# expose:
# - "8080"
ports:
- "8090:8080"
volumes:
- 'aircraft-data:/run/dump1090-fa:ro'
labels:
- "io.balena.features.supervisor-api=1"
- "traefik.enable=true"
- "traefik.http.routers.ident.rule=PathPrefix(`/ident`)"
- "traefik.http.routers.ident.middlewares=ident-redirect"
- "traefik.http.middlewares.ident-redirect.redirectregex.regex=^.*/ident$$"
- "traefik.http.middlewares.ident-redirect.redirectregex.replacement=/ident/"
- "traefik.http.middlewares.ident-redirect.redirectregex.permanent=true"
tailscale:
build: ./tailscale
image: tailscale
restart: unless-stopped
network_mode: host
privileged: true
tmpfs:
- /tmp
- /var/run/
environment:
- TS_AUTHKEY=
- TS_HOSTNAME=
- TS_EXTRA_ARGS=
- TS_ROUTES=
- TS_ACCEPT_DNS=false
- TS_USERSPACE=false
# resin-vpn / resin-dns are balena's management-VPN interfaces;
# excluding them keeps tailscaled's netmon from picking them as
# default-route candidates.
- TS_EXCLUDED_INTERFACES=resin-vpn resin-dns
- TAILSCALE_SERVE_TRAEFIK=false
# Disable tailscaled's outbound update-check probes. Applied post-up via
# `tailscale set --update-check=$value` in start.sh.
- TS_UPDATE_CHECK=false
# Escape hatch for arbitrary post-up `tailscale set` args, appended
# verbatim (space-separated).
- TS_POST_UP_SET_ARGS=
volumes:
- 'tailscale-state:/var/lib/tailscale'
labels:
io.balena.features.supervisor-api: '1'
io.balena.features.kernel-modules: '1'