im using a yml for docker stacks/swarm.
When using PIHOLE_DNS_1: cloudflared#5054 - this does not translate to the ip in the docker stack. Is this function only working in docker compose?
pihole:
image: pihole/pihole:latest
hostname: pihole
networks:
- swarm
ports:
- target: 53
published: 53
protocol: udp
mode: host
- target: 53
published: 53
protocol: tcp
mode: host
environment:
TZ: 'America/New_York'
DNSSEC: 'True'
PIHOLE_DNS_1: cloudflared#5054
IPv6: 'False'
DNSMASQ_LISTENING: 'all'
DNS_BOGUS_PRIV: 'True'
DNS_FQDN_REQUIRED: 'True'
TEMPERATUREUNIT: 'F'
VIRTUAL_HOST: 'pihole.domain.dev'
SKIPGRAVITYONBOOT: 1
volumes:
- pihole:/etc/pihole
- dnsmasqd:/etc/dnsmasq.d
deploy:
update_config:
parallelism: 2
delay: 0s
labels:
- "traefik.enable=true"
- "traefik.http.routers.pihole.rule=Host(`pihole.domain.dev`)"
- "traefik.http.routers.pihole.entrypoints=websecure"
- "traefik.http.services.pihole.loadbalancer.server.port=80"
replicas: 1
placement:
constraints:
- node.role == manager
When looking at the env it does not translate. If the swarm updates i have to go in manually and edit the ip.
root@pihole:/# env
S6_BEHAVIOUR_IF_STAGE2_FAILS=2
HOSTNAME=pihole
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
PWD=/
TEMPERATUREUNIT=F
TZ=America/New_York
DNS_FQDN_REQUIRED=True
HOME=/root
FTLCONF_LOCAL_IPV4=0.0.0.0
PIHOLE_DNS_1=cloudflared#5054
VIRTUAL_HOST=pihole.domain.dev
TERM=xterm
FTL_CMD=no-daemon
IPv6=False
SKIPGRAVITYONBOOT=1
PHP_ERROR_LOG=/var/log/lighttpd/error-pihole.log
SHLVL=1
phpver=php
DNSMASQ_USER=pihole
DNSMASQ_LISTENING=all
DNS_BOGUS_PRIV=True
DNSSEC=True
PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
S6_KEEP_ENV=1
_=/usr/bin/env