-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.85 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
# OverwatcherPI — full stack compose
# See docs/docker.md for pre-flight and migration steps.
services:
bot:
build:
context: .
dockerfile: Dockerfile
container_name: overwatcher-bot
network_mode: host # required: nmap ARP discovery + BlueZ D-Bus
security_opt:
- apparmor:unconfined
cap_add:
- NET_RAW
- NET_ADMIN
group_add:
- "986"
env_file: .env
volumes:
- ./data:/app/data
- ./logs:/app/logs
- /var/run/dbus:/var/run/dbus # BlueZ D-Bus passthrough (see docs/docker.md)
- /usr/bin/vcgencmd:/usr/bin/vcgencmd:ro # Pi throttling/temp queries
- /var/log/auth.log:/var/log/auth.log:ro # SSH watcher
- /var/run/docker.sock:/var/run/docker.sock:ro # docker socket for container health checks
devices:
- /dev/vcio:/dev/vcio # required by vcgencmd
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "healthcheck.py"]
interval: 5m
timeout: 20s
retries: 3
start_period: 2m
dashboard:
build:
context: .
dockerfile: dashboard/Dockerfile
container_name: overwatcher-dashboard
# No ports: — intentionally not published to host.
# Caddy reaches it via the internal network only.
env_file: .env
volumes:
- ./data:/app/data
- ./logs:/app/logs
# Exposed to localhost only so Caddy on host network can reach it
ports:
- "127.0.0.1:8501:8501"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 1m
timeout: 5s
retries: 3
start_period: 30s
caddy:
image: caddy:2-alpine
container_name: overwatcher-caddy
network_mode: host
volumes:
- ./dashboard/Caddyfile:/etc/caddy/Caddyfile:ro
depends_on:
- dashboard
restart: unless-stopped