From f0f5107a5dbab4745f8f1e64df2a76f6bd9e355e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 6 Nov 2022 19:22:20 -0600 Subject: [PATCH 1/3] Added docker compose 4 nodes example --- docker-compose.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 28b8c2ebd..ea1e01a85 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,23 @@ version: "3.7" services: - meshtastic-device: + meshtastic-node-1: build: . + command: ["./meshtasticd_linux_amd64", "--hwid", "12:2E:9C:CF:65:7C"] + ports: + - 4403:4403 + meshtastic-node-2: + build: . + command: ["./meshtasticd_linux_amd64", "--hwid", "93:DD:85:BB:36:54"] + ports: + - 4404:4403 + meshtastic-node-3: + build: . + command: ["./meshtasticd_linux_amd64", "--hwid", "05:97:96:0A:0B:B4"] + ports: + - 4405:4403 + meshtastic-node-4: + build: . + command: ["./meshtasticd_linux_amd64", "--hwid", "07:67:32:9D:84:00"] + ports: + - 4406:4403 From b13eaee6b3501da771ed1cb7aee90da72f3e168a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 7 Nov 2022 13:28:37 -0600 Subject: [PATCH 2/3] More fun --- Dockerfile | 5 +++-- docker-compose.yml | 28 +++++++++------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 01d262ce3..20460b175 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,6 @@ RUN . ~/.platformio/penv/bin/activate; cd firmware; sh ./bin/build-native.sh FROM frolvlad/alpine-glibc WORKDIR /root/ COPY --from=builder /firmware/release/meshtasticd_linux_amd64 ./ -RUN apk --update add --no-cache g++ -CMD ["./meshtasticd_linux_amd64"] +RUN apk --update add --no-cache g++ && \ + apk add openssl +CMD sh -cx "./meshtasticd_linux_amd64 --hwid '$RANDOM'" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ea1e01a85..f137139c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,23 +1,13 @@ version: "3.7" services: - meshtastic-node-1: + meshtastic-node: build: . - command: ["./meshtasticd_linux_amd64", "--hwid", "12:2E:9C:CF:65:7C"] - ports: - - 4403:4403 - meshtastic-node-2: - build: . - command: ["./meshtasticd_linux_amd64", "--hwid", "93:DD:85:BB:36:54"] - ports: - - 4404:4403 - meshtastic-node-3: - build: . - command: ["./meshtasticd_linux_amd64", "--hwid", "05:97:96:0A:0B:B4"] - ports: - - 4405:4403 - meshtastic-node-4: - build: . - command: ["./meshtasticd_linux_amd64", "--hwid", "07:67:32:9D:84:00"] - ports: - - 4406:4403 + deploy: + mode: replicated + replicas: 80 + networks: + - mesh + +networks: + mesh: \ No newline at end of file From e122232761826a096e9dc68f479edc74019245fe Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 7 Nov 2022 13:29:34 -0600 Subject: [PATCH 3/3] Removed defunct line --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20460b175..0ce4e3326 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,5 @@ RUN . ~/.platformio/penv/bin/activate; cd firmware; sh ./bin/build-native.sh FROM frolvlad/alpine-glibc WORKDIR /root/ COPY --from=builder /firmware/release/meshtasticd_linux_amd64 ./ -RUN apk --update add --no-cache g++ && \ - apk add openssl +RUN apk --update add --no-cache g++ CMD sh -cx "./meshtasticd_linux_amd64 --hwid '$RANDOM'" \ No newline at end of file