Move Pi-hole backup node from Serenity to NOMAD
This commit is contained in:
62
pihole/nomad/docker-compose.yaml
Normal file
62
pihole/nomad/docker-compose.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
services:
|
||||
unbound:
|
||||
image: mvance/unbound:latest
|
||||
container_name: unbound-pihole-nomad
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: ${TZ}
|
||||
UNBOUND_PORT: "5335"
|
||||
volumes:
|
||||
- ${APPDATA_UNBOUND_ROOT}:/opt/unbound/etc/unbound/
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "hex=$$(printf '%04X' \"$$UNBOUND_PORT\"); grep -qi \":$$hex\" /proc/net/tcp /proc/net/tcp6 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
start_period: 20s
|
||||
|
||||
pihole:
|
||||
image: pihole/pihole:latest
|
||||
container_name: pihole-nomad
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
unbound:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
TZ: ${TZ}
|
||||
PIHOLE_WEB_PORT: ${NOMAD_PIHOLE_WEB_PORT}
|
||||
FTLCONF_webserver_api_password: ${PIHOLE_PASSWORD}
|
||||
FTLCONF_dns_listeningMode: "LOCAL"
|
||||
FTLCONF_dns_upstreams: "127.0.0.1#5335"
|
||||
FTLCONF_webserver_port: ${NOMAD_PIHOLE_WEB_PORT}
|
||||
FTLCONF_ntp_ipv4_active: "false"
|
||||
FTLCONF_ntp_ipv6_active: "false"
|
||||
FTLCONF_ntp_sync_active: "false"
|
||||
volumes:
|
||||
- ${APPDATA_PIHOLE_ROOT}/etc-pihole:/etc/pihole
|
||||
- ${APPDATA_PIHOLE_ROOT}/etc-dnsmasq.d:/etc/dnsmasq.d
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "hex=$$(printf '%04X' \"$$PIHOLE_WEB_PORT\"); grep -qi \":$$hex\" /proc/net/tcp /proc/net/tcp6 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
start_period: 40s
|
||||
|
||||
keepalived:
|
||||
image: osixia/keepalived:2.0.20
|
||||
container_name: keepalived-pihole-nomad
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
pihole:
|
||||
condition: service_healthy
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_BROADCAST
|
||||
- NET_RAW
|
||||
volumes:
|
||||
- ./keepalived.conf:/usr/local/etc/keepalived/keepalived.conf:ro
|
||||
Reference in New Issue
Block a user