Bxl-swarm Fix order & pihole

This commit is contained in:
Brieuc Dubois 2023-02-03 23:48:45 +01:00 committed by Bhasher
parent b6a943d530
commit 6c4f7b2b41
7 changed files with 182 additions and 10 deletions

View File

@ -19,7 +19,8 @@ services:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement: placement:
constraints: [node.labels.HWA == true] constraints:
- node.labels.HWA == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.jellyfin.rule=Host(`jellyfin.bhasher.com`)" - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.bhasher.com`)"
@ -27,6 +28,9 @@ services:
- "traefik.http.services.jellyfin.loadbalancer.server.port=8096" - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
- "traefik.http.routers.jellyfin.tls=true" - "traefik.http.routers.jellyfin.tls=true"
- "traefik.http.routers.jellyfin.tls.certresolver=http" - "traefik.http.routers.jellyfin.tls.certresolver=http"
depends_on:
- system_traefik
- system_nfs
radarr: radarr:
image: lscr.io/linuxserver/radarr:latest image: lscr.io/linuxserver/radarr:latest
@ -42,6 +46,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.radarr.rule=Host(`radarr.bhasher.com`)" - "traefik.http.routers.radarr.rule=Host(`radarr.bhasher.com`)"
@ -52,6 +59,9 @@ services:
networks: networks:
- internal - internal
- external - external
depends_on:
- system_traefik
- system_nfs
sonarr: sonarr:
image: lscr.io/linuxserver/sonarr:latest image: lscr.io/linuxserver/sonarr:latest
@ -69,6 +79,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.sonarr.rule=Host(`sonarr.bhasher.com`)" - "traefik.http.routers.sonarr.rule=Host(`sonarr.bhasher.com`)"
@ -79,6 +92,9 @@ services:
networks: networks:
- internal - internal
- external - external
depends_on:
- system_traefik
- system_nfs
lidarr: lidarr:
image: lscr.io/linuxserver/lidarr:latest image: lscr.io/linuxserver/lidarr:latest
@ -96,6 +112,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.lidarr.rule=Host(`lidarr.bhasher.com`)" - "traefik.http.routers.lidarr.rule=Host(`lidarr.bhasher.com`)"
@ -106,6 +125,9 @@ services:
networks: networks:
- internal - internal
- external - external
depends_on:
- system_traefik
- system_nfs
transmission: transmission:
image: lscr.io/linuxserver/transmission:latest image: lscr.io/linuxserver/transmission:latest
@ -128,6 +150,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.transmission.rule=Host(`transmission.bhasher.com`)" - "traefik.http.routers.transmission.rule=Host(`transmission.bhasher.com`)"
@ -138,6 +163,8 @@ services:
networks: networks:
- internal - internal
- external - external
depends_on:
- system_nfs
jackett: jackett:
image: lscr.io/linuxserver/jackett:latest image: lscr.io/linuxserver/jackett:latest
@ -155,6 +182,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.jackett.rule=Host(`jackett.bhasher.com`)" - "traefik.http.routers.jackett.rule=Host(`jackett.bhasher.com`)"
@ -165,6 +195,9 @@ services:
networks: networks:
- internal - internal
- external - external
depends_on:
- system_traefik
- system_nfs
flaresolverr: flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest image: ghcr.io/flaresolverr/flaresolverr:latest
@ -175,6 +208,15 @@ services:
- TZ=Europe/Paris - TZ=Europe/Paris
networks: networks:
- internal - internal
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
bazarr: bazarr:
image: lscr.io/linuxserver/bazarr:latest image: lscr.io/linuxserver/bazarr:latest
@ -190,6 +232,9 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.bazarr.rule=Host(`bazarr.bhasher.com`)" - "traefik.http.routers.bazarr.rule=Host(`bazarr.bhasher.com`)"
@ -200,6 +245,9 @@ services:
networks: networks:
- external - external
- internal - internal
depends_on:
- system_traefik
- system_nfs

View File

@ -36,6 +36,12 @@ services:
- "traefik.http.services.pihole.loadbalancer.server.port=80" - "traefik.http.services.pihole.loadbalancer.server.port=80"
- "traefik.http.routers.pihole.tls=true" - "traefik.http.routers.pihole.tls=true"
- "traefik.http.routers.pihole.tls.certresolver=http" - "traefik.http.routers.pihole.tls.certresolver=http"
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_traefik
- system_nfs
networks: networks:
external: external:

View File

@ -20,6 +20,12 @@ services:
- "traefik.http.services.hass.loadbalancer.server.port=8123" - "traefik.http.services.hass.loadbalancer.server.port=8123"
- "traefik.http.routers.hass.tls=true" - "traefik.http.routers.hass.tls=true"
- "traefik.http.routers.hass.tls.certresolver=http" - "traefik.http.routers.hass.tls.certresolver=http"
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_traefik
- system_nfs
mosquitto: mosquitto:
image: eclipse-mosquitto:latest image: eclipse-mosquitto:latest
@ -37,6 +43,11 @@ services:
restart_policy: restart_policy:
condition: any condition: any
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_nfs
networks: networks:
external: external:

