Open MattGson opened 3 years ago
@MattGson we want to match all the env vars with the corresponding config options in cube.js/cube.ts
. Could you please share what is missing right now for you?
@keydunov The main things missing seem to be the database connection args and CUBEJS_DEV_MODE which I personally think should just use NODE_ENV anyway as is the node.js convention.
@MattGson for the database connection args can you not just use
driverFactory: () =>
new AthenaDriver({
readOnly: true,
accessKeyId: process.env.CUBEJS_AWS_KEY,
secretAccessKey: process.env.CUBEJS_AWS_SECRET,
region: process.env.CUBEJS_AWS_REGION,
S3OutputLocation: process.env.CUBEJS_AWS_S3_OUTPUT_LOCATION,
}),
// or
driverFactory: () =>
new MySqlDriver({
host: process.env.CUBEJS_DB_HOST, // or whatever var/function call etc here
database: process.env.CUBEJS_DB_NAME,
user: process.env.CUBEJS_DB_USER,
password: process.env.CUBEJS_DB_PASS,
port: process.env.CUBEJS_DB_PORT
}),
Used driverFactory
There is still some config not available such as redis.
Is your feature request related to a problem? Please describe. We have conventions around app configuration for our existing services which includes using convict to access configuration, either through the environment or arguments.
We would like to avoid having a one off different system for cube where we must opaquely rely on environment variables.
Describe the solution you'd like All configuration options here should be available in the cube.js/cube.ts file so that we can decide how to populate these values.
Describe alternatives you've considered Using environment variables as cube intends.