version: "2.2"

services:
  cube:
    container_name: birdbox-cube
    image: ${BIRDBOX_CUBEJS_REGISTRY_PATH}cubejs/cube:${BIRDBOX_CUBEJS_VERSION:-latest}
    environment:
      CUBEJS_DB_TYPE: databricks-jdbc

      # from test
      CUBEJS_SCHEDULED_REFRESH_DEFAULT: ${CUBEJS_SCHEDULED_REFRESH_DEFAULT}
      CUBEJS_REFRESH_WORKER: ${CUBEJS_REFRESH_WORKER}
      CUBEJS_EXTERNAL_DEFAULT: ${CUBEJS_EXTERNAL_DEFAULT}
      CUBEJS_ROLLUP_ONLY: ${CUBEJS_ROLLUP_ONLY}
      CUBEJS_TELEMETRY: ${CUBEJS_TELEMETRY}

      # defaults
      CUBEJS_DEV_MODE: "true"
      CUBEJS_API_SECRET: mysupersecret
      CUBEJS_SCHEMA_PATH: schema
    volumes:
      - ./databricks-jdbc/cube.js:/cube/conf/cube.js
    ports:
      - "4000:4000"
    restart: always
