title: named docker volume not updating using docker-compose
body: <p>I'm trying to have one service to build my client side and then share it to the server using a named volume. Every time I do a <code>docker-compose up --build</code> I want the client side to build and update the named volume <code>clientapp:</code>. How do I do that?</p>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: '2' 
  
  volumes:
    clientapp:
  
  services:
    database:
      image: mongo:3.4
      volumes:
        - /data/db
        - /var/lib/mongodb
        - /var/log/mongodb
  
    client:
      build: ./client
      volumes:
        - clientapp:/usr/src/app/client
  
    server:
      build: ./server
      ports:
        - "3000:3000"
      environment:
        - DB_1_PORT_27017_TCP_ADDR=database
      volumes:
        - clientapp:/usr/src/app/client
      depends_on:
        - client
        - database
  </code></pre>
  
  <p>client Dockerfile</p>
  
  <pre><code>FROM node:6
  
  ENV NPM_CONFIG_LOGLEVEL warn
  
  RUN mkdir -p /usr/src/app
  
  WORKDIR /usr/src/app
  
  COPY package.json /usr/src/app
  
  RUN npm install
  
  COPY . /usr/src/app
  
  # builds my application into /client
  CMD ["npm", "build"]
  </code></pre>