If you’re trying to use pihole as a local DNS, you’ll still have to add your application port to the end of the URL if you’re not doing that already. So like if you’ve assigned server.local to your host server in pihole, to get to your app you would have to do http://server.local:1234, where 1234 is your app port number.
Otherwise, I have this all working with a code-server instance behind SWAG reverse proxy and Authelia authentication over the internet, if you need further help with that.
And in general :) hopefully that helps. Can you hit the site directly (without caddy etc) after setting up the DNS name in pihole?