services:
  mongo-arbiter:
    # Use the same version as your data nodes!
    image: mongo:7.0
    container_name: mongo-arbiter
    restart: always
    network_mode: host
    
    # We pass the specific arbiter flags here
    command: 
      - mongod
      - --replSet
      - rs0
      - --bind_ip_all
      - --port
      - "27017"
      
    volumes:
      # Arbiters store very little data, but need a folder
      - /docker/arbiter/db:/data/db