newFW
mate-dev 2023-08-28 16:50:17 +00:00 zatwierdzone przez mate-dev
rodzic e4273b6c85
commit e69ffa9464
5 zmienionych plików z 47 dodań i 49 usunięć

12
.dockerignore 100644
Wyświetl plik

@ -0,0 +1,12 @@
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

Wyświetl plik

@ -1,21 +1,11 @@
FROM python:3.11-slim-bookworm
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
VOLUME /home/mesh
COPY ./meshtastic-matrix-relay /home/mesh/app
WORKDIR /home/mesh/app
COPY meshtastic-matrix-relay /home/mesh/app
COPY config.yaml .
RUN pip install -qq -r /home/mesh/app/requirements.txt
USER root
RUN chown -R mesh:mesh /mnt
#RUN bash -c "for f in /home/mesh/{*,.*}; do cp -r "$f" /mnt/; done"
COPY ./config.yaml /mnt/app/config.yaml
RUN chown -R mesh:mesh /mnt
USER mesh
WORKDIR /home/mesh
RUN echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc
#ENTRYPOINT ["sh", "-c", "sleep 30 && python main.py"]

Wyświetl plik

@ -1,11 +1,12 @@
FROM frolvlad/alpine-glibc:glibc-2.34
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
#ENTRYPOINT ["sh", "-c", "/usr/bin/meshtasticd -d /home/mesh/node -h 12345"]
WORKDIR /home/mesh

Wyświetl plik

@ -15,6 +15,7 @@ meshtastic:
host: "localhost" # Do not change!
meshnet_name: "Your Meshnet Name" # This is displayed in full on Matrix, but is truncated when sent to a Meshnet
broadcast_enabled: true
hwid: "12345" # Change to your Hardware ID
logging:
level: "info"

Wyświetl plik

@ -1,37 +1,31 @@
version: '3'
version: "3.7"
services:
mmrelayapp:
build:
context: .
dockerfile: Dockerfile_app
image: mmrelayapp:latest
container_name: mmrelay-app
restart: unless-stopped
user: 1000:1000
volumes:
- mesh_volume:/home/mesh
networks:
- mesh_net
command: sh -c 'echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc'
entrypoint: ["sh", "-c", "sleep 30 && python app/main.py"]
mmrelaynode:
build:
context: .
dockerfile: Dockerfile_node
image: mmrelaynode:latest
container_name: mmrelay-node
restart: unless-stopped
user: 1000:1000
networks:
- mesh_net
# volumes:
# - mesh_volume:/home/mesh
user: "1000:1000"
volumes:
- mesh:/home/mesh
ports:
- 4403:4403
entrypoint: ["sh", "-cx", "/usr/bin/meshtasticd -d /home/mesh --hwid '12345'"] #change to your own hardware id
- "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)"]
mmrelayapp:
image: mmrelayapp:latest
container_name: mmrelay-app
restart: unless-stopped
user: "1000:1000"
volumes:
- mesh:/home/mesh
networks:
- mesh
entrypoint: ["sh", "-c", "sleep 30 && python main.py"]
volumes:
mesh:
networks:
mesh_net:
volumes:
mesh_volume:
mesh: