From d75c978d3f4d9f22a45557b2bd5120670948bdac Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Wed, 31 May 2023 23:40:58 +0200 Subject: [PATCH] added keepalived to docker-compose --- templates/docker-compose.yml.j2 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 213000a..37a67ea 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -2,6 +2,18 @@ version: '3.9' services: +{% if deploy_adguard_virtual_ip['enable'] %} + keepalived: + image: ghcr.io/rmartin16/keepalived:latest + network_mode: host + environment: + INTERFACE: {{ deploy_adguard_virtual_ip['interface'] }} + VIRTUAL_IPS: {{ deploy_adguard_virtual_ip['vip_addr'] }} + STATE: "BACKUP" + cap_add: + - NET_ADMIN +{% endif %} + adguard: image: adguard/adguardhome:latest ports: @@ -53,4 +65,4 @@ volumes: driver_opts: o: bind device: {{ deploy_adguard_directory }}/data - type: none \ No newline at end of file + type: none