version: '2'
services:
  django:
    extends:
      file: ./docker/compose-common.yml
      service: django
    links:
      - db
    environment:
      - DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev

  webpack:
    build:
      context: .
      dockerfile: ./docker/webpack.docker
    ports:
      - "8001:8001"
    volumes:
      - .:/app

  db:
    image: postgres
    environment:
      - POSTGRES_USER=pyconcz

version: '2'
services:
  django:
    extends:
      file: ./docker/compose-common.yml
      service: django
    links:
      - db
    environment:
      - DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev

  webpack:
    build:
      context: .
      dockerfile: ./docker/webpack.docker
    ports:
      - "8001:8001"
    volumes:
      - /app/node_modules
      - .:/app

  db:
    image: postgres
    environment:
      - POSTGRES_USER=pyconcz

Fix webpack volume mounting clearing node_modules inside container
Fix webpack volume mounting clearing node_modules inside container

Mounting . to /app inside the container will replace everything under /app
in there, including /app/node_modules. By adding a separate volume for
/app/node_modules, Docker will keep everything under /app/node_modules
intact (even if we don't mount anything there.)
