From 538fbc230026f1ee93d0e9f246be327df57e8394 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Wed, 12 Apr 2023 19:42:13 +0100 Subject: [PATCH] feat: remove host networking (#724) * feat: remove host networking Remove host networking * Update settings.ini * Update docker-compose.template * Update docker-compose.template --- settings.ini | 4 ++-- templates/docker-compose.template | 32 ++++++++++++------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/settings.ini b/settings.ini index 83ff874b..ae87c476 100644 --- a/settings.ini +++ b/settings.ini @@ -1,7 +1,7 @@ [versions] -FIRMWARE_VERSION=v1.0.0-1 +FIRMWARE_VERSION=v1.0.0-2 DIAGNOSTICS_VERSION=019ba8f CONFIG_VERSION=0b666ba PKTFWD_VERSION=ff950df -GATEWAYRS_VERSION=baf2544 +GATEWAYRS_VERSION=1554b3a MULTIPLEXER_VERSION=a1fc09b diff --git a/templates/docker-compose.template b/templates/docker-compose.template index 6f2850d0..9d338f22 100644 --- a/templates/docker-compose.template +++ b/templates/docker-compose.template @@ -34,9 +34,6 @@ services: - multiplexer restart: always privileged: true - network_mode: host - extra_hosts: - - "multiplexer:127.0.0.1" volumes: - pktfwdr:/var/pktfwd - nebra:/var/nebra @@ -52,9 +49,8 @@ services: restart: always depends_on: - helium-miner - network_mode: host - extra_hosts: - - "helium-miner:127.0.0.1" + expose: + - "1681" labels: io.balena.features.sysfs: 1 io.balena.features.procfs: 1 @@ -66,7 +62,13 @@ services: helium-miner: image: nebraltd/hm-gatewayrs:{{ARCH}}-{{GATEWAYRS_VERSION}} - network_mode: host + depends_on: + - diagnostics + expose: + - "1680" + - "4467" + ports: + - "44158:44158/tcp" cap_add: - SYS_RAWIO privileged: true @@ -77,6 +79,7 @@ services: volumes: - pktfwdr:/var/pktfwd - miner-storage:/var/data + - nebra:/var/nebra diagnostics: image: nebraltd/hm-diag:{{ARCH}}-{{DIAGNOSTICS_VERSION}} @@ -92,9 +95,8 @@ services: - miner-storage:/var/data - watchdog-log:/var/watchdog - nebra:/var/nebra - network_mode: host - extra_hosts: - - "helium-miner:127.0.0.1" + ports: + - "80:80" cap_add: - SYS_RAWIO restart: always @@ -121,13 +123,3 @@ volumes: dbus: nebra: watchdog-log: - -# balena keeps on changing the subnet, making it impossible -# to use extra_hosts for naming host IPs -networks: - default: - driver: bridge - ipam: - driver: default - config: - - subnet: 172.20.0.0/16