Bxl-swarm keepalived virtip
This commit is contained in:
parent
dd958365ee
commit
07d2419306
|
@ -1,4 +1,4 @@
|
||||||
version: '3.2'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
|
@ -37,6 +37,9 @@ services:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /mnt/nfs/traefik/acme.json
|
source: /mnt/nfs/traefik/acme.json
|
||||||
target: /acme.json
|
target: /acme.json
|
||||||
|
- type: bind
|
||||||
|
source: /mnt/nfs/traefik/rules.toml
|
||||||
|
target: /rules.toml
|
||||||
networks:
|
networks:
|
||||||
- external
|
- external
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -85,9 +88,30 @@ services:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.platform.os == linux]
|
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:
|
networks:
|
||||||
external:
|
external:
|
||||||
external: true
|
external: true
|
||||||
agent_network:
|
agent_network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
attachable: true
|
attachable: true
|
||||||
|
host:
|
||||||
|
external: true
|
||||||
|
|
Loading…
Reference in New Issue