2023-05-31 20:57:46 +00:00
|
|
|
---
|
|
|
|
version: '3.9'
|
|
|
|
|
|
|
|
services:
|
2023-05-31 21:40:58 +00:00
|
|
|
{% 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
|
|
|
|
|
2023-06-01 17:27:07 +00:00
|
|
|
{% endif %}
|
2023-05-31 20:57:46 +00:00
|
|
|
adguard:
|
|
|
|
image: adguard/adguardhome:latest
|
2023-06-03 23:02:00 +00:00
|
|
|
{% if deploy_adguard_virtual_ip['enable']%}
|
|
|
|
depends_on:
|
|
|
|
- keepalived
|
|
|
|
{% endif %}
|
2023-05-31 20:57:46 +00:00
|
|
|
ports:
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}53:53/tcp"
|
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}53:53/udp"
|
2023-05-31 20:57:46 +00:00
|
|
|
{% if deploy_adguard_enable_admin_interface %}
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_consul['enable'] %}127.0.0.1:{% endif %}80:80/tcp"
|
|
|
|
- "{% if deploy_adguard_consul['enable'] %}127.0.0.1:{% endif %}443:443/tcp"
|
2023-05-31 20:57:46 +00:00
|
|
|
- "3000:3000/tcp"
|
|
|
|
{% endif %}
|
|
|
|
{% if deploy_adguard_enable_dhcp %}
|
|
|
|
- "67:67/udp"
|
|
|
|
- "68:68/tcp"
|
|
|
|
- "68:68/udp"
|
|
|
|
{% endif %}
|
|
|
|
{% if deploy_adguard_enable_doh %}
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{% endif %}443:443/udp"
|
2023-05-31 20:57:46 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if deploy_adguard_enable_dot %}
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{% endif %}853:853/tcp"
|
2023-05-31 20:57:46 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if deploy_adguard_enable_doq %}
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}784:784/udp"
|
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}8853:8853/udp"
|
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}853:853/udp"
|
2023-05-31 20:57:46 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if deploy_adguard_enable_dnscrypt %}
|
2023-06-03 11:59:47 +00:00
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}5443:5443/tcp"
|
|
|
|
- "{% if deploy_adguard_virtual_ip['enable'] %}{{ deploy_adguard_virtual_ip['vip_addr'] }}:{% endif %}5443:5443/udp"
|
2023-05-31 20:57:46 +00:00
|
|
|
{% endif %}
|
|
|
|
volumes:
|
|
|
|
- conf:/opt/adguardhome/conf
|
|
|
|
- data:/opt/adguardhome/work
|
|
|
|
networks:
|
|
|
|
- internal
|
2023-06-01 17:27:07 +00:00
|
|
|
{% if deploy_adguard_node_exporter %}
|
|
|
|
|
|
|
|
node_exporter:
|
|
|
|
image: ebrianne/adguard-exporter:latest
|
2023-06-03 23:02:00 +00:00
|
|
|
depends_on:
|
|
|
|
- adguard
|
2023-06-02 13:25:56 +00:00
|
|
|
secrets:
|
|
|
|
- adguard_passw
|
2023-06-01 17:27:07 +00:00
|
|
|
environment:
|
2023-06-02 13:25:56 +00:00
|
|
|
adguard_protocol: {{ deploy_adguard_node_exporter['protocol'] }}
|
|
|
|
adguard_hostname: adguard
|
|
|
|
adguard_username: {{ deploy_adguard_node_exporter['username'] }}
|
|
|
|
adguard_password: /run/secrets/adguard_passw
|
|
|
|
adguard_port: {{ deploy_adguard_node_exporter['port'] }}
|
|
|
|
server_port: {{ deploy_adguard_node_exporter['exporter_port'] }}
|
|
|
|
interval: {{ deploy_adguard_node_exporter['interval'] }}
|
|
|
|
log_limit: {{ deploy_adguard_node_exporter['log_limit'] }}
|
|
|
|
password_from_file: true
|
2023-06-01 17:27:07 +00:00
|
|
|
ports:
|
|
|
|
- "9617:9617"
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
{% endif %}
|
2023-05-31 20:57:46 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
conf:
|
|
|
|
driver_opts:
|
|
|
|
o: bind
|
|
|
|
device: {{ deploy_adguard_directory }}/conf
|
|
|
|
type: none
|
|
|
|
data:
|
|
|
|
driver_opts:
|
|
|
|
o: bind
|
|
|
|
device: {{ deploy_adguard_directory }}/data
|
2023-05-31 21:40:58 +00:00
|
|
|
type: none
|
2023-06-02 13:25:56 +00:00
|
|
|
|
|
|
|
secrets:
|
|
|
|
adguard_passw:
|
|
|
|
file: {{ deploy_adguard_directory }}/password
|