Big update to logic and nix files. Need testing.
This commit is contained in:
@@ -16,22 +16,9 @@ in
|
||||
services:
|
||||
traefik:
|
||||
image: docker.io/library/traefik:latest
|
||||
container_name: pi-hole
|
||||
container_name: traefik
|
||||
networks:
|
||||
nextcloud-aio:
|
||||
ipv4_address: 172.16.10.253
|
||||
passbolt_frontend:
|
||||
ipv4_address: 172.16.20.253
|
||||
pihole:
|
||||
ipv4_address: 172.16.30.253
|
||||
hass_frontend:
|
||||
ipv4_address: 172.16.40.253
|
||||
immich_frontend:
|
||||
ipv4_address: 172.16.50.253
|
||||
gitea_frontend:
|
||||
ipv4_address: 172.16.60.253
|
||||
it-tools:
|
||||
ipv4_address: 172.16.70.253
|
||||
TRAEFIK_NETWORKS
|
||||
ports:
|
||||
- 8080:80
|
||||
- 8443:443
|
||||
@@ -47,95 +34,18 @@ in
|
||||
- traefik.http.services.traefik.loadbalancer.server.port=8080
|
||||
- traefik.http.services.traefik.loadbalancer.server.scheme=http
|
||||
- traefik.http.routers.traefik-https.entrypoints=websecure
|
||||
- traefik.http.routers.traefik-https.rule=Host(`pi-hole.$DOMAIN_NAME`)
|
||||
- traefik.http.routers.traefik-https.rule=Host(`traefik.$DOMAIN_NAME`)
|
||||
- traefik.http.routers.traefik-https.tls=true
|
||||
- traefik.http.routers.traefik-https.tls.certresolver=cloudflare
|
||||
restart: always
|
||||
networks:
|
||||
nextcloud-aio:
|
||||
name: nextcloud-aio
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.10.0/24"
|
||||
gateway: "172.16.10.254"
|
||||
passbolt_backend:
|
||||
name: passbolt_backend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.2.0/24"
|
||||
gateway: "172.16.2.254"
|
||||
passbolt_frontend:
|
||||
name: passbolt_frontend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.20.0/24"
|
||||
gateway: "172.16.20.254"
|
||||
pihole:
|
||||
name: pihole
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.30.0/24"
|
||||
gateway: "172.16.30.254"
|
||||
hass_backend:
|
||||
name: hass_backend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.4.0/24"
|
||||
gateway: "172.16.4.254"
|
||||
hass_frontend:
|
||||
name: hass_frontend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.40.0/24"
|
||||
gateway: "172.16.40.254"
|
||||
immich_backend:
|
||||
name: immich_backend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.5.0/24"
|
||||
gateway: "172.16.5.254"
|
||||
immich_frontend:
|
||||
name: immich_frontend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.50.0/24"
|
||||
gateway: "172.16.50.254"
|
||||
gitea_backend:
|
||||
name: gitea_backend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.6.0/24"
|
||||
gateway: "172.16.6.254"
|
||||
gitea_frontend:
|
||||
name: gitea_frontend
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.60.0/24"
|
||||
gateway: "172.16.60.254"
|
||||
it-tools:
|
||||
name: it-tools
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.70.0/24"
|
||||
gateway: "172.16.70.254"
|
||||
TRAEFIK_NETWORKS_REF
|
||||
'';
|
||||
|
||||
systemd.services.traefik = {
|
||||
description = "Podman container : ${container_name}";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman-compose pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
@@ -147,8 +57,10 @@ in
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
StartLimitIntervalSec = "30s";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user