kopia lustrzana https://github.com/mate-dev/mmrelaynode
To correct
rodzic
93aeec9ae2
commit
d6e65aaa3c
|
@ -7,5 +7,6 @@ Relay operation is implemented using the **Meshtastic <=> Matrix Relay** [https:
|
|||
|
||||
Feel free to explore the **Meshtastic** project on their website: [https://meshtastic.org](https://meshtastic.org).
|
||||
|
||||
|
||||
## The project is in the creation phase for now. It is not yet usable!
|
||||
git clone https://github.com/mate-dev/mmrelaynode.git
|
||||
cd mmrelaynode && git submodule update --init
|
||||
docker compose -f "docker-compose.yaml" up -d --build
|
||||
|
|
|
@ -3,11 +3,11 @@ LABEL "website"="https://github.com/mate-dev/mmrelaynode"
|
|||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 -s /bin/bash mesh
|
||||
RUN pip install --upgrade pip -qq
|
||||
USER mesh
|
||||
COPY --chown=mesh:mesh meshtastic-matrix-relay /home/mesh/app
|
||||
WORKDIR /home/mesh/app
|
||||
COPY meshtastic-matrix-relay /home/mesh/app
|
||||
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 .
|
||||
COPY --chown=mesh:mesh config.yaml .
|
||||
#ENTRYPOINT ["sh", "-c", "sleep 30 && python main.py"]
|
||||
|
||||
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
version: "3.8"
|
||||
version: "3"
|
||||
services:
|
||||
mmrelaynode:
|
||||
build: node
|
||||
image: mmrelaynode:latest
|
||||
container_name: mmrelay-node
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
|
||||
volumes:
|
||||
- mesh:/home/mesh
|
||||
ports:
|
||||
- "4403:4403"
|
||||
networks:
|
||||
- mesh
|
||||
entrypoint: ["sh", "-c", "run.sh"]
|
||||
entrypoint: ["sh", "-c", "run"]
|
||||
|
||||
mmrelayapp:
|
||||
build: app
|
||||
image: mmrelayapp:latest
|
||||
container_name: mmrelay-app
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
depends_on:
|
||||
- mmrelaynode
|
||||
volumes:
|
||||
- mesh:/home/mesh
|
||||
networks:
|
||||
- mesh
|
||||
command: ["sh", "-c", "sleep 30"]
|
||||
command: ["sleep 30"]
|
||||
entrypoint: ["python3", "main.py"]
|
||||
|
||||
volumes:
|
||||
mesh:
|
||||
external: true
|
||||
|
||||
networks:
|
||||
mesh:
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
FROM alpine:3.18 AS node
|
||||
FROM frolvlad/alpine-glibc:glibc-2.34 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
|
||||
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"]
|
||||
|
||||
|
||||
|
||||
RUN apk --update add --no-cache g++ shadow
|
||||
WORKDIR /bin
|
||||
ADD https://github.com/mate-dev/mmrelaynode/releases/latest/download/meshtasticd_linux_amd64 /bin/meshtasticd
|
||||
COPY run .
|
||||
RUN chmod +x meshtasticd run
|
||||
EXPOSE 4403
|
||||
ENTRYPOINT [ "sh", "-c", "run" ]
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
HWID=$(grep 'hwid: "' /home/mesh/app/config.yaml)
|
||||
if [ -z "$HWID" ]; then
|
||||
HWID=$(shuf -i 1000-9999 -n 1)
|
||||
fi
|
||||
/bin/meshtasticd -d /home/mesh -h $HWID
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
HWID=$(grep 'hwid: "' /home/mesh/app/config.yaml)
|
||||
/usr/bin/meshtasticd -d /home/mesh/node -h $HWID
|
Ładowanie…
Reference in New Issue