version: "3.9"
services: 
  feed-service:
    build: 
      context: './backend-services/feed-service'
      dockerfile: Dockerfile
    restart: unless-stopped
    ports: 
     - "9001:9000"
    environment:
     - MONGO_URI=mongodb://feed-mongo:27017/

  user-service:
    build:
      context: './backend-services/user-service'
      dockerfile: Dockerfile
    restart: unless-stopped
    ports:
    - "9002:9000"
    environment:
     - MONGO_URI=mongodb://user-mongo:27017/userdb


  feed-mongo:
      image: mongo
      container_name: feed-mongo
      ports:
       - "27017:27017"

  user-mongo:
    image: mongo
    container_name: user-mongo
    volumes: 
      - "./mongo/db:/data/db"
    ports:
      - "27018:27017"