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
+2 -5
View File
@@ -32,8 +32,7 @@ helper.mkPodmanService {
hostname: frigate
shm_size: "256mb"
networks:
home-assistant_frontend:
home-assistant_backend:
home-assistant:
ports:
- "${cfg.port}:8971/tcp"
volumes:
@@ -54,9 +53,7 @@ ${lib.concatStringsSep "\n" (map (d: " - \"${d}\"") cfg.devices)}
restart: unless-stopped
networks:
home-assistant_backend:
external: true
home-assistant_frontend:
home-assistant:
external: true
'';
}
+4 -19
View File
@@ -20,8 +20,7 @@ helper.mkPodmanService {
container_name: gitea-server
hostname: gitea-server
networks:
gitea_frontend:
gitea_backend:
gitea:
ports:
- "${cfg.port}:3000/tcp"
volumes:
@@ -39,13 +38,12 @@ helper.mkPodmanService {
depends_on:
- gitea-database
restart: unless-stopped
gitea-database:
image: docker.io/library/postgres:14
container_name: gitea-database
hostname: gitea-database
networks:
gitea_backend:
gitea:
volumes:
- gitea_database:/var/lib/postgresql/data
environment:
@@ -53,24 +51,11 @@ helper.mkPodmanService {
- POSTGRES_PASSWORD=$DB_PASSWORD
- POSTGRES_DB=$DB_NAME
restart: unless-stopped
volumes:
gitea_database:
networks:
gitea_frontend:
name: gitea_frontend
gitea:
name: gitea
driver: bridge
ipam:
config:
- subnet: "10.89.3.0/24"
gateway: "10.89.3.254"
gitea_backend:
name: gitea_backend
driver: bridge
ipam:
config:
- subnet: "10.89.4.0/24"
gateway: "10.89.4.254"
'';
}
+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"
'';
}
+7 -23
View File
@@ -21,10 +21,9 @@ helper.mkPodmanService {
hostname: immich-server
user: '1000:1000'
networks:
immich_frontend:
immich_backend:
immich:
ports:
- "${cfg.port}:2283/tcp" #http
- "${cfg.port}:2283/tcp"
volumes:
- ${cfg.dataDir}:/data
- /etc/localtime:/etc/localtime:ro
@@ -40,14 +39,13 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:latest
container_name: immich-machine-learning
hostname: immich-machine-learning
user: '1000:1000'
networks:
immich_backend:
immich:
volumes:
- ${cfg.configDir}/machine-learning:/cache
env_file:
@@ -59,14 +57,13 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
immich-redis:
image: docker.io/valkey/valkey:8-bookworm
container_name: immich-redis
hostname: immich-redis
user: '1000:1000'
networks:
immich_backend:
immich:
healthcheck:
test: redis-cli ping || exit 1
security_opt:
@@ -74,14 +71,13 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
immich-database:
image: ghcr.io/immich-app/postgres:14
container_name: immich-database
hostname: immich-database
user: '1000:1000'
networks:
immich_backend:
immich:
shm_size: 128mb
volumes:
- ${cfg.configDir}/database:/var/lib/postgresql/data
@@ -97,21 +93,9 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
networks:
immich_frontend:
name: immich_frontend
immich:
name: immich
driver: bridge
ipam:
config:
- subnet: "10.89.7.0/24"
gateway: "10.89.7.254"
immich_backend:
name: immich_backend
driver: bridge
ipam:
config:
- subnet: "10.89.8.0/24"
gateway: "10.89.8.254"
'';
}
+3 -7
View File
@@ -22,18 +22,14 @@ helper.mkPodmanService {
container_name: it-tools
hostname: it-tools
networks:
it-tools_frontend:
it-tools:
ports:
- "${cfg.port}:80/tcp"
restart: unless-stopped
networks:
it-tools_frontend:
name: it-tools_frontend
it-tools:
name: it-tools
driver: bridge
ipam:
config:
- subnet: "10.89.9.0/24"
gateway: "10.89.9.254"
'';
}
+4 -19
View File
@@ -23,8 +23,7 @@ helper.mkPodmanService {
container_name: passbolt-server
hostname: passbolt-server
networks:
passbolt_frontend:
passbolt_backend:
passbolt:
ports:
- "${cfg.port}:4433/tcp"
volumes:
@@ -61,13 +60,12 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
passbolt-database:
image: docker.io/library/mariadb:12.2
container_name: passbolt-database
hostname: passbolt-database
networks:
passbolt_backend:
passbolt:
volumes:
- passbolt-database:/var/lib/mysql
environment:
@@ -80,26 +78,13 @@ helper.mkPodmanService {
cap_drop:
- NET_RAW
restart: unless-stopped
volumes:
passbolt-database:
passbolt-gpg:
passbolt-jwt:
networks:
passbolt_frontend:
name: passbolt_frontend
passbolt:
name: passbolt
driver: bridge
ipam:
config:
- subnet: "10.89.12.0/24"
gateway: "10.89.12.254"
passbolt_backend:
name: passbolt_backend
driver: bridge
ipam:
config:
- subnet: "10.89.13.0/24"
gateway: "10.89.13.254"
'';
}