mirror of
https://github.com/do6uk/meshcore_multitcp.git
synced 2026-04-21 03:53:36 +00:00
docker support
This commit is contained in:
parent
05ef6e84f9
commit
091ffea1a5
4 changed files with 59 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.github/
|
||||
docker-build.sh
|
||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM python:3-alpine
|
||||
|
||||
RUN apk --no-cache upgrade
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir meshcore
|
||||
|
||||
COPY meshcore_multitcp_packets.py meshcore_multitcp.py ./
|
||||
|
||||
RUN mkdir /data
|
||||
|
||||
ENTRYPOINT ["python3", "meshcore_multitcp.py"]
|
||||
26
README.md
26
README.md
|
|
@ -13,6 +13,8 @@ multiplexing a mescore tcp-connected companion to multiple clients as cli-chat,
|
|||
- python3
|
||||
- python meshcore package (pip install meshcore)
|
||||
|
||||
alternatively: docker
|
||||
|
||||
## usage
|
||||
|
||||
python3 meshcore_multitcp.py -d Device-IP:PORT -s Server-IP:PORT [-q|-v]
|
||||
|
|
@ -32,6 +34,30 @@ python3 meshcore_multitcp.py -d Device-IP:PORT -s Server-IP:PORT [-q|-v]
|
|||
|
||||
After meshcore_multitcp is running you can connect your clients to IP/port set with -s
|
||||
|
||||
## docker
|
||||
|
||||
```bash
|
||||
# build
|
||||
docker build -t meshcore-multitcp .
|
||||
|
||||
# run
|
||||
docker run -p 5000:5000 meshcore-multitcp -d Device-IP:PORT -s 0.0.0.0:5000 [-q|-v]
|
||||
```
|
||||
|
||||
### docker compose
|
||||
|
||||
Copy and edit `docker-compose.yml` to match your setup:
|
||||
|
||||
- `-d` - IP and port of your companion radio
|
||||
- `-s 0.0.0.0:PORT` - port the proxy listens on for clients (always use `0.0.0.0` inside the container)
|
||||
- `-f 0.0.0.0:PORT` - port for store & forward clients (requires `-sql`)
|
||||
- `ports` - use `host-ip:port:port` to bind to a specific host interface, or `port:port` for all interfaces
|
||||
- `volumes` - mount a host path to `/data` to persist the SQLite database across restarts
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## S&F - store & forward messages
|
||||
|
||||
Using option -sql meshcore-multitcp will store all incomming private & channel messages in local sqlite3-database.
|
||||
|
|
|
|||
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
services:
|
||||
meshcore-multitcp:
|
||||
image: ghcr.io/luk-ada/meshcore_multitcp:latest
|
||||
pull_refresh_after: 12h
|
||||
# -d meshcore device IP and port
|
||||
# -s/-f use 0.0.0.0 and specific port to listen for server connections
|
||||
# -sql enable SQL database for device info and stats
|
||||
command: >
|
||||
-d 192.168.0.21:5000
|
||||
-s 0.0.0.0:5010
|
||||
-f 0.0.0.0:5011
|
||||
-sql
|
||||
ports:
|
||||
- "10.100.100.10:5010:5010" # for multi IP support, bind to specific IP
|
||||
- "5011:5011" # bind to all interfaces for forwarding
|
||||
volumes:
|
||||
- ./data:/data
|
||||
restart: unless-stopped
|
||||
Loading…
Add table
Add a link
Reference in a new issue