Add `hostname` to docker-compose

If this is not set, the PiHole admin page shows the Docker container's 
ID as hostname instead.
This commit is contained in:
Emilien Klein 2020-12-27 15:24:29 +01:00
parent 5c21f146f4
commit 64a1f548ef
3 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
ports:
- "53:53/tcp"
- "53:53/udp"

View File

@ -5,6 +5,7 @@ version: "3"
services:
jwilder-proxy:
image: jwilder/nginx-proxy
hostname: pihole.yourDomain.lan
ports:
- '80:80'
environment:

View File

@ -6,6 +6,7 @@ services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"