From 805516603f1ed1486078f5b519b2e8d6b7b7e09e Mon Sep 17 00:00:00 2001 From: Jeremiah K <17190268+jeremiah-k@users.noreply.github.com> Date: Sat, 9 Sep 2023 17:24:15 -0500 Subject: [PATCH] Dockerfile & docker-compose changes --- app/Dockerfile | 1 + docker-compose.yaml | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index 534800e..10459ae 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -4,6 +4,7 @@ RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 -s /bin/bash mesh RUN pip install --upgrade pip -qq ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh RUN chmod +x /usr/local/bin/wait-for-it.sh +RUN ln -s /home/mesh/.local/bin/meshtastic /bin/meshtastic USER mesh COPY --chown=mesh:mesh meshtastic-matrix-relay /home/mesh/app WORKDIR /home/mesh/app diff --git a/docker-compose.yaml b/docker-compose.yaml index d12dceb..58b144a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -14,8 +14,10 @@ services: - mesh entrypoint: ["sh", "-c", "meshtasticd"] environment: - MESHTASTIC_COMMAND_1: "network.wifi_enabled true --set network.wifi_ssid 'my network' --set network.wifi_psk mypassword" - # You can add as many MESHTASTIC_COMMAND_X as you need, they will be executed in order + MESHTASTIC_COMMAND_1: "--set-owner 'LongName' --set-owner-short 'SHRT' --set-url https://meshtastic.org/e/#CgMSAQESDAgBOAFAA0gBUB5oAQ" + MESHTASTIC_COMMAND_2: "--set mqtt.enabled true --set mqtt.address mqtt.meshtastic.org --set mqtt.username meshdev --set mqtt.password large4cats" + MESHTASTIC_COMMAND_3: "--ch-set uplink_enabled true --ch-set downlink_enabled true --ch-index 3" + # You can add as many MESHTASTIC_COMMAND_X as you need, they will be executed in order with a 30 second delay between mmrelayapp: build: app @@ -33,7 +35,14 @@ services: MATRIX_HOMESERVER: "https://example.matrix.org" MATRIX_ACCESS_TOKEN: "your_access_token" MATRIX_BOT_USER_ID: "@botuser:example.matrix.org" - MATRIX_ROOMS_ID_1: "#someroomalias1:example.matrix.org" # Need at least 1 room & channel mapped, maximum 8 + MESHTASTIC_CONNECTION_TYPE: "serial" # "serial" or "network" + MESHTASTIC_SERIAL_PORT: "/dev/ttyUSB0" + MESHTASTIC_HOST: "meshtastic.local" + MESHTASTIC_MESHNET_NAME: "Your Meshnet Name" + MESHTASTIC_BROADCAST_ENABLED: "true" + LOGGING_LEVEL: "info" + # Need at least 1 room & channel mapped, maximum 8 + MATRIX_ROOMS_ID_1: "#someroomalias1:example.matrix.org" MATRIX_ROOMS_MESHTASTIC_CHANNEL_1: "0" # MATRIX_ROOMS_ID_2: "#someroomalias2:example.matrix.org" # MATRIX_ROOMS_MESHTASTIC_CHANNEL_2: "1" @@ -49,12 +58,7 @@ services: # MATRIX_ROOMS_MESHTASTIC_CHANNEL_7: "6" # MATRIX_ROOMS_ID_8: "#someroomalias8:example.matrix.org" # MATRIX_ROOMS_MESHTASTIC_CHANNEL_8: "7" - MESHTASTIC_CONNECTION_TYPE: "serial" # "serial" or "network" - MESHTASTIC_SERIAL_PORT: "/dev/ttyUSB0" - MESHTASTIC_HOST: "meshtastic.local" - MESHTASTIC_MESHNET_NAME: "Your Meshnet Name" - MESHTASTIC_BROADCAST_ENABLED: "true" - LOGGING_LEVEL: "info" + # Plugin environment variables # HEALTH_PLUGIN_ACTIVE: "true" # MAP_PLUGIN_ACTIVE: "true"