We have setup three docker containers with docker-compose that run a MSSQL DB, a chatbot and a letsencrypt/NGINX container. It all works fairly well. The issue is, that if we re-run the docker-compose file that each of the three containers gets a different IP address.
Though - in each container we have config files that contain the ip address of one of the other containers - for example the chatbot container has a config file with the ip adress of the mssql database.
We are a little unclear what the best approach is to overcome this issue. We have read, that static ip addresses are not the best way in docker? What would be the best approach?