Fix pihole dashboard access

This commit is contained in:
nicolas.dorier 2025-03-20 23:57:01 +09:00
parent b4586c1d5d
commit f97850780f
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
3 changed files with 10 additions and 0 deletions

View File

@ -204,6 +204,7 @@ fi
: "${REVERSEPROXY_HTTP_PORT:=80}"
: "${REVERSEPROXY_HTTPS_PORT:=443}"
: "${BTCPAY_ENABLE_SSH:=false}"
: "${PIHOLE_SERVERIP:=}"
: "${CLOUDFLARE_TUNNEL_TOKEN:=}"
OLD_BTCPAY_DOCKER_COMPOSE="$BTCPAY_DOCKER_COMPOSE"
@ -313,6 +314,7 @@ BTCPAY_IMAGE:$BTCPAY_IMAGE
ACME_CA_URI:$ACME_CA_URI
TOR_RELAY_NICKNAME: $TOR_RELAY_NICKNAME
TOR_RELAY_EMAIL: $TOR_RELAY_EMAIL
PIHOLE_SERVERIP: $PIHOLE_SERVERIP
FIREFLY_HOST: $FIREFLY_HOST
----------------------
Additional exported variables:
@ -364,6 +366,7 @@ export BTCPAY_BASE_DIRECTORY=\"$BTCPAY_BASE_DIRECTORY\"
export BTCPAY_ENV_FILE=\"$BTCPAY_ENV_FILE\"
export BTCPAY_HOST_SSHKEYFILE=\"$BTCPAY_HOST_SSHKEYFILE\"
export BTCPAY_ENABLE_SSH=$BTCPAY_ENABLE_SSH
export PIHOLE_SERVERIP=\"$PIHOLE_SERVERIP\"
if cat \"\$BTCPAY_ENV_FILE\" &> /dev/null; then
while IFS= read -r line; do
! [[ \"\$line\" == \"#\"* ]] && [[ \"\$line\" == *\"=\"* ]] && export \"\$line\"

View File

@ -5,6 +5,7 @@ services:
container_name: pihole
image: pihole/pihole:2025.03.0
environment:
FTLCONF_dns_reply_host_IPv4: "${PIHOLE_SERVERIP:-127.0.0.1}"
VIRTUAL_HOST: pi.hole
VIRTUAL_HOST_NAME: "pihole"
FTLCONF_dns_listeningMode: 'all'

View File

@ -26,6 +26,12 @@ From now everytime a device will connect to your local network, they will automa
## Using the dashboard
Pi-Hole comes with a very nice admin dashboard to monitor its activity.
It is disabled by default. To enable it, you need to configure `PIHOLE_SERVERIP` to the IP of your server:
```bash
PIHOLE_SERVERIP="192.168.1.2"
. btcpay-setup.sh -i
```
If your device is using pi-hole as a DNS server, you should now be able to browse `http://pi.hole/admin` to connect to your dashboard.