version: "3.5"
services:
  mosquitto:
    image: eclipse-mosquitto:2-openssl
    ports:
      - 1883:1883
    networks:
      - cedalo-platform
    volumes:
      - mosquitto:/mosquitto/
  streamsheets:
    image: registry.cedalo.com/streamsheets/streamsheets:3
    container_name: streamsheets-pro
    ports:
      - 8080:8080 # Frontend and APIs
    expose:
      - 8080
    volumes:
      - streamsheets-data-pro:/var/lib/mongodb
      - streamsheets-config:/streamsheets/
    networks:
      - cedalo-platform
    environment:
      TZ: "Europe/Berlin"
      STREAMSHEETS_PRODUCT_NAME: "Cedalo Sheets"
      FUNCTIONS_MODULE_DIR: /streamsheets/functions
      USER_FUNCTIONS_MODULE_DIR: /streamsheets/user-functions
      STREAMSHEETS_LICENSE_PATH: "/streamsheets/license/license.lic"
      MACHINE_DATA_DIR: "/streamsheets/data/timescaleexport"
      STREAMSHEETS_DATABASE_EXPORT_DIR: "/streamsheets/data/timescaleexport"
      STREAMSHEETS_OPCUA_CLIENT_SESSION_TIMEOUT: 500000
      STREAMSHEETS_DATABASE_HOST: "timescaledb"
      STREAMSHEETS_DATABASE_NAME: "streamsheets"
      STREAMSHEETS_DATABASE_USER: "postgres"
      STREAMSHEETS_DATABASE_PASSWORD: "TimescaleIsAwesome"
      STREAMSHEETS_DATABASE_PORT: 5432
  timescaledb:
    image: timescale/timescaledb:latest-pg11
    container_name: timescaledb
    environment:
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "TimescaleIsAwesome"
      POSTGRES_DB: "streamsheets"
    ports:
      - 5432:5432
    expose:
      - 5432
    networks:
      - cedalo-platform
    volumes:
      - streamsheets-timescaledb:/var/lib/postgresql/data
volumes:
  streamsheets-data-pro:
  mosquitto:
  streamsheets-config:
  streamsheets-timescaledb:
networks:
  cedalo-platform:
    name: cedalo-platform
    driver: bridge
