version: "2"
services:
  frontend:
    build: client
    ports:
      - "80:80"
    links:
      - backend
  backend:
    build: server
    restart: always
    ports:
      - "3333:3333"
    links:
      - mongo
  mongo:
    image: mongo:3.4
    volumes:
        - ./data/mongodb/db:/data/db
    ports:
      - "27017:27017"
version: "2"
services:
  frontend:
    build: client
    ports:
      - "80:80"
    links:
      - backend
  backend:
    build: server
    restart: always
    ports:
      - "3333:3333"
    links:
      - mongo
  mongo:
    image: mongo:3.4
    volumes:
    - data-volume:/data/db
    ports:
      - "27017:27017"
volumes:
  data-volume:

Replace bind volume with docker volume
Replace bind volume with docker volume
