services:
  pihole:
    container_name: ${CONTAINER_NAME}
    image: pihole/pihole:latest
    ports:
      - ${PORT_DNS}:53/tcp
      - ${PORT_DNS}:53/udp
      - ${PORT_WEBPORTAL}:80/tcp"
    env_file:
      - path: ./pihole.env
        required: true
      - path: ../global.env
        required: true
    environment:
      TZ: ${TIMEZONE}
    network_mode: "bridge"
    volumes:
      - ${HOME_DIR}/${CONTAINER_NAME}/etc-pihole:/etc/pihole
      - ${HOME_DIR}/${CONTAINER_NAME}/etc-dnsmasq.d:/etc/dnsmasq.d
    restart: unless-stopped