mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-07 05:45:11 +02:00
Tighten up docker compose and docs
This commit is contained in:
@@ -94,7 +94,7 @@ Access at http://localhost:8000
|
||||
|
||||
> **Note:** BLE-in-docker is outside the scope of this README, but the env vars should all still work.
|
||||
|
||||
Edit `docker-compose.yaml` to uncomment your transport (Serial, TCP, or BLE). For serial connections, you'll also need to uncomment the `devices` section to pass through the USB device. Then:
|
||||
Edit `docker-compose.yaml` to set a serial device for passthrough, or uncomment your transport (serial or TCP).Then:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
@@ -139,7 +139,7 @@ docker compose down
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run uvicorn app.main:app --reload
|
||||
uv run uvicorn app.main:app --reload # autodetects serial port
|
||||
|
||||
# Or with explicit serial port
|
||||
MESHCORE_SERIAL_PORT=/dev/ttyUSB0 uv run uvicorn app.main:app --reload
|
||||
@@ -209,11 +209,11 @@ uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --ssl-keyfile=key.pem --s
|
||||
For Docker Compose, generate the cert and add the volume mounts and command override to `docker-compose.yaml`:
|
||||
|
||||
```bash
|
||||
# generate TLS cert
|
||||
# generate snakeoil TLS cert
|
||||
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'
|
||||
```
|
||||
|
||||
Then add to the `remoteterm` service in `docker-compose.yaml` (keep your existing `./data:/app/data` mount):
|
||||
Then add the key and cert to the `remoteterm` service in `docker-compose.yaml`, and add an explicit launch command that uses them:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
@@ -229,6 +229,8 @@ Accept the browser warning, or use [mkcert](https://github.com/FiloSottile/mkcer
|
||||
<details>
|
||||
<summary>Systemd Service (Linux)</summary>
|
||||
|
||||
Assumes you're running from `/opt/remoteterm`; update commands and `remoteterm.service` if you're running elsewhere.
|
||||
|
||||
```bash
|
||||
# Create service user
|
||||
sudo useradd -r -m -s /bin/false remoteterm
|
||||
|
||||
+10
-13
@@ -7,24 +7,21 @@ services:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
# Radio connection — set ONE of the following transport options:
|
||||
################################################
|
||||
# Set your serial device for passthrough here! #
|
||||
################################################
|
||||
devices:
|
||||
- /dev/ttyUSB0:/dev/ttyUSB0
|
||||
|
||||
# Serial (USB) — also uncomment the `devices` section below
|
||||
environment:
|
||||
MESHCORE_DATABASE_PATH: data/meshcore.db
|
||||
# Radio connection -- optional if you map just a single serial device above, as the app will autodetect
|
||||
|
||||
# Serial (USB)
|
||||
# MESHCORE_SERIAL_PORT: /dev/ttyUSB0
|
||||
# MESHCORE_SERIAL_BAUDRATE: 115200
|
||||
|
||||
# TCP
|
||||
# MESHCORE_TCP_HOST: 192.168.1.100
|
||||
# MESHCORE_TCP_PORT: 4000
|
||||
|
||||
# BLE
|
||||
# MESHCORE_BLE_ADDRESS: AA:BB:CC:DD:EE:FF
|
||||
# MESHCORE_BLE_PIN: ""
|
||||
|
||||
MESHCORE_LOG_LEVEL: INFO
|
||||
MESHCORE_DATABASE_PATH: data/meshcore.db
|
||||
# Uncomment to pass through a USB serial device:
|
||||
# devices:
|
||||
# - /dev/ttyUSB0:/dev/ttyUSB0
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user