From fbae21c5e1667b7559c5b752db3726aec359cee0 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 11 Feb 2024 13:00:41 +0100 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ config.env | 16 ++++++++++++++++ docker-compose.yml | 41 +++++++++++++++++++++++++++++++++++++++++ passwd.env | 1 + pihole.sh | 2 ++ 5 files changed, 63 insertions(+) create mode 100644 .gitignore create mode 100644 config.env create mode 100644 docker-compose.yml create mode 100644 passwd.env create mode 100755 pihole.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b249e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +conf-dnsmasq +conf-pihole +passwd.env diff --git a/config.env b/config.env new file mode 100644 index 0000000..793f5d2 --- /dev/null +++ b/config.env @@ -0,0 +1,16 @@ +# Mandatory +TZ=Europe/Berlin +VIRTUAL_HOST=pi.hole +PROXY_LOCATION=pi.hole +FTLCONF_LOCAL_IPV4=127.0.0.1 +# Configuration +DNSSEC=true +DNS_BOGUS_PRIV=false +DNS_FQDN_REQUIRED=true +DHCP_ACTIVE=false +IPv6=true +TEMPERATUREUNIT=c +DNSMASQ_LISTENING=all +WEB_PORT=8999 +WEB_BIND_ADDR=0.0.0.0 +#SKIPGRAVITYBOOT=1 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..95db9b7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,41 @@ +version: "3.8" + +services: + pihole: + image: pihole/pihole:latest + container_name: pihole + stop_grace_period: 15s + restart: unless-stopped + hostname: pi.hole + env_file: + - config.env + - passwd.env + volumes: + - /home/docker/pihole/conf-pihole:/etc/pihole + - /home/docker/pihole/conf-dnsmasq:/etc/dnsmasq.d + dns: + - 127.0.0.1 + - 1.1.1.1 + - 1.0.0.1 + ports: + - 8999:8999 + - 127.0.0.1:53:53/tcp + - 127.0.0.1:53:53/udp + - ::1:53:53/tcp + - ::1:53:53/udp + networks: + - pihole-ipv4 + - pihole-ipv6 + +networks: + pihole-ipv4: + name: pihole-ipv4 + external: false + pihole-ipv6: + name: pihole-ipv6 + external: false + enable_ipv6: true + ipam: + config: + - subnet: 2001:db8:a::/64 + gateway: 2001:db8:a::1 diff --git a/passwd.env b/passwd.env new file mode 100644 index 0000000..7eadccb --- /dev/null +++ b/passwd.env @@ -0,0 +1 @@ +WEBPASSWORD= diff --git a/pihole.sh b/pihole.sh new file mode 100755 index 0000000..bbeda21 --- /dev/null +++ b/pihole.sh @@ -0,0 +1,2 @@ +#!/usr/sbin/env bash +docker compose exec -it pihole pihole $@