version: '3.1'

services:

  db:
    image: mongo
    ports:
      - "27017:27017"
    volumes:
      - ./data:/data/db
    
  backend:
    image: node:20
    working_dir: /backend
    volumes:
      - ./backend:/backend
      - ./.Keys.js:/backend/.Keys.js
      - ./config-dev.js:/backend/config.js
    ports:
      - "3000:3000"
      - "9228:9229"
    command: ["npm", "run", "dev"]
    depends_on:
      - db