Skip to content

Commit

Permalink
Update documentation and supply example compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
g7ufo committed Dec 24, 2024
1 parent 1835a30 commit 3b0bac2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 58 deletions.
60 changes: 2 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```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
```
A very simple example of a `docker-compose.yml` file can be found [here](./docker-compose-example.yml).

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

Expand Down
18 changes: 18 additions & 0 deletions docker-compose-example.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 3b0bac2

Please sign in to comment.