Setting up Grafana Email URL

I am using Grafana docker image 8.4.5 with a custom private signed plugin. To sign the plugin I am using localhost in root_url. Everything works fine till here. The problem arises when grafana send email alerts. In the email URL it doesn’t contain the host IP address instead it contains localhost.

One solution would be to replace GF_ROOT_URL with the host machine URL but when I do that it makes the plugin signature invalid. Signing the plugin everytime with hosturl is not practical because most of time I don’t know the host ip.