Updated YMLs for DNS pihole and exporter for individual naming. Also removed alot of unnecessary code

This commit is contained in:
2024-02-26 12:25:14 +01:00
parent bd775f22b3
commit 9c5071e81d
2 changed files with 20 additions and 98 deletions
+10 -49
View File
@@ -1,78 +1,39 @@
version: "3.7" version: "3.7"
#volumes:
# pihole:
services: services:
pihole: mason-ph:
image: pihole/pihole:latest image: pihole/pihole:latest
container_name: "mason-ph" container_name: "mason-ph"
hostname: "pihole" networks:
# user: "root:root" - pihole_network
ports: ports:
- "53:53/udp" - "53:53/udp"
- "53:53/tcp" - "53:53/tcp"
- "80:80" - "80:80"
# - target: 53
# published: 53
# protocol: tcp
# - target: 53
# published: 53
# protocol: udp
# - target: 80
# published: 8053
# protocol: tcp
# network_mode: "host"
volumes: volumes:
- type: bind - type: bind
source: /pihole_data source: /pihole_data
target: /etc/pihole target: /etc/pihole
# - pihole:/etc/pihole
# - "/home/ansible/stacks/lighttpd/external.conf:/etc/lighttpd/external.conf"
# - dnsmasq:/etc/dnsmasq.d
# depends_on:
# - cloudflared
restart: always restart: always
environment: environment:
TZ: Europe/Amsterdam TZ: Europe/Amsterdam
# - "DNS1=1.1.1.1"
# - "REV_SERVER=true"
# - "REV_SERVER_CIDR=192.168.1.0/24" #Update these fields to match your environment
# - "REV_SERVER_TARGET=192.168.1.1"
# - "REV_SERVER_DOMAIN=home.local"
WEBPASSWORD: 'password' WEBPASSWORD: 'password'
# networks:
# - web
# deploy:
# mode: global
# replicas: 1
# placement:
# constraints:
# - "node.labels.dns==true"
pihole_exporter: pihole_exporter:
image: ekofr/pihole-exporter image: ekofr/pihole-exporter
container_name: pihole_exporter container_name: pihole_exporter
expose: ports:
- 9617 - 9617:9617
environment: environment:
PIHOLE_HOSTNAME: pihole PIHOLE_HOSTNAME: mason-ph
# PIHOLE_PORT: 8053
PIHOLE_PASSWORD: password PIHOLE_PASSWORD: password
INTERVAL: 30s INTERVAL: 30s
PORT: 9617 PORT: 9617
restart: always restart: always
# deploy: networks:
# labels: - pihole_network
# - "traefik.enable=false"
# mode: replicated
# replicas: 1
# placement:
# constraints:
# - "node.hostname==swarm-master"
networks: networks:
web: pihole_network:
# external: true driver: bridge
name: web
+10 -49
View File
@@ -1,78 +1,39 @@
version: "3.7" version: "3.7"
#volumes:
# pihole:
services: services:
pihole: phil-ph:
image: pihole/pihole:latest image: pihole/pihole:latest
container_name: "phil-ph" container_name: "phil-ph"
hostname: "pihole" networks:
# user: "root:root" - pihole_network
ports: ports:
- "53:53/udp" - "53:53/udp"
- "53:53/tcp" - "53:53/tcp"
- "80:80" - "80:80"
# - target: 53
# published: 53
# protocol: tcp
# - target: 53
# published: 53
# protocol: udp
# - target: 80
# published: 8053
# protocol: tcp
# network_mode: "host"
volumes: volumes:
- type: bind - type: bind
source: /pihole_data source: /pihole_data
target: /etc/pihole target: /etc/pihole
# - pihole:/etc/pihole
# - "/home/ansible/stacks/lighttpd/external.conf:/etc/lighttpd/external.conf"
# - dnsmasq:/etc/dnsmasq.d
# depends_on:
# - cloudflared
restart: always restart: always
environment: environment:
TZ: Europe/Amsterdam TZ: Europe/Amsterdam
# - "DNS1=1.1.1.1"
# - "REV_SERVER=true"
# - "REV_SERVER_CIDR=192.168.1.0/24" #Update these fields to match your environment
# - "REV_SERVER_TARGET=192.168.1.1"
# - "REV_SERVER_DOMAIN=home.local"
WEBPASSWORD: 'password' WEBPASSWORD: 'password'
# networks:
# - web
# deploy:
# mode: global
# replicas: 1
# placement:
# constraints:
# - "node.labels.dns==true"
pihole_exporter: pihole_exporter:
image: ekofr/pihole-exporter image: ekofr/pihole-exporter
container_name: pihole_exporter container_name: pihole_exporter
expose: ports:
- 9617 - 9617:9617
environment: environment:
PIHOLE_HOSTNAME: pihole PIHOLE_HOSTNAME: phil-ph
# PIHOLE_PORT: 8053
PIHOLE_PASSWORD: password PIHOLE_PASSWORD: password
INTERVAL: 30s INTERVAL: 30s
PORT: 9617 PORT: 9617
restart: always restart: always
# deploy: networks:
# labels: - pihole_network
# - "traefik.enable=false"
# mode: replicated
# replicas: 1
# placement:
# constraints:
# - "node.hostname==swarm-master"
networks: networks:
web: pihole_network:
# external: true driver: bridge
name: web