支持minio cubestore docker 镜像

目前已经构建了一个支持minio的cubestore 镜像dalongrong/cubestore

参考使用

  • docker-compose 文件
version: "3"
services:
  postgres:
    image: postgres:12.2
    environment:
      - POSTGRES_PASSWORD=dalong
    ports:
      - 5432:5432
  minio:
    image: minio/minio
    command: server /data
    environment:
      - MINIO_ACCESS_KEY=dalongrong
      - MINIO_SECRET_KEY=dalongrong
    ports:
      - 9000:9000
  cubestore_router:
    restart: always
    image: dalongrong/cubestore
    environment:
      - CUBESTORE_LOG_LEVEL=trace
      - CUBESTORE_SERVER_NAME=cubestore_router:9999
      - CUBESTORE_META_PORT=9999
      - CUBESTORE_S3_BUCKET=demoapp
      - CUBESTORE_S3_ENDPOINT=http://minio:9000
      - CUBESTORE_S3_REGION=us-east-1
      - CUBESTORE_AWS_ACCESS_KEY_ID=dalongrong
      - CUBESTORE_AWS_SECRET_ACCESS_KEY=dalongrong
      - CUBESTORE_WORKERS=cubestore_worker_1:9001,cubestore_worker_2:9001
      - CUBESTORE_REMOTE_DIR=/cube/data
    ports: 
    - "9999:9999"
    - "3030:3030"
    - "3306:3306"
    expose:
      - 9999 # This exposes the Metastore endpoint
      - 3030 # This exposes the HTTP endpoint for CubeJS
      - 3306
    volumes:
      - .cubestore1:/cube/data
  cubestore_worker_1:
    restart: always
    image: dalongrong/cubestore
    environment:
      - CUBESTORE_SERVER_NAME=cubestore_worker_1:9001
      - CUBESTORE_WORKER_PORT=9001
      - CUBESTORE_S3_BUCKET=demoapp
      - CUBESTORE_S3_ENDPOINT=http://minio:9000
      - CUBESTORE_S3_REGION=us-east-1
      - CUBESTORE_AWS_ACCESS_KEY_ID=dalongrong
      - CUBESTORE_AWS_SECRET_ACCESS_KEY=dalongrong
      - CUBESTORE_META_ADDR=cubestore_router:9999
      - CUBESTORE_REMOTE_DIR=/cube/data
    depends_on:
      - cubestore_router
    expose:
      - 9001
    volumes:
      - .cubestore1:/cube/data
  cubestore_worker_2:
    restart: always
    image: dalongrong/cubestore
    environment:
      - CUBESTORE_SERVER_NAME=cubestore_worker_2:9001
      - CUBESTORE_WORKER_PORT=9001
      - CUBESTORE_S3_BUCKET=demoapp
      - CUBESTORE_S3_ENDPOINT=http://minio:9000
      - CUBESTORE_S3_REGION=us-east-1
      - CUBESTORE_AWS_ACCESS_KEY_ID=dalongrong
      - CUBESTORE_AWS_SECRET_ACCESS_KEY=dalongrong
      - CUBESTORE_META_ADDR=cubestore_router:9999
      - CUBESTORE_REMOTE_DIR=/cube/data
    depends_on:
      - cubestore_router
    expose:
      - 9001
    volumes:
      - .cubestore1:/cube/data
  • cube app 配置
# Cube.js environment variables: https://cube.dev/docs/reference/environment-variables
CUBEJS_DB_HOST=localhost
CUBEJS_DB_PORT=5432
CUBEJS_DB_NAME=postgres
CUBEJS_DB_USER=postgres
CUBEJS_DB_PASS=dalong
CUBEJS_WEB_SOCKETS=true
CUBEJS_DEV_MODE=true
CUBEJS_EXT_DB_HOST=localhost
CUBEJS_EXT_DB_PORT=3030
CUBEJS_EXT_DB_NAME=demoapp
#CUBEJS_EXT_DB_USER=<YOUR_DB_USER_HERE>
#CUBEJS_EXT_DB_PASS=<YOUR_DB_PASS_HERE>
CUBEJS_EXT_DB_TYPE=cubestore
CUBEJS_DB_TYPE=postgres
CUBEJS_API_SECRET=f2e81fe4b53200faac37bfe66d0be5b8a859e69c77c8f55134c5dd3afad5bab72fef5e346766ba485619ea0a5d8e577df5b4964a4b6b716162a72f590dd8c181
  • 效果

支持minio cubestore docker 镜像

 

 

参考资料

https://github.com/rongfengliang/mycubejs
https://hub.docker.com/repository/docker/dalongrong/cubestore

上一篇:cube.js 基于http 通道的数据实时更新


下一篇:UVA253 骰子涂色 Cube painting 题解