From 3b0bac2bfdd1839130d53e60bce462f2cf978723 Mon Sep 17 00:00:00 2001 From: Neil G7UFO Date: Tue, 24 Dec 2024 15:00:47 +0000 Subject: [PATCH] Update documentation and supply example compose file --- README.md | 60 ++------------------------------------ docker-compose-example.yml | 18 ++++++++++++ 2 files changed, 20 insertions(+), 58 deletions(-) create mode 100644 docker-compose-example.yml diff --git a/README.md b/README.md index 9656150..b012a23 100644 --- a/README.md +++ b/README.md @@ -259,65 +259,9 @@ python meshchat.py --identity-base64 "GCN6mMhVemdNIK/fw97C1zvU17qjQPFTXRBotVckeG ## Running via Docker -A very simple example of a `docker-compose.yml` file, generating and passing the .reticulum directory to the container: +A very simple example of a `docker-compose.yml` file can be found [here](./docker-compose-example.yml). -```yaml -services: - reticulum-meshchat: - container_name: reticulum-meshchat - image: ghcr.io/liamcottle/reticulum-meshchat:latest - pull_policy: always - restart: unless-stopped - ports: - - 8000:8000 - volumes: - .reticulum:/config/.reticulum - devices: - - /dev/ttyUSB0:/dev/ttyUSB0 -``` - -To make the web interface accessible from the host, you will need to include the IP (or `0.0.0.0` for all) in the `ports` command, for example: - -```yaml -services: - reticulum-meshchat: - container_name: reticulum-meshchat - image: ghcr.io/liamcottle/reticulum-meshchat:latest - pull_policy: always - restart: unless-stopped - ports: - - 0.0.0.0:8000:8000 - volumes: - .reticulum:/config/.reticulum - devices: - - /dev/ttyUSB0:/dev/ttyUSB0 -``` - -By default the container will run `python meshchat.py --host=0.0.0.0 --reticulum-config-dir=/config/.reticulum --storage-dir=/config/.reticulum/storage --headless`. This can be overridden like: - -```yaml -services: - reticulum-meshchat: - container_name: reticulum-meshchat - image: ghcr.io/liamcottle/reticulum-meshchat:latest - pull_policy: always - command: - - python - - meshchat.py - - --host=0.0.0.0 - - --reticulum-config-dir=/config/.reticulum - - --storage-dir=/config/storage - - --headless - - --some-other-argument - - --and-another-argument - restart: unless-stopped - ports: - - 8000:8000 - volumes: - .my-different-storage-dir:/config/storage - devices: - - /dev/ttyUSB0:/dev/ttyUSB0 -``` +The reticulum config is auto-generated at startup in the `meshchat-config` volume along with the storage db used by meshchat. ## Build Electron Application diff --git a/docker-compose-example.yml b/docker-compose-example.yml new file mode 100644 index 0000000..e8eae7f --- /dev/null +++ b/docker-compose-example.yml @@ -0,0 +1,18 @@ +services: + reticulum-meshchat: + container_name: reticulum-meshchat + image: ghcr.io/liamcottle/reticulum-meshchat:latest + pull_policy: always + restart: unless-stopped + # Make the web interace accessible from the host at 8000. + ports: + - 0.0.0.0:8000:8000 + volumes: + meshchat-config:/config + # Uncomment if you have a USB device connected + # devices: + # - /dev/ttyUSB0:/dev/ttyUSB0 + +volumes: + meshchat-config: +