Cannot connect Graphite to Grafana data source

Hey guys, apologies if this is the wrong section.
I need help trying to figure out what I’m doing wrong. So I’m running graphite via docker graphite project. And I have grafana and elasticsearch running on docker too. They are all in the same instance. I can easily add beats data source, but I somehow cannot add graphite data source.

This is my docker compose for graphite. The Dockerfile is the same as the docker graphite project in github.

version: “2”
context: .
- ./conf/opt/graphite/conf:/opt/graphite/conf
- “80:80”
- “2003-2004:2003-2004”
- “2023-2024:2023-2024”
- “8125:8125/udp”
- “8126:8126”
container_name: graphite_server

This is all the docker containers in an instance:

This is how I’m adding the source to grafana:
Even if I use browser mode, it doesn’t work. I get “net::ERR_NAME_NOT_RESOLVED”

CORS is added to nginx so I’m sure its not a CORS issue. Any help would be appreciated.