This repository has been archived on 2023-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
skylab-ansible/resources/docker-compose/adguard.yaml.j2

54 lines
1.1 KiB
Django/Jinja

---
version: "{{ skylab_compose_version }}"
networks:
adguard:
name: adguard
driver: overlay
ipam:
driver: default
config:
- subnet: "{{ app.networks.ext }}"
volumes:
{% for key, value in app.volumes.items() %}
adguard-{{ key }}:
name: datastore{{ value }}
driver: glusterfs
{% endfor %}
services:
server:
image: adguard/adguardhome:{{ app.versions.server }}
hostname: adguard
networks:
- adguard
dns:
{% for server in app.settings.upstream %}
- {{ server }}
{% endfor %}
ports:
- published: {{ app.ports.53 }}
target: 53
protocol: udp
mode: ingress
- published: {{ app.ports.53 }}
target: 53
protocol: tcp
mode: ingress
- published: {{ app.ports.8064 }}
target: 8064
protocol: tcp
mode: ingress
volumes:
- type: volume
source: adguard-config
target: /opt/adguardhome/conf
read_only: false
- type: volume
source: adguard-data
target: /opt/adguardhome/work
read_only: false
deploy:
replicas: 1