-
Notifications
You must be signed in to change notification settings - Fork 968
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meshtasticd-docker: simplify, add USB compose
- Loading branch information
Showing
4 changed files
with
59 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Absolute path to the local meshtastic config.yaml file | ||
CONFIG_PATH=/path/to/meshtastic/config.yaml | ||
# USB device to passthrough (`lsusb -t`: look for `ch341`) | ||
USB_DEVICE=/dev/bus/usb/001/037 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
version: "3.7" | ||
# USB-Based Meshtastic container-node! | ||
|
||
# Copy .env.example to .env and set the USB_DEVICE and CONFIG_PATH variables | ||
|
||
services: | ||
meshtastic-node: | ||
build: . | ||
deploy: | ||
mode: replicated | ||
replicas: 4 | ||
networks: | ||
- mesh | ||
|
||
networks: | ||
mesh: | ||
container_name: meshtasticd | ||
|
||
# Pass USB device through to the container | ||
devices: | ||
- "${USB_DEVICE}" | ||
|
||
# Mount local config file and named volume for data persistence | ||
volumes: | ||
- "${CONFIG_PATH}:/etc/meshtasticd/config.yaml:ro" | ||
- "meshtastic_data:/var/lib/meshtasticd" | ||
|
||
# Forward the container’s port 4403 to the host | ||
ports: | ||
- "4403:4403" | ||
|
||
restart: unless-stopped | ||
|
||
volumes: | ||
meshtastic_data: |