This guide will help you get Cube.js running using Docker Compose.
docker-compose.yml file with the following content:
If you're using Linux as the Docker host OS, you'll also need to add
network_mode: 'host' to your
version: '2.2' services: cube: image: cubejs/cube:latest ports: - 4000:4000 # Cube.js API and Developer Playground - 3000:3000 # Dashboard app, if created environment: - CUBEJS_DEV_MODE=true volumes: - .:/cube/conf # Prevent dev dependencies leaking - .empty:/cube/conf/node_modules/@cubejs-backend/
$ docker-compose up -d
Check if the container is running:
$ docker-compose ps
The Developer Playground has a database connection
wizard that loads when Cube.js is first started up and no
.env file is found.
After database credentials have been set up, an
.env file will automatically
be created and populated with the same credentials.
Click on the type of database to connect to, and you'll be able to enter credentials:
After clicking Apply, you should see tables available to you from the configured database. Select one to generate a data schema. Once the schema is generated, you can execute queries on the Build tab.
Generating Data Schema files in the Developer Playground is a good first step to start modelling your data. You can learn more about Cube.js Data Schema for complex data modelling techniques.
Did you find this page useful?