# https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
version: "1.0"
name: "achatbot-fastapi-daily-chat-bot"
services:
  app:
    image: achatbot:fastapi_daily_bot_run
    #depends_on:
    ports:
      - "8000:8000"
    environment:
      DAILY_API_KEY: /run/secrets/daily_api_key
      OPENAI_API_KEY: /run/secrets/openai_api_key
      GROQ_API_KEY: /run/secrets/groq_api_key
      TOGETHER_API_KEY: /run/secrets/together_api_key
      DEEPGRAM_API_KEY: /run/secrets/deepgram_api_key
      ELEVENLABS_API_KEY: /run/secrets/elevenlabs_api_key
      JINA_API_KEY: /run/secrets/jina_api_key
      TIDB_HOST: ${TIDB_HOST}
      TIDB_PORT: ${TIDB_PORT}
      TIDB_SSL_CA: ${TIDB_SSL_CA}
      TIDB_USERNAME: ${TIDB_USERNAME}
      TIDB_PASSWORD: /run/secrets/tidb_password
      TIDB_DATABASE: ${TIDB_DATABASE}
      TIDB_VSS_DISTANCE_STRATEGY: ${TIDB_VSS_DISTANCE_STRATEGY}
      REDIS_HOST: ${REDIS_HOST}
      REDIS_PORT: ${REDIS_PORT}
      REDIS_PASSWORD: /run/secrets/redis_password
    secrets:
      - daily_api_key
      - openai_api_key
      - groq_api_key
      - together_api_key
      - deepgram_api_key
      - elevenlabs_api_key
      - jina_api_key
      - tidb_password
      - redis_password
    container_name: achatbot-fastapi-daily-chat-bot

secrets:
  daily_api_key:
    external: true
  openai_api_key:
    external: true
  groq_api_key:
    external: true
  together_api_key:
    external: true
  deepgram_api_key:
    external: true
  elevenlabs_api_key:
    external: true
  jina_api_key:
    external: true
  tidb_password:
    external: true
  redis_password:
    external: true  
