From eeca67f6eae43cc3dc93356dbe15d85be85e5159 Mon Sep 17 00:00:00 2001 From: l5y <220195275+l5yth@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:11:14 +0200 Subject: [PATCH] Add linux/armv7 images and configuration support (#201) --- .env.example | 3 +++ .github/workflows/docker.yml | 7 +++++-- README.md | 1 + configure.sh | 9 +++++++++ docker-compose.yml | 4 ++-- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index ef8352f..99b03b5 100644 --- a/.env.example +++ b/.env.example @@ -56,6 +56,9 @@ MATRIX_ROOM='#meshtastic-berlin:matrix.org' # Debug mode (0=off, 1=on) DEBUG=0 +# Docker image architecture (linux-amd64, linux-arm64, linux-armv7) +POTATOMESH_IMAGE_ARCH=linux-amd64 + # Docker Compose networking profile # Leave unset for Linux hosts (default host networking). # Set to "bridge" on Docker Desktop (macOS/Windows) if host networking diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6bd84c9..a444b2b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,6 +33,7 @@ jobs: architecture: - { name: linux-amd64, platform: linux/amd64, label: "Linux x86_64" } - { name: linux-arm64, platform: linux/arm64, label: "Linux ARM64" } + - { name: linux-armv7, platform: linux/arm/v7, label: "Linux ARMv7" } steps: - name: Checkout repository @@ -161,11 +162,13 @@ jobs: echo "### 🌐 Web Application" >> $GITHUB_STEP_SUMMARY echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web-linux-amd64:latest\` - Linux x86_64" >> $GITHUB_STEP_SUMMARY echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web-linux-arm64:latest\` - Linux ARM64" >> $GITHUB_STEP_SUMMARY + echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web-linux-armv7:latest\` - Linux ARMv7" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - + # Ingestor images echo "### 📡 Ingestor Service" >> $GITHUB_STEP_SUMMARY echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-ingestor-linux-amd64:latest\` - Linux x86_64" >> $GITHUB_STEP_SUMMARY echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-ingestor-linux-arm64:latest\` - Linux ARM64" >> $GITHUB_STEP_SUMMARY + echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-ingestor-linux-armv7:latest\` - Linux ARMv7" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - \ No newline at end of file + diff --git a/README.md b/README.md index ac34a1f..8dd8c44 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Live demo for Berlin #MediumFast: [potatomesh.net](https://potatomesh.net) ![screenshot of the third version](./scrot-0.3.png) + ## Web App Requires Ruby for the Sinatra web app and SQLite3 for the app's database. diff --git a/configure.sh b/configure.sh index 2b6756a..389bf03 100755 --- a/configure.sh +++ b/configure.sh @@ -62,6 +62,7 @@ MAP_CENTER_LON=$(grep "^MAP_CENTER_LON=" .env 2>/dev/null | cut -d'=' -f2- | tr MAX_NODE_DISTANCE_KM=$(grep "^MAX_NODE_DISTANCE_KM=" .env 2>/dev/null | cut -d'=' -f2- | tr -d '"' || echo "50") MATRIX_ROOM=$(grep "^MATRIX_ROOM=" .env 2>/dev/null | cut -d'=' -f2- | tr -d '"' || echo "") API_TOKEN=$(grep "^API_TOKEN=" .env 2>/dev/null | cut -d'=' -f2- | tr -d '"' || echo "") +POTATOMESH_IMAGE_ARCH=$(grep "^POTATOMESH_IMAGE_ARCH=" .env 2>/dev/null | cut -d'=' -f2- | tr -d '"' || echo "linux-amd64") echo "📍 Location Settings" echo "-------------------" @@ -81,6 +82,12 @@ echo "💬 Optional Settings" echo "-------------------" read_with_default "Matrix Room (optional, e.g., #meshtastic-berlin:matrix.org)" "$MATRIX_ROOM" MATRIX_ROOM +echo "" +echo "🛠 Docker Settings" +echo "------------------" +echo "Specify the Docker image architecture for your host (linux-amd64, linux-arm64, linux-armv7)." +read_with_default "Docker image architecture" "$POTATOMESH_IMAGE_ARCH" POTATOMESH_IMAGE_ARCH + echo "" echo "🔐 Security Settings" echo "-------------------" @@ -124,6 +131,7 @@ update_env "MAP_CENTER_LON" "$MAP_CENTER_LON" update_env "MAX_NODE_DISTANCE_KM" "$MAX_NODE_DISTANCE_KM" update_env "MATRIX_ROOM" "\"$MATRIX_ROOM\"" update_env "API_TOKEN" "$API_TOKEN" +update_env "POTATOMESH_IMAGE_ARCH" "$POTATOMESH_IMAGE_ARCH" # Add other common settings if they don't exist if ! grep -q "^MESH_SERIAL=" .env; then @@ -148,6 +156,7 @@ echo " Channel: $DEFAULT_CHANNEL" echo " Frequency: $DEFAULT_FREQUENCY" echo " Matrix Room: ${MATRIX_ROOM:-'Not set'}" echo " API Token: ${API_TOKEN:0:8}..." +echo " Docker Image Arch: $POTATOMESH_IMAGE_ARCH" echo "" echo "🚀 You can now start PotatoMesh with:" echo " docker-compose up -d" diff --git a/docker-compose.yml b/docker-compose.yml index 3e2cab3..f17e1e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ x-web-base: &web-base - image: ghcr.io/l5yth/potato-mesh-web-linux-amd64:latest + image: ghcr.io/l5yth/potato-mesh-web-${POTATOMESH_IMAGE_ARCH:-linux-amd64}:latest environment: SITE_NAME: ${SITE_NAME:-My Meshtastic Network} DEFAULT_CHANNEL: ${DEFAULT_CHANNEL:-#MediumFast} @@ -24,7 +24,7 @@ x-web-base: &web-base cpus: '0.25' x-ingestor-base: &ingestor-base - image: ghcr.io/l5yth/potato-mesh-ingestor-linux-amd64:latest + image: ghcr.io/l5yth/potato-mesh-ingestor-${POTATOMESH_IMAGE_ARCH:-linux-amd64}:latest environment: MESH_SERIAL: ${MESH_SERIAL:-/dev/ttyACM0} MESH_SNAPSHOT_SECS: ${MESH_SNAPSHOT_SECS:-60}