This docker-compose
seems to complicated IMO. While this may work you should mind that Pi-hole also accepts hostnames (not only IP addresses) as upstream servers. You can omit the entire IP address definition and the complicated network configuration and simply specify unbound
as the DNS server using the pihole
container's environment.