version: "3.8"
services:
  ekyc-api:
    image: 561397722827.dkr.ecr.eu-west-1.amazonaws.com/growthproject/ekyc-gateway-api:1.1.0
    networks:
      - ekyc-network
    environment:
      DEFAULT_PAD_PIPELINE: "pad-r-1"
      DEFAULT_DFD_PIPELINE: "dfd-1"
      IDLF_SERVER_URL: "http://idlf-server:8080"
      IAD_SERVER_URL: "http://iad-server:8080"
      IDLD_SERVER_URL: "http://idld-server:8080"
      IDFM_SERVER_URL: "http://idfm-server:8080"
    ports:
      - 8080:8080
    depends_on:
      - idlf-server
      - iad-server
      - idld-server
      - idfm-server

  idlf-server:
    image: 561397722827.dkr.ecr.eu-west-1.amazonaws.com/facesdk/idface-server-all-eval:1.49.4
    deploy:
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    networks:
      - ekyc-network
    environment:
      IDFACE_SERVER_AVAILABLE_PIPELINES: "pad-r-1,dfd-1"

  iad-server:
    image: 561397722827.dkr.ecr.eu-west-1.amazonaws.com/iadproject/iad-server-eval:2.3.4
    restart: always
    deploy:
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    networks:
      - ekyc-network

  idld-server:
    image: 561397722827.dkr.ecr.eu-west-1.amazonaws.com/idlivedoc-server-eval:3.3.0
    restart: always
    deploy:
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    networks:
      - ekyc-network
    environment:
      IDLIVEDOC_SERVER_AVAILABLE_PIPELINES: "default-sr,default-pc,default-ps,default-dm"

  idfm-server:
    image: 561397722827.dkr.ecr.eu-west-1.amazonaws.com/growthproject/facerecognition/idfacematch/idfacematch-server-eval:1.5.0
    restart: always
    deploy:
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    networks:
      - ekyc-network
    environment:
      IDFM_SERVER_QDRANT_HOST: "qdrant"
    depends_on:
      - qdrant

  qdrant:
    image: qdrant/qdrant:latest
    restart: always
    networks:
      - ekyc-network
    environment:
      QDRANT__STORAGE__HNSW_INDEX__M: 64
      QDRANT__STORAGE__HNSW_INDEX__EF_CONSTRUCT: 600
      QDRANT__SEARCH__HNSW_INDEX__EF: 600
    volumes:
      - ./qdrant_data:/qdrant/storage

networks:
  ekyc-network:
    name: ekyc-network
    driver: bridge
