mirror of
https://github.com/jorijn/meshcore-stats.git
synced 2026-03-28 17:42:55 +01:00
fix: move serial device config to override file
Docker Compose merges arrays instead of replacing them, so having a default device in docker-compose.yml caused conflicts with override files. Serial device configuration now requires docker-compose.override.yml, which is cleaner since: - Device paths vary per system - TCP transport users don't need devices at all 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,12 @@
|
||||
"Bash(find:*)",
|
||||
"Bash(tree:*)",
|
||||
"Skill(frontend-design)",
|
||||
"Skill(frontend-design:*)"
|
||||
"Skill(frontend-design:*)",
|
||||
"Bash(gh run view:*)",
|
||||
"Bash(gh run list:*)",
|
||||
"Bash(gh release view:*)",
|
||||
"Bash(gh release list:*)",
|
||||
"Bash(gh workflow list:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,18 +171,21 @@ See `meshcore.conf.example` for all available options.
|
||||
|
||||
#### Serial Device Access
|
||||
|
||||
The container needs access to your USB serial device. To customize the device path without modifying the tracked `docker-compose.yml`, create a `docker-compose.override.yml` file (gitignored):
|
||||
For serial transport, the container needs access to your USB serial device. Create a `docker-compose.override.yml` file (gitignored) to specify your device:
|
||||
|
||||
```yaml
|
||||
# docker-compose.override.yml - Local overrides (not tracked in git)
|
||||
# docker-compose.override.yml - Local device configuration (not tracked in git)
|
||||
services:
|
||||
meshcore-stats:
|
||||
devices:
|
||||
- /dev/ttyACM0:/dev/ttyACM0:rw # Your device path
|
||||
- /dev/ttyUSB0:/dev/ttyUSB0:rw # Linux example
|
||||
# - /dev/ttyACM0:/dev/ttyACM0:rw # Alternative Linux device
|
||||
```
|
||||
|
||||
This file is automatically merged with `docker-compose.yml` when running `docker compose up`.
|
||||
|
||||
> **Note**: TCP transport users (e.g., macOS with socat) don't need a devices section - just configure `MESH_TRANSPORT=tcp` in your `meshcore.conf`.
|
||||
|
||||
On the host, ensure the device is accessible:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Use this file for local development with live code changes.
|
||||
#
|
||||
# Usage:
|
||||
# docker compose -f docker-compose.yml -f docker-compose.development.yml up --build
|
||||
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
|
||||
#
|
||||
# This override:
|
||||
# - Builds the image locally instead of pulling from ghcr.io
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# MeshCore Stats - Docker Compose Configuration
|
||||
#
|
||||
# Production deployment using published container image.
|
||||
# For local development, use: docker compose -f docker-compose.yml -f docker-compose.development.yml up
|
||||
# For local development, use: docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
|
||||
#
|
||||
# Prerequisites:
|
||||
# 1. Copy meshcore.conf.example to meshcore.conf and configure
|
||||
# 2. Ensure your user has access to the serial device (dialout group)
|
||||
# 3. Create data directories with correct ownership:
|
||||
# 2. For serial transport: Create docker-compose.override.yml with your device (see README)
|
||||
# 3. Ensure your user has access to the serial device (dialout group)
|
||||
# 4. Create data directories with correct ownership:
|
||||
# mkdir -p ./data/state ./out && sudo chown -R 1000:1000 ./data ./out
|
||||
|
||||
services:
|
||||
@@ -22,10 +23,8 @@ services:
|
||||
env_file:
|
||||
- meshcore.conf
|
||||
|
||||
# Serial device for companion node communication
|
||||
devices:
|
||||
# Update to match your serial device (e.g., /dev/ttyACM0, /dev/cu.usbserial-*)
|
||||
- /dev/ttyUSB0:/dev/ttyUSB0:rw
|
||||
# NOTE: Serial device must be added via docker-compose.override.yml
|
||||
# See README.md for examples. TCP transport users don't need devices.
|
||||
|
||||
volumes:
|
||||
# Persistent storage for SQLite database and circuit breaker state
|
||||
|
||||
Reference in New Issue
Block a user