View File

@ -18,6 +18,11 @@ services:
restart_policy: restart_policy:
condition: any condition: any
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_nfs
redis: redis:
image: redis:latest image: redis:latest
@ -29,6 +34,9 @@ services:
restart_policy: restart_policy:
condition: any condition: any
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
networks: networks:
storage: storage:

View File

@ -48,6 +48,12 @@ services:
restart_policy: restart_policy:
condition: any condition: any
max_attempts: 3 max_attempts: 3
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_nfs
- system_keepalived
portainer: portainer:
image: portainer/portainer-ce:latest image: portainer/portainer-ce:latest
@ -68,13 +74,17 @@ services:
- "traefik.http.services.portainer.loadbalancer.server.port=9000" - "traefik.http.services.portainer.loadbalancer.server.port=9000"
- "traefik.http.routers.portainer.tls=true" - "traefik.http.routers.portainer.tls=true"
- "traefik.http.routers.portainer.tls.certresolver=http" - "traefik.http.routers.portainer.tls.certresolver=http"
mode: replicated
replicas: 1
restart_policy: restart_policy:
condition: any condition: any
delay: 30s
max_attempts: 3 max_attempts: 3
placement: placement:
constraints: [node.role == manager] constraints:
- node.role == manager
- node.labels.POWER == true
depends_on:
- system_nfs
- system_keepalived
agent: agent:
image: portainer/agent:latest image: portainer/agent:latest
@ -87,6 +97,8 @@ services:
mode: global mode: global
placement: placement:
constraints: [node.platform.os == linux] constraints: [node.platform.os == linux]
depends_on:
- system_portainer
keepalived: keepalived:
image: linkvt/osixia_keepalived:stable image: linkvt/osixia_keepalived:stable
@ -105,7 +117,19 @@ services:
deploy: deploy:
mode: global mode: global
placement: placement:
constraints: [node.role == manager] constraints:
- node.role == manager
nfs:
image: traefik/whoami:latest
volumes:
- /mnt/nfs/check:/tmp/check
deploy:
mode: global
placement:
constraints:
- node.role == manager
networks: networks:
external: external:

View File

@ -0,0 +1,72 @@
version: '3.7'
services:
kanboard:
image: kanboard/kanboard:latest
environment:
- DB_DRIVER=postgres
- DB_USERNAME=postgres
- DB_PASSWORD=DS7BVNZr0qZdGwc63wjHmZry5P0gUVhR
- DB_HOSTNAME=storage_postgres
- DB_NAME=kanboard
networks:
- external
- storage
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
max_attempts: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.kanboard.rule=Host(`kanboard.bxl.bhasher.com`)"
- "traefik.http.routers.kanboard.entrypoints=internalsecure"
- "traefik.http.services.kanboard.loadbalancer.server.port=80"
- "traefik.http.routers.kanboard.tls=true"
- "traefik.http.routers.kanboard.tls.certresolver=http"
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_traefik
- storage_postgres
dashy:
image: lissy93/dashy:latest
volumes:
- /mnt/nfs/dashy/config.yml:/app/public/conf.yml
environment:
- NODE_ENV=production
networks:
- external
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
max_attempts: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashy.rule=Host(`dashboard.bhasher.com`)"
- "traefik.http.routers.dashy.entrypoints=internalsecure"
- "traefik.http.services.dashy.loadbalancer.server.port=80"
- "traefik.http.routers.dashy.tls=true"
- "traefik.http.routers.dashy.tls.certresolver=http"
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_traefik
- system_nfs
networks:
external:
external: true
storage:
external: true

View File

@ -7,15 +7,15 @@ services:
replicas: 1 replicas: 1
restart_policy: restart_policy:
condition: any condition: any
max_attempts: 3 delay: 30s
placement:
constraints:
- node.labels.POWER == true
volumes: volumes:
- /mnt/nfs/wireguard:/config - /mnt/nfs/wireguard:/config
- /lib/modules:/lib/modules - /lib/modules:/lib/modules
ports: ports:
- mode: host - 51821:51820/udp
protocol: udp
published: 51821
target: 51820
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- SERVERURL=vpn.bhasher.com - SERVERURL=vpn.bhasher.com
@ -29,3 +29,6 @@ services:
- SYS_MODULE - SYS_MODULE
sysctls: sysctls:
- net.ipv4.conf.all.src_valid_mark=1 - net.ipv4.conf.all.src_valid_mark=1
depends_on:
- system_keepalived
- system_nfs