Binding a host filesystem within containers
Previously, we used a third docker-compose
configuration file to specify bindings so that our source code directory would be overlaid within the container (in place of the app's home directory). We will do the same for the latest incarnation of our Docker Compose setup.
We first create a docker-compose-dev.yml
file:
version: '3' services:   publisher:     volumes:       - ./publisher:/home/app   subscriber:     volumes:       - ./subscriber:/home/app
This override file simply maps the publisher and subscriber source code directory over /home/app
in the related container. Now, we can freely edit sources on the host and, thanks to nodemon, our changes will take effect almost immediately within the running containers. There is no need to stop, rebuild, or restart any containers.
Unfortunately, docker...