Using IP variables within an application

I’m sure I’m missing something so maybe someone can enlighten me.

I have 3 docker containers running with the appropriate ports open. My application (kamailio) has several lines in the config that point to db servers IP and to the IP of an additional container. Since I don’t know what the IP addresses will be when I start the other containers, is there a variable I can use within the kamailio container that will point the config to the correct IP address of the two supporting (mysql, rtpengine) containers? Is there a document that I haven’t found that addresses this issue?

Thanks

Kevin