Create a project
In this step, we will create a Cube Core project on your computer, connect a data source, and generate data models.
Start by opening your terminal to create a new folder for the project, then
docker-compose.yml file within it:
mkdir my-first-cube-project && cd $_ touch docker-compose.yml
docker-compose.yml file and add the following content:
version: '2.2' services: cube: image: cubejs/cube:latest ports: - 4000:4000 - 15432:15432 environment: - CUBEJS_DEV_MODE=true volumes: - .:/cube/conf
Note that we're setting the
CUBEJS_DEV_MODE environment variable to
enable the Development Mode. This is
handy for local development but not suitable for
If you're using Linux as the Docker host OS, you'll also need to add
network_mode: 'host' to your
From the newly-created project directory, run the following command to start Cube:
docker compose up -d
Using Windows? Remember to use PowerShell or WSL2 to run the command below.
Head to http://localhost:4000 to open the Developer Playground.
The Playground has a database connection wizard that loads when Cube is first
started up and no
.env file is found. After database credentials have been set
.env file will automatically be created and populated with credentials.
Want to use a sample database instead? Selectand use the credentials below:
After selecting the data source, enter valid credentials for it and click Connecting to Databases page for more details on specific data sources.. Check the
You should see tables available to you from the configured database; select the
orders table. After selecting the table, click and pick either (recommended)
Finally, clickin the dialog, which should take you to the page.
You're now ready for the next step, querying the data.
Did you find this page useful?