title: Docker compose with subdirectory and live reload
body: <p>I created an app using <a href="https://github.com/facebookincubator/create-react-app" rel="noreferrer">create-react-app</a> and set up docker compose to set up the container and start the app. When the app is in the root directory, the app starts and the live reload works. But when I move the app to a subdirectory, I can get the app to start, but the live reload does not work. </p>
  
  <p>Here's the working setup:</p>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM node:7.7.2
  
  ADD . /code
  
  WORKDIR /code
  
  RUN npm install
  
  EXPOSE 3000
  
  CMD npm start
  </code></pre>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: "2"
  
  services:
    client:
      build: .
      ports:
        - "3000:3000"
      volumes:
        - .:/code
  </code></pre>
  
  <p>Directory structure</p>
  
  <pre><code>app
  - node_modules
  - docker-compose
  - Dockerfile
  - package.json
  - src
  - public
  </code></pre>
  
  <p>Here's the structure that I would like:</p>
  
  <pre><code>app
  - server
  - client
    / node_modules
    / Dockerfile
    / package.json
    / src
    / public
  - docker-compose.yml
  </code></pre>
  
  <p>I've tried every variation that I can think of, but the live reload will not work.</p>
  
  <p>The first thing I had to do was change the build location:</p>
  
  <pre><code>version: "2"
  
  services:
    client:
      build: ./client
      ports:
        - "3000:3000"
      volumes:
        - .:/code
  </code></pre>
  
  <p>Then I got an error when trying to run <code>docker-compose up</code>:</p>
  
  <pre><code>npm ERR! enoent ENOENT: no such file or directory, open '/code/package.json'
  </code></pre>
  
  <p>So I changed the volume to <code>- .:/client/code</code> and rebuilt and ran the command and the app started, but no live reload. </p>
  
  <p>Anyway to do this when the app is in a subdirectory?</p>