Skip to content

Commit

Permalink
feat: remove host networking (#724)
Browse files Browse the repository at this point in the history
* feat: remove host networking

Remove host networking

* Update settings.ini

* Update docker-compose.template

* Update docker-compose.template
  • Loading branch information
shawaj authored Apr 12, 2023
1 parent f1574db commit 538fbc2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -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
32 changes: 12 additions & 20 deletions templates/docker-compose.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -77,6 +79,7 @@ services:
volumes:
- pktfwdr:/var/pktfwd
- miner-storage:/var/data
- nebra:/var/nebra

diagnostics:
image: nebraltd/hm-diag:{{ARCH}}-{{DIAGNOSTICS_VERSION}}
Expand All @@ -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
Expand All @@ -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

0 comments on commit 538fbc2

Please sign in to comment.