forked from moustik/xbee2mqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
48 lines (41 loc) · 1.51 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
48 lines (41 loc) · 1.51 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
services:
xbee2mqtt:
build: .
container_name: xbee2mqtt-dev
restart: unless-stopped
# Serial device access - update to match your XBee device
# Common options:
# Linux USB-to-Serial: /dev/ttyUSB0
# Raspberry Pi GPIO UART: /dev/ttyAMA0 or /dev/serial0
# Windows (Docker Desktop/WSL2): /dev/ttyS<N> where N = COM port number - 1
# COM1 -> /dev/ttyS0, COM2 -> /dev/ttyS1, COM5 -> /dev/ttyS4, etc.
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
# For Windows COM ports via /dev/ttyS*, uncomment:
# - /dev/ttyS4:/dev/ttyS4
# For Raspberry Pi GPIO UART, uncomment:
# - /dev/ttyAMA0:/dev/ttyAMA0
# - /dev/serial0:/dev/serial0
# Privileged mode for serial port access (alternative to devices)
# Required on Windows/WSL2 for serial port access
privileged: true
volumes:
# Mount config directory
- ./config:/app/config:ro
# Mount var directory for logs and PID file
- ./var:/app/var
environment:
# Optional: Override logging level (10=DEBUG, 20=INFO, 30=WARNING, 40=ERROR)
- LOGGING_LEVEL=20
# Network mode for MQTT connectivity
# Note: 'host' mode doesn't work on Docker Desktop for Windows
# Using 'bridge' mode - container can reach external IPs like 192.168.x.x
network_mode: bridge
# Add extra host for accessing Windows host
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"