127.0.0.1 will not work, due to it's still different host, and in case of this sam bundle, it should point to sam's iris. And will not work it, because, it should be available for prometheus container, not just for IRIS container for sam. So, you have to use, it's name as a host iris

And to access, some IRIS external to docker, you may use host.docker.internal hostname, or docker.for.mac.localhost with Docker on macOS

So, the first line is points to SAM's IRIS, and second to an IRIS outside

I think host.docker.internal was added in some recent versions of Docker, so, probably check the version of Docker

And I have one more demo project, based on Realworld application, I found on GitHub

What I did, is just forked some project, switched it to using IRIS, by configuring its settings, added requirements, wrapped it in the container with IRIS, and that's mostly it.

Look at the repo https://github.com/caretdev/django-iris-realworld

For this project, I've used a non-CE version of IRIS, so, you will need an iris.key, placed in home directory to start it