From 9193d113feba5ef06f4c760abae5d34a9e619230 Mon Sep 17 00:00:00 2001 From: jkingsman Date: Sun, 22 Feb 2026 14:02:11 -0800 Subject: [PATCH] Tighten up docker compose and docs --- README.md | 10 ++++++---- docker-compose.yaml | 23 ++++++++++------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b39a3f2..40f4875 100644 --- a/README.md +++ b/README.md @@ -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
Systemd Service (Linux) +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 diff --git a/docker-compose.yaml b/docker-compose.yaml index f0897ac..620a3b2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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