Updated container networking.

This commit is contained in:
Raphaël Numbus
2026-02-20 11:04:09 +01:00
parent 61d0fbd339
commit 40265e8c81
6 changed files with 28 additions and 91 deletions
+8 -18
View File
@@ -23,6 +23,10 @@ helper.mkPodmanService {
};
};
extraConfig = {
};
composeText = ''
services:
home-assistant:
@@ -30,8 +34,7 @@ helper.mkPodmanService {
container_name: home-assistant
hostname: home-assistant
networks:
home-assistant_frontend:
home-assistant_backend:
home-assistant:
ports:
- "${cfg.port}:8123/tcp"
volumes:
@@ -43,31 +46,18 @@ ${lib.optionalString (cfg.devices != []) ''
${lib.concatStringsSep "\n" (map (d: " - \"${d}\"") cfg.devices)}
''}
restart: unless-stopped
home-assistant-mqtt:
image: docker.io/library/eclipse-mosquitto:latest
container_name: home-assistant-mqtt
hostname: home-assistant-mqtt
networks:
home-assistant_backend:
home-assistant:
volumes:
- /mnt/config/mosquitto:/mosquitto
restart: unless-stopped
networks:
home-assistant_frontend:
name: home-assistant_frontend
home-assistant:
name: home-assistant
driver: bridge
ipam:
config:
- subnet: "10.89.5.0/24"
gateway: "10.89.5.254"
home-assistant_backend:
name: home-assistant_backend
driver: bridge
ipam:
config:
- subnet: "10.89.6.0/24"
gateway: "10.89.6.254"
'';
}