---
version: "2"
services:
keepalived:
image: strausmann/keepalived:latest
container_name: keepalived
restart: no
environment:
- KEEPALIVED_VIRTUAL_IPS=192.168.1.231 # Keepalived virtual IPs.
- KEEPALIVED_UNICAST_PEERS =#PYTHON2BASH:['192.168.1.10', '192.168.1.11'] # Keepalived unicast peers. Defaults to : - 192.168.1.10 - 192.168.1.11
- KEEPALIVED_STATE=MASTER # The starting state of keepalived; it can either be MASTER or BACKUP.
- KEEPALIVED_ROUTER_ID =51 # Keepalived virtual router ID. Defaults to 51
- KEEPALIVED_PRIORITY=100 # Keepalived node priority. Defaults to 150
- KEEPALIVED_PASSWORD=SecurePassword! # Keepalived password. Defaults to d0cker
- KEEPALIVED_NOTIFY=/container/service/keepalived/assets/notify.sh # Script to execute when node state change.
- KEEPALIVED_INTERFACE=eno1 # Keepalived network interface. Defaults to eth0
- KEEPALIVED_COMMAND_LINE_ARGUMENTS=--log-detail --dump-conf # Keepalived command line arguments;