-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (40 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
47 lines (40 loc) · 1.84 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
services:
mqtt-proxy:
# Build from source
build: .
# OR use pre-built image
# image: ghcr.io/ln4cy/mqtt-proxy:master
container_name: mqtt-proxy
restart: unless-stopped
environment:
# Interface selection
- INTERFACE_TYPE=${INTERFACE_TYPE:-tcp} # tcp or serial (BLE not yet supported)
# Node connection settings
- TCP_NODE_HOST=${TCP_NODE_HOST:-localhost}
- TCP_NODE_PORT=${TCP_NODE_PORT:-4404}
- SERIAL_PORT=${SERIAL_PORT:-/dev/ttyUSB0}
# Logging
- LOG_LEVEL=${LOG_LEVEL:-INFO}
# Timeout configurations (in seconds)
- TCP_TIMEOUT=${TCP_TIMEOUT:-300} # TCP connection timeout (default: 5 minutes)
- CONFIG_WAIT_TIMEOUT=${CONFIG_WAIT_TIMEOUT:-60} # Wait for node config (default: 1 minute)
- POLL_INTERVAL=${POLL_INTERVAL:-1} # Config polling interval (default: 1 second)
# Health Check Configuration
- HEALTH_CHECK_ACTIVITY_TIMEOUT=${HEALTH_CHECK_ACTIVITY_TIMEOUT:-300} # Max idle time before restart (seconds)
# - HEALTH_CHECK_PROBE_INTERVAL=10 # Short interval for verification
- HEALTH_CHECK_STATUS_INTERVAL=${HEALTH_CHECK_STATUS_INTERVAL:-60} # how often to log status (seconds)
# Message Queue Configuration
- MESH_TRANSMIT_DELAY=${MESH_TRANSMIT_DELAY:-0.5} # Delay between packets (seconds)
healthcheck:
test: [ "CMD-SHELL", "python3 -c 'import os, time; exit(0) if os.path.exists(\"/tmp/healthy\") and time.time() - os.path.getmtime(\"/tmp/healthy\") < 30 else exit(1)'" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
devices:
# Serial devices for Meshtastic nodes (uncomment for serial interface)
- /dev/ttyACM0:/dev/ttyACM0
- /dev/ttyACM1:/dev/ttyACM1
# - /dev/ttyUSB0:/dev/ttyUSB0
privileged: true # Required for serial device access
network_mode: host