version: '3.5'

services:
  node:
    build: .
    restart: unless-stopped
    depends_on:
      - db
    expose:
      - 4567 # use a reverse proxy like Traefik

  db:
    image: mongo:bionic
    restart: unless-stopped
    expose:
      - 27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: root
    volumes:
      - mongo:/data/db

volumes:
  mongo:
