name: dataristix-pod

# Common settings for services. The 'dataristix-secrect' volume should be configured with restricted access.
# ===========================================================================================================
x-dataristix-common: &dataristix-common
    volumes:
      - dataristix-data:/dataristix-data
      - dataristix-secret:/dataristix-secret

services:

# Core Service. Module services specified with '--modules=' must follow below.
# =============================================================================
  dataristix-core:
    image: dataristix/dataristix-core:latest
    container_name: dataristix-core
    command: --modules="CSV, E-Mail, Excel, IoT Devices, MQTT, Power BI, REST, Script, SQLite"
    depends_on:
      - dataristix-for-csv
      - dataristix-for-email
      - dataristix-for-excel
      - dataristix-for-iotdevices
      - dataristix-for-mqtt
      - dataristix-for-powerbi
      - dataristix-for-rest
      - dataristix-for-script
      - dataristix-for-sqlite
    <<: *dataristix-common

# Dataristix proxy and backend-for-frontend
# =================================
  dataristix-proxy:
    image: dataristix/dataristix-proxy:latest
    container_name: dataristix-proxy
    depends_on:
      - dataristix-core
    ports:
      - "8282:8282"
    expose:
      - "8282"
    <<: *dataristix-common

# CSV Connector 
# ===============================
  dataristix-for-csv:
    image: dataristix/dataristix-for-csv:latest
    container_name: dataristix-for-csv
    # command: --CsvDataFolder="<defaults to /dataristix-data/modules/CSV Connector/CSV>" 
    <<: *dataristix-common

# Email Connector 
# ===============================
  dataristix-for-email:
    image: dataristix/dataristix-for-email:latest
    container_name: dataristix-for-email
    <<: *dataristix-common

# Excel Connector 
# ===============================
  dataristix-for-excel:
    image: dataristix/dataristix-for-excel:latest
    container_name: dataristix-for-excel
    ports:
      # Expose remote RTD server port if required
      # - 22782:22782
    <<: *dataristix-common

# IoT Devices Connector 
# ===============================
  dataristix-for-iotdevices:
    image: dataristix/dataristix-for-iotdevices:latest-experimental
    container_name: dataristix-for-iotdevices
    privileged: true
    <<: *dataristix-common

# MQTT Connector 
# ===============================
  dataristix-for-mqtt:
    image: dataristix/dataristix-for-mqtt:latest
    container_name: dataristix-for-mqtt
    ports:
      # Expose broker ports. Adjust if different ports are configured. Add WebSocket ports if required.
      # Expose default TCP broker port
      - 1883:1883    
      # Expose TLS TCP broker port
      - 8883:8883
    <<: *dataristix-common
    
# Power BI Connector 
# ===============================
  dataristix-for-powerbi:
    image: dataristix/dataristix-for-powerbi:latest
    container_name: dataristix-for-powerbi
    <<: *dataristix-common

# REST Connector 
# ===============================
  dataristix-for-rest:
    image: dataristix/dataristix-for-rest:latest
    container_name: dataristix-for-rest
    <<: *dataristix-common

# Script Connector 
# ===============================
  dataristix-for-script:
    image: dataristix/dataristix-for-script:latest
    container_name: dataristix-for-script
    <<: *dataristix-common

# SQLite Connector 
# ===============================
  dataristix-for-sqlite:
    image: dataristix/dataristix-for-sqlite:latest
    container_name: dataristix-for-sqlite
    <<: *dataristix-common

volumes:
    dataristix-data:
        name: dataristix-data
    dataristix-secret:
        name: dataristix-secret
