Almost works....

pull/9/head
mate-dev 2023-08-29 00:00:05 +00:00 zatwierdzone przez mate-dev
rodzic d2df947dca
commit 93aeec9ae2
7 zmienionych plików z 37 dodań i 26 usunięć

Wyświetl plik

@ -1,12 +1,15 @@
meshtastic-matrix-relay/gui
meshtastic-matrix-relay/DEVELOPMENT.md
meshtastic-matrix-relay/mmrelay.iss
meshtastic-matrix-relay/example_plugins
meshtastic-matrix-relay/LICENSE
meshtastic-matrix-relay/README.md
meshtastic-matrix-relay/sample_config.yaml
meshtastic-matrix-relay/.gitignore
meshtastic-matrix-relay/.git
meshtastic-matrix-relay/.github
app/meshtastic-matrix-relay/gui
app/meshtastic-matrix-relay/DEVELOPMENT.md
app/meshtastic-matrix-relay/mmrelay.iss
app/meshtastic-matrix-relay/example_plugins
app/meshtastic-matrix-relay/LICENSE
app/meshtastic-matrix-relay/README.md
app/meshtastic-matrix-relay/sample_config.yaml
app/meshtastic-matrix-relay/.gitignore
app/meshtastic-matrix-relay/.git
app/meshtastic-matrix-relay/.github
app/meshtastic-matrix-relay/.pyenv
app/meshtastic-matrix-relay/.vscode
app/meshtastic-matrix-relay/meshtastic.sqlite
app/meshtastic-matrix-relay/__pycache__/
app/meshtastic-matrix-relay/plugins/__pycache__/

2
.gitmodules vendored
Wyświetl plik

@ -1,3 +1,3 @@
[submodule "meshtastic-matrix-relay"]
path = node/meshtastic-matrix-relay
path = app/meshtastic-matrix-relay
url = https://github.com/geoffwhittington/meshtastic-matrix-relay

Wyświetl plik

@ -9,3 +9,6 @@ RUN pip install -qq -r /home/mesh/app/requirements.txt --no-cache-dir
RUN echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc
COPY config.yaml .
#ENTRYPOINT ["sh", "-c", "sleep 30 && python main.py"]

Wyświetl plik

@ -27,3 +27,4 @@ plugins: # Optional plugins
active: true
nodes:
active: true

Wyświetl plik

@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"
services:
mmrelaynode:
build: node
@ -7,16 +7,13 @@ services:
restart: unless-stopped
user: "1000:1000"
volumes:
- mesh:/home/mesh/node
- mesh:/home/mesh
ports:
- "4403:4403"
networks:
- mesh
entrypoint: ["sh", "-c", "/usr/bin/meshtasticd -d /home/mesh/node -h 1234"]
# entrypoint: ["sh", "-c", "/usr/bin/meshtasticd -d /home/mesh/node -h $(grep -Po 'hwid: "\K[^"]+' /home/mesh/app/config.yaml)"]
depends_on:
- mmrelayapp
entrypoint: ["sh", "-c", "run.sh"]
mmrelayapp:
build: app
image: mmrelayapp:latest
@ -24,13 +21,15 @@ services:
restart: unless-stopped
user: "1000:1000"
volumes:
- mesh:/home/mesh/app
- mesh:/home/mesh
networks:
- mesh
entrypoint: ["sh", "-c", "sleep 30 && python main.py"]
- mesh
command: ["sh", "-c", "sleep 30"]
entrypoint: ["python3", "main.py"]
volumes:
mesh:
external: true
networks:
mesh:

Wyświetl plik

@ -1,11 +1,13 @@
FROM frolvlad/alpine-glibc:glibc-2.34 AS node
FROM alpine:3.18 AS node
LABEL "website"="https://github.com/mate-dev/mmrelaynode"
RUN apk --update add --no-cache g++ shadow && \
groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
ADD https://github.com/mate-dev/mmrelaynode/releases/latest/download/meshtasticd_linux_amd64 /usr/bin/meshtasticd
RUN chmod +x /usr/bin/meshtasticd
USER mesh
RUN mkdir /home/mesh/node
RUN mkdir /home/mesh/node
COPY run.sh /home/mesh/node/
RUN chown mesh:mesh -R /home/mesh/node && chmod +x /home/mesh/node/run.sh
WORKDIR /home/mesh/node/
#ENTRYPOINT ["sh", "-c", "/usr/bin/meshtasticd -d /home/mesh/node -h 12345"]

3
node/run.sh 100644
Wyświetl plik

@ -0,0 +1,3 @@
#!/bin/sh
HWID=$(grep 'hwid: "' /home/mesh/app/config.yaml)
/usr/bin/meshtasticd -d /home/mesh/node -h $HWID