# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
  chatqna:
    build:
      args:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
        no_proxy: ${no_proxy}
      context: ../../ChatQnA/
      dockerfile: ./Dockerfile
    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
  embedding-tei:
    build:
      context: GenAIComps
      dockerfile: comps/embeddings/tei/langchain/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
  retriever-redis:
    build:
      context: GenAIComps
      dockerfile: comps/retrievers/redis/langchain/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
  reranking-tei:
    build:
      context: GenAIComps
      dockerfile: comps/reranks/tei/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
  llm-tgi:
    build:
      context: GenAIComps
      dockerfile: comps/llms/text-generation/tgi/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
  dataprep-redis:
    build:
      context: GenAIComps
      dockerfile: comps/dataprep/redis/langchain/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
  promptregistry-mongo-server:
    build:
      context: GenAIComps
      dockerfile: comps/prompt_registry/mongo/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/promptregistry-mongo-server:${TAG:-latest}
  chathistory-mongo-server:
    build:
      context: GenAIComps
      dockerfile: comps/chathistory/mongo/Dockerfile
    extends: chatqna
    image: ${REGISTRY:-opea}/chathistory-mongo-server:${TAG:-latest}
  productivity-suite-react-ui-server:
    build:
      context: ../ui
      dockerfile: ./docker/Dockerfile.react
    extends: chatqna
    image: ${REGISTRY:-opea}/productivity-suite-react-ui-server:${TAG:-latest}
  codegen:
    build:
      args:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
        no_proxy: ${no_proxy}
      context: ../../CodeGen/
      dockerfile: ./Dockerfile
    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
  docsum:
    build:
      args:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
        no_proxy: ${no_proxy}
      context: ../../DocSum/
      dockerfile: ./Dockerfile
    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
  faqgen:
    build:
      args:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
        no_proxy: ${no_proxy}
      context: ../../FaqGen/
      dockerfile: ./Dockerfile
    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
  llm-faqgen-tgi:
    build:
      context: GenAIComps
      dockerfile: comps/llms/faq-generation/tgi/langchain/Dockerfile
    extends: faqgen
    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
  llm-docsum-tgi:
    build:
      context: GenAIComps
      dockerfile: comps/llms/summarization/tgi/langchain/Dockerfile
    extends: docsum
    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
