We have the following setup:
We host multiple website on an Ubuntu server, most of them running PHP 5.6. One of them, runs inside a Docker container with PHP 7.1.
The nginx conf for this website has the following line:
which points to the IP of the docker container, which we get from
docker inspect <container>|grep IP
The problem is whenever the system restarts, the container gets a new IP assigned and we have to copy it into the nginx conf again and restart nginx. How could we do this automatically?