mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
- Add MC_TCP_HOST and MC_TCP_PORT options to .env.example with clear documentation for serial vs TCP transport selection - Change default MC_TCP_PORT from 5000 to 5555 (avoids Flask conflict) - Wire MC_TCP_HOST/MC_TCP_PORT through docker-compose.yml from .env (previously was commented-out hardcoded values) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
# mc-webui v2 — single container with direct device access
|
|
services:
|
|
mc-webui:
|
|
build: .
|
|
container_name: mc-webui
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${FLASK_PORT:-5000}:${FLASK_PORT:-5000}"
|
|
# Grant access to serial devices for auto-detection
|
|
# Major 188 = ttyUSB (CP2102, CH340), Major 166 = ttyACM (ESP32-S3)
|
|
device_cgroup_rules:
|
|
- 'c 188:* rmw'
|
|
- 'c 166:* rmw'
|
|
volumes:
|
|
- "${MC_CONFIG_DIR:-./data}:/data:rw"
|
|
- "/dev:/dev"
|
|
environment:
|
|
- MC_SERIAL_PORT=${MC_SERIAL_PORT:-auto}
|
|
- MC_DEVICE_NAME=${MC_DEVICE_NAME:-MeshCore}
|
|
- MC_CONFIG_DIR=/data
|
|
- MC_DB_PATH=/data/mc-webui.db
|
|
- MC_TCP_HOST=${MC_TCP_HOST:-}
|
|
- MC_TCP_PORT=${MC_TCP_PORT:-5555}
|
|
- MC_BACKUP_ENABLED=${MC_BACKUP_ENABLED:-true}
|
|
- MC_BACKUP_HOUR=${MC_BACKUP_HOUR:-2}
|
|
- MC_BACKUP_RETENTION_DAYS=${MC_BACKUP_RETENTION_DAYS:-7}
|
|
- FLASK_HOST=${FLASK_HOST:-0.0.0.0}
|
|
- FLASK_PORT=${FLASK_PORT:-5000}
|
|
- FLASK_DEBUG=${FLASK_DEBUG:-false}
|
|
- TZ=${TZ:-UTC}
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|