title: docker-compose and using local image with mounted volume
body: <p>I have an image I create with Dockerfile</p>
  
  <pre><code>FROM mhart/alpine-node:latest
  
  WORKDIR /app
  COPY package*.json ./
  RUN npm install
  COPY src /app
  </code></pre>
  
  <p>Now in docker-compose.yml I build this image</p>
  
  <pre><code>version: '3.7'
  services:
    enginetonic:
      build:
        context: .
      image: enginetonic:compose
  
    mongodb:
      image: mongo:latest
      container_name: 'mongodb'
      ports:
        - 27017:27017
      restart: always
  
  
    monitor-service:
      image: enginetonic:compose
      container_name: monitorService
      command: nodemon monitor/monitor.js
      restart: on-failure
  
    #common services
    access-token-service:
      image: enginetonic:compose
      container_name: accessTokenService
      command: nodemon service/access-token-service/access-token-service.js
      restart: on-failure
      depends_on:
        - mongodb
  </code></pre>
  
  <p>In all documentation to bind:mount or use volumes I found, it is used with other docker commands</p>
  
  <p>example</p>
  
  <pre><code>$ docker service create \
       --mount 'type=volume,src=&lt;VOLUME-NAME&gt;,dst=&lt;CONTAINER-PATH&gt;,volume-driver=local,volume-opt=type=nfs,volume-opt=device=&lt;nfs-server&gt;:&lt;nfs-path&gt;,"volume-opt=o=addr=&lt;nfs-address&gt;,vers=4,soft,timeo=180,bg,tcp,rw"'
      --name myservice \
      &lt;IMAGE&gt;
  </code></pre>
  
  <p>How to use volumes, so that every service that covers the whole <code>/src/</code> directory, so that every service I start with nodemon reflects the files changed in the whole source code?</p>