kopia lustrzana https://github.com/mate-dev/mmrelaynode
To correct
rodzic
8089ce1aaa
commit
a02815be66
|
@ -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).
|
Feel free to explore the **Meshtastic** project on their website: [https://meshtastic.org](https://meshtastic.org).
|
||||||
|
|
||||||
|
git clone https://github.com/mate-dev/mmrelaynode.git
|
||||||
## The project is in the creation phase for now. It is not yet usable!
|
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 groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 -s /bin/bash mesh
|
||||||
RUN pip install --upgrade pip -qq
|
RUN pip install --upgrade pip -qq
|
||||||
USER mesh
|
USER mesh
|
||||||
|
COPY --chown=mesh:mesh meshtastic-matrix-relay /home/mesh/app
|
||||||
WORKDIR /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 pip install -qq -r /home/mesh/app/requirements.txt --no-cache-dir
|
||||||
RUN echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc
|
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"]
|
#ENTRYPOINT ["sh", "-c", "sleep 30 && python main.py"]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
version: "3.8"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
mmrelaynode:
|
mmrelaynode:
|
||||||
build: node
|
build: node
|
||||||
image: mmrelaynode:latest
|
image: mmrelaynode:latest
|
||||||
container_name: mmrelay-node
|
container_name: mmrelay-node
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: "1000:1000"
|
|
||||||
volumes:
|
volumes:
|
||||||
- mesh:/home/mesh
|
- mesh:/home/mesh
|
||||||
ports:
|
ports:
|
||||||
- "4403:4403"
|
- "4403:4403"
|
||||||
networks:
|
networks:
|
||||||
- mesh
|
- mesh
|
||||||
entrypoint: ["sh", "-c", "run.sh"]
|
entrypoint: ["sh", "-c", "run"]
|
||||||
|
|
||||||
mmrelayapp:
|
mmrelayapp:
|
||||||
build: app
|
build: app
|
||||||
image: mmrelayapp:latest
|
image: mmrelayapp:latest
|
||||||
container_name: mmrelay-app
|
container_name: mmrelay-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: "1000:1000"
|
depends_on:
|
||||||
|
- mmrelaynode
|
||||||
volumes:
|
volumes:
|
||||||
- mesh:/home/mesh
|
- mesh:/home/mesh
|
||||||
networks:
|
networks:
|
||||||
- mesh
|
- mesh
|
||||||
command: ["sh", "-c", "sleep 30"]
|
command: ["sleep 30"]
|
||||||
entrypoint: ["python3", "main.py"]
|
entrypoint: ["python3", "main.py"]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mesh:
|
mesh:
|
||||||
external: true
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
mesh:
|
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"
|
LABEL "website"="https://github.com/mate-dev/mmrelaynode"
|
||||||
RUN apk --update add --no-cache g++ shadow && \
|
RUN apk --update add --no-cache g++ shadow
|
||||||
groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
WORKDIR /bin
|
||||||
ADD https://github.com/mate-dev/mmrelaynode/releases/latest/download/meshtasticd_linux_amd64 /usr/bin/meshtasticd
|
ADD https://github.com/mate-dev/mmrelaynode/releases/latest/download/meshtasticd_linux_amd64 /bin/meshtasticd
|
||||||
RUN chmod +x /usr/bin/meshtasticd
|
COPY run .
|
||||||
RUN mkdir /home/mesh/node
|
RUN chmod +x meshtasticd run
|
||||||
COPY run.sh /home/mesh/node/
|
EXPOSE 4403
|
||||||
RUN chown mesh:mesh -R /home/mesh/node && chmod +x /home/mesh/node/run.sh
|
ENTRYPOINT [ "sh", "-c", "run" ]
|
||||||
WORKDIR /home/mesh/node/
|
|
||||||
#ENTRYPOINT ["sh", "-c", "/usr/bin/meshtasticd -d /home/mesh/node -h 12345"]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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