version: "3.8"
services:
  propertycenter:
    image: "aienv4j:v8"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/propertycenter:/scripts
    entrypoint:
      - /bin/sh
      - /scripts/docker-entrypoint.sh
    depends_on:
      - airedis

  aiweb: 
    image: "aienv4j:v8"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    ports:
      - target: 9082
        published: 9060
        protocol: tcp
        mode: host
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/aiweb:/scripts
    entrypoint:
      - /bin/sh 
      - /scripts/docker-entrypoint.sh
    depends_on: 
      - airedis

  admin: 
    image: "aienv4j:v8"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/admin:/scripts
    entrypoint:
      - /bin/sh 
      - /scripts/docker-entrypoint.sh
    depends_on: 
      - airedis
      - propertycenter

  modulemanager: 
    image: "aienv4j:v8"
    ports: 
      - target: 9081
        published: 9081
        protocol: tcp
        mode: host
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/modulemanager:/scripts
    entrypoint:
      - /bin/sh 
      - /scripts/docker-entrypoint.sh
    depends_on: 
      - airedis
      - propertycenter

  aibus: 
    image: "aienv4j:v8"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/aibus:/scripts
    entrypoint:
      - /bin/sh 
      - /scripts/docker-entrypoint.sh
    depends_on: 
      - airedis
      - propertycenter
                      
  smartbiproxy: 
    image: "aienv4j:v8"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/ailogs
      - /data/glusterfs/NLA/smartbi-nla/services:/jars
      - /data/glusterfs/NLA/smartbi-nla/scripts/smartbiproxy:/scripts
    entrypoint:
      - /bin/sh
      - /scripts/docker-entrypoint.sh
    depends_on: 
      - airedis
      - propertycenter

  nl2sql_llm:
    image: "aienv4py-llm:v6"
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/logs
      - /data/glusterfs/NLA/smartbi-nla/scripts/nl2sql_llm:/scripts
      - /data/glusterfs/NLA/smartbi-nla/services:/services
      - /data/glusterfs/NLA/smartbi-nla/data/nl2sql_data:/data
      - /data/NLA/smartbi-nla/backup/backup_data:/backup_data
    depends_on: 
      - airedis
      - admin
    entrypoint:
      - /bin/sh
      - /scripts/docker-entrypoint.sh

  transfer:
    image: "aienv4py-llm:v6"
    ports:
      - target: 5001
        published: 5001
        protocol: tcp
        mode: host
    deploy:
        endpoint_mode: dnsrr
        mode: global
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 3
    volumes:
      - /data/NLA/smartbi-nla/logs:/logs
      - /data/glusterfs/NLA/smartbi-nla/transfer:/transfer
      - /etc/hosts:/etc/hosts
    depends_on:
      - aiweb
      - propertycenter
    entrypoint:
      - /bin/sh
      - /transfer/transfer_run.sh
    




