version: '3'
services:
    pihole:
        restart: unless-stopped
        container_name: pihole
        image: pihole/pihole:2023.05.2
        environment:
            ServerIP: "${PIHOLE_SERVERIP:-127.0.0.1}"
            VIRTUAL_HOST: pi.hole
            VIRTUAL_HOST_NAME: "pihole"
        expose:
            - "53"
            - "67"
            - "80"
            - "443"
        ports:
            - "53:53/udp"
        volumes:
            - "./pihole/resolv.conf:/etc/resolv.conf:ro"
            - "pihole_datadir:/etc/pihole"
volumes:
    pihole_datadir:
