The proxy and wireguard are two different things. Typically you would choose one or the other.
If using the proxy, you can connect using 127.0.0.1:5432, but if you have a valid Wireguard VPN connection active, you should be able to use app-db.internal:5432 as the hostname.
I’m still suspicious something is going on with your wireguard config. What happens if you run dig aaaa app-db.internal with wireguard on?
Thanks @fideloper-fly for the tip. What I found was trivial , the db instance doesn’t have ip allocated to it which is weird to me. So here’s what I did:
Hi @catflydotio, I verified that correct DNS is being used.
~ cat /etc/resolv.conf
nameserver [same address with DNS from wireguard config]
~ dig +short _apps.internal txt @[dns-ip-from-wireguard-config]
[ different result from dig inside any app ]