version: '3.9'

services:
  # mongoDB service
  mongo_db:
    container_name: db_container
    image: mongo:4.4
    restart: always
    ports:
      - 2717:27017
    volumes:     
      - mongo_db:/data/db

  # Node API service
  api:
    build: .
    ports:
      - 4000:3000
    volumes:
      - .:/Users/suryapaolo/myproject/freeplanet_serverside
    environment:
      PORT: 3000
      DOMAIN: mongodb://mongo_db:27017/
      DATABASE: test_FreePlanet
      UDB: paofreeplanet
    depends_on:
      - mongo_db

volumes:
  mongo_db: {}