Getting started
CubeBI runs as one Docker Compose project. Everything is namespaced cubebi-* so it can share a host with other stacks.
Prerequisites
- Docker with Compose v2
opensslto generate secrets
First run
sh
git clone git@github.com:zeshaq/cubebi.git && cd cubebi
cp .env.example .env # then fill each value, e.g. with: openssl rand -hex 24
docker compose up -d --build
./scripts/seed-demo.sh # once: creates the "Sales overview" demo dashboardOpen http://127.0.0.1:18450. To reach it from another machine, use an SSH tunnel: ssh -L 18450:127.0.0.1:18450 <host>.
On first start Postgres seeds a sample retail warehouse: two years of orders, about 71k orders and 179k line items.
Ports and resources
| Resource | Value |
|---|---|
| Compose project | cubebi |
| Containers | cubebi-db, cubebi-cubestore, cubebi-cube, cubebi-web |
| Network | cubebi-net, pinned to 10.246.10.0/24 |
| Volumes | cubebi-pgdata, cubebi-cubestore |
| Web app | 127.0.0.1:18450 |
| Cube REST API | 127.0.0.1:18451 (needs a JWT signed with CUBEJS_API_SECRET) |
| Postgres | 127.0.0.1:18452 |
| Web dev server / docs dev server | 18453 / 18455 |
Everyday commands
sh
docker compose ps # status
docker compose logs -f cube # Cube logs
docker compose up -d --build web # rebuild and redeploy the web app
docker compose restart cube # pick up model changes if hot reload missed them
docker compose down # stop (data is kept)DANGER
docker compose down -v deletes the data volumes: the sample warehouse, saved charts and dashboards.
Developing
sh
cd web && npm install && npm run dev # UI on :18453, proxies to the running stack
cd docs && npm install && npm run dev # this docs site on :18455Limitations today
There is no login. The app is bound to localhost and trusts anyone who can reach it. Identity is Phase 1 of the build plan.