-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
63 lines (54 loc) · 2.06 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
63 lines (54 loc) · 2.06 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
services:
ble-scale-sync:
image: ghcr.io/kristianp26/ble-scale-sync:latest
container_name: ble-scale-sync
# Host network is required for BLE (BlueZ uses D-Bus on the host)
network_mode: host
# BLE requires NET_ADMIN + NET_RAW capabilities
cap_add:
- NET_ADMIN
- NET_RAW
# Add the bluetooth group so the container can access BLE devices.
# Compose cannot run a subshell, so set BLUETOOTH_GID in a .env file next to
# this compose file, or replace the default below. Find it on your host with:
# getent group bluetooth | cut -d: -f3
# Commonly 112 on Debian/Ubuntu and 103 on Raspberry Pi OS.
group_add:
- '${BLUETOOTH_GID:-112}'
# Required for Tier 5 BLE recovery (rfkill block/unblock) when BlueZ
# enters a stuck discovery state on Broadcom adapters (RPi). Harmless
# if /dev/rfkill is absent on the host.
devices:
- /dev/rfkill:/dev/rfkill
volumes:
# Your config file — rw so the app can update last_known_weight
- ./config.yaml:/app/config.yaml
# D-Bus socket (required for BlueZ communication)
- /var/run/dbus:/var/run/dbus:ro
# Garmin auth tokens (persisted across container restarts)
# For single-user setups:
- garmin-tokens:/home/node/.garmin_tokens
# For multi-user setups, uncomment and use separate volumes:
# - garmin-tokens-alice:/home/node/.garmin_tokens_alice
# - garmin-tokens-bob:/home/node/.garmin_tokens_bob
# File exporter (persist CSV/JSONL across container restarts):
# - scale-data:/app/data
environment:
- CONTINUOUS_MODE=true
# Secrets referenced via ${ENV_VAR} in config.yaml:
# - GARMIN_EMAIL=your_email@example.com
# - GARMIN_PASSWORD=your_password
# - INFLUXDB_TOKEN=your_token
restart: unless-stopped
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
volumes:
garmin-tokens:
# Uncomment for multi-user setups:
# garmin-tokens-alice:
# garmin-tokens-bob:
# Uncomment for file exporter:
# scale-data: