title: Nodemon don't reload when using docker
body: <p>I am trying to setup an API and using docker/docker-compose at the same time but I am having a problem with nodemon(<a href="https://nodemon.io/" rel="nofollow noreferrer">https://nodemon.io/</a>).</p>
  
  <p>At the moment, I can run the command: <strong>docker-compose build &amp;&amp; docker-compose up</strong> and access API, but the problem is when I go to the code and change something and save, my nodemon don't reload/restart.
  I was looking into the stackoverflow about this problem and some topics recommend to add "--legacy-watch" on the command to run, for me this isn't working properly.</p>
  
  <p>Any idea how to fix this? 
  I can provide a github access with the simple API.</p>
  
  <p>Some setting:</p>
  
  <p><strong>Folder structure:</strong></p>
  
  <p>docker-compose.yml -> file</p>
  
  <p>weather-api  -> nodeJS application</p>
  
  <ul>
  <li>Dockerfile</li>
  <li>src</li>
  <li>...</li>
  </ul>
  
  <p><strong>Docker compose configuration:</strong></p>
  
  <pre><code>version: '3'
  
  services:
    weather:
      build:
        context: ./weather-api
        dockerfile: Dockerfile
      command: npm run dev
      ports:
        - '3000:3000'
      volumes: ['./weather-api/', '/usr/src/app/']
  </code></pre>
  
  <p><strong>Docker file configuration:</strong></p>
  
  <pre><code>FROM node:10.13-alpine
  
  WORKDIR /usr/src/app
  COPY ["package.json", "tsconfig.json", "./"]
  RUN npm install
  COPY . .
  EXPOSE 3000
  CMD npm run dev
  
  </code></pre>
  
  <p><strong>Package json config</strong></p>
  
  <pre><code>...
   "scripts": {
      "start": "node dist/app.js",
      "lint": "tslint -c tslint.json -p tsconfig.json --fix",
      "dev": "nodemon --legacy-watch src/server.ts",
      "build": "tsc -b"
    }
  ...
  </code></pre>