Bxl-swarm keepalived virtip

This commit is contained in:
Brieuc Dubois 2023-01-28 22:53:34 +01:00 committed by Bhasher
parent dd958365ee
commit 07d2419306
1 changed files with 25 additions and 1 deletions

View File

@ -1,4 +1,4 @@
version: '3.2'
version: '3.7'
services:
traefik:
@ -37,6 +37,9 @@ services:
- type: bind
source: /mnt/nfs/traefik/acme.json
target: /acme.json
- type: bind
source: /mnt/nfs/traefik/rules.toml
target: /rules.toml
networks:
- external
deploy:
@ -85,9 +88,30 @@ services:
placement:
constraints: [node.platform.os == linux]
keepalived:
image: linkvt/osixia_keepalived:stable
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker:ro
networks:
- host
cap_add:
- NET_ADMIN
- NET_BROADCAST
- NET_RAW
environment:
- KEEPALIVED_VIRTUAL_IPS=192.168.1.219
- KEEPALIVeD_INTERFACE=eth0
deploy:
mode: global
placement:
constraints: [node.role == manager]
networks:
external:
external: true
agent_network:
driver: overlay
attachable: true
host:
external: true