-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (69 loc) · 2.01 KB
/
docker-compose.yml
File metadata and controls
86 lines (69 loc) · 2.01 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
services:
rtl433-bridge:
image: bullitt168/rtl433-hass-bridge:latest
container_name: rtl433-hass-bridge
hostname: rtl433-bridge
# Restart policy for robustness
restart: unless-stopped
# Environment configuration
environment:
# MQTT Configuration (Required)
- MQTT_HOST=${MQTT_HOST}
- MQTT_PORT=${MQTT_PORT:-1883}
- MQTT_USERNAME=${MQTT_USERNAME}
- MQTT_PASSWORD=${MQTT_PASSWORD}
# TLS Configuration (Optional)
# - MQTT_CA_CERT=/certs/ca.crt
# - MQTT_CERT=/certs/client.crt
# - MQTT_KEY=/certs/client.key
# RTL_433 Configuration
- RTL_TOPIC=${RTL_TOPIC:-rtl_433/+/events}
- DEVICE_TOPIC_SUFFIX=${DEVICE_TOPIC_SUFFIX:-devices[/type][/model][/subtype][/channel][/id]}
# Home Assistant Configuration
- DISCOVERY_PREFIX=${DISCOVERY_PREFIX:-homeassistant}
- DISCOVERY_INTERVAL=${DISCOVERY_INTERVAL:-600}
- EXPIRE_AFTER=${EXPIRE_AFTER:-}
- FORCE_UPDATE=${FORCE_UPDATE:-false}
- RETAIN=${RETAIN:-true}
# Filtering (Optional)
# - DEVICE_IDS=123 456 789
# Logging
- DEBUG=${DEBUG:-false}
- QUIET=${QUIET:-false}
# System
- TZ=${TZ:-UTC}
# Optional volumes for certificates and logs
volumes:
- rtl433_logs:/app/logs
# - ./certs:/certs:ro
# - ./config:/app/config:ro
# Security
user: "1000:1000"
read_only: true
tmpfs:
- /tmp
# Resource limits
deploy:
resources:
limits:
memory: 128M
cpus: '0.5'
reservations:
memory: 64M
cpus: '0.1'
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Health check
healthcheck:
test: ["CMD", "pgrep", "-f", "rtl_433_mqtt_hass.py"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
rtl433_logs:
driver: local