Environment variables are mostly used for configuration that is defined statically and is not supposed to change while a Cube deployment is running.
CUBEJS_DATASOURCES defines a list of data sources to connect
to; changing that list would require the deployment to restart.
See the environment variables reference for all supported options.
You can set environment variables in any way supported by
Docker (opens in a new tab), e.g., a
.env file or the
option in the
You can set environment variables in Settings → Configuration:
Configuration options are mostly used for configuration that is defined programmatically and applied dynamically while a Cube deployment is running.
provides a way to inspect, modify, or restrict every query that is being
processed by Cube.
Configuration options take precedence over environment variables. See the configuration options reference for all supported options.
Configuration options can be defined either using Python, in a
cube.js file in the root folder of a Cube project.
Both ways are equivalent; when in doubt, use Python.
Support for Python and the
cube.py file was introduced in v0.34.
When using Docker, ensure that the configuration file and your data model
folder are mounted to
/cube/conf within the
You can edit the configuration file by going into Development Mode and navigating to the Data Model page.
As of v0.34, Cube uses Python v3.9 and Node.js v16.20 as runtime environments for the code of configuration and dynamic data models.
It's recommended to use
package.json files to
If you have specified Python packages in the
make sure to install them by running
pip install -r requirements.txt
inside the Docker container.
If you have specified npm packages in the
package.json file, make sure
to install them by running
npm install inside the Docker container.
Alternatively, you can run
npm install on your local machine and mount
node_modules folder under
/cube/conf in the Docker container;
however, if your dependencies contain native extensions, they might not work
when provided this way.
To automate the installation of dependencies, build and use a custom Docker image.
Cube Cloud automatically installs dependencies from
Cube can be run in an insecure, development mode by setting the
CUBEJS_DEV_MODE environment variable to
true. Putting Cube in development
mode does the following:
- Disables authentication checks
- Enables Cube Store in single instance mode
- Enables background refresh for in-memory cache and scheduled pre-aggregations
- Allows another log level to be set (
- Enables Developer Playground on
cubestoreas the default cache/queue engine
- Logs incorrect/invalid configuration for
waitForRenewinstead of throwing errors
- Allows access to non-public cubes and members through the
/metaendpoint and for querying through the REST, GraphQL or SQL APIs.