Hi have 2 docker images I created. In my home directory I have 2 build directories.
WebApp
ProxyApp
both using NGINX. I have dockerfiles for each app in each folder. I can build them separately and run them fine. I’m trying to figure out how to use docker-compose to build them both and run them. Could someone give me an example?
The best way I’ve found for inter-container communication is to use docker networks rather than links.
In your compose file, create a network in the top level network section and then reference that network in the networks section of you service configs.
At that point, the containers should be able to communicate with each other by using the service names (and using the containers port rather than a host port exposed in a port mapping